Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256617
b: refs/heads/master
c: 08c8833
h: refs/heads/master
i:
  256615: 9bdb6db
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 22, 2011
1 parent c72fc28 commit 7695329
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 85 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82d4e46e2a398154273044dd9813206f0d85bc09
refs/heads/master: 08c8833b29cfa4343ff132eebc5648b234eb3f85
16 changes: 10 additions & 6 deletions trunk/drivers/net/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ struct ixgbe_ring_feature {
int mask;
} ____cacheline_internodealigned_in_smp;

struct ixgbe_ring_container {
#if MAX_RX_QUEUES > MAX_TX_QUEUES
DECLARE_BITMAP(idx, MAX_RX_QUEUES);
#else
DECLARE_BITMAP(idx, MAX_TX_QUEUES);
#endif
u8 count; /* total number of rings in vector */
u8 itr; /* current ITR setting for ring */
};

#define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
? 8 : 1)
Expand All @@ -294,12 +303,7 @@ struct ixgbe_q_vector {
int cpu; /* CPU for DCA */
#endif
struct napi_struct napi;
DECLARE_BITMAP(rxr_idx, MAX_RX_QUEUES); /* Rx ring indices */
DECLARE_BITMAP(txr_idx, MAX_TX_QUEUES); /* Tx ring indices */
u8 rxr_count; /* Rx ring count assigned to this vector */
u8 txr_count; /* Tx ring count assigned to this vector */
u8 tx_itr;
u8 rx_itr;
struct ixgbe_ring_container rx, tx;
u32 eitr;
cpumask_var_t affinity_mask;
char name[IFNAMSIZ + 9];
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
}

/* if in mixed tx/rx queues per vector mode, report only rx settings */
if (adapter->q_vector[0]->txr_count && adapter->q_vector[0]->rxr_count)
if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count)
return 0;

/* only valid if in constant ITR mode */
Expand Down Expand Up @@ -2187,7 +2187,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
bool need_reset = false;

/* don't accept tx specific changes if we've got mixed RxTx vectors */
if (adapter->q_vector[0]->txr_count && adapter->q_vector[0]->rxr_count
if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count
&& ec->tx_coalesce_usecs)
return -EINVAL;

Expand Down Expand Up @@ -2261,7 +2261,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
int num_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
for (i = 0; i < num_vectors; i++) {
q_vector = adapter->q_vector[i];
if (q_vector->txr_count && !q_vector->rxr_count)
if (q_vector->tx.count && !q_vector->rx.count)
/* tx only */
q_vector->eitr = adapter->tx_eitr_param;
else
Expand Down
Loading

0 comments on commit 7695329

Please sign in to comment.