Skip to content

Commit fa71ae2

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
ixgbevf: Move Tx clean-up into NAPI context
Currently the VF driver is processing all of the transmits in interrupt context. This can be messy since the Rx is all handled in NAPI and this may result in interrupts being disabled. In order to resolve this move all of the Tx packet processing into NAPI and combine all of the interrupt and polling routines into just a pair of functions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 6b43c44 commit fa71ae2

File tree

3 files changed

+89
-182
lines changed

3 files changed

+89
-182
lines changed

drivers/net/ethernet/intel/ixgbevf/ethtool.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
364364
}
365365
goto err_tx_ring_setup;
366366
}
367-
tx_ring[i].v_idx = adapter->tx_ring[i].v_idx;
368367
}
369368

370369
memcpy(rx_ring, adapter->rx_ring,
@@ -380,7 +379,6 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
380379
}
381380
goto err_rx_ring_setup;
382381
}
383-
rx_ring[i].v_idx = adapter->rx_ring[i].v_idx;
384382
}
385383

386384
/*

drivers/net/ethernet/intel/ixgbevf/ixgbevf.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ struct ixgbevf_ring {
8181
* offset associated with this ring, which is different
8282
* for DCB and RSS modes */
8383

84-
u64 v_idx; /* maps directly to the index for this ring in the hardware
85-
* vector array, can also be used for finding the bit in EICR
86-
* and friends that represents the vector for this ring */
87-
88-
u16 work_limit; /* max work per interrupt */
8984
u16 rx_buf_len;
9085
};
9186

@@ -140,6 +135,7 @@ struct ixgbevf_q_vector {
140135
struct ixgbevf_ring_container rx, tx;
141136
u32 eitr;
142137
int v_idx; /* vector index in list */
138+
char name[IFNAMSIZ + 9];
143139
};
144140

145141
/* Helper macros to switch between ints/sec and what the register uses.
@@ -167,9 +163,8 @@ struct ixgbevf_q_vector {
167163
#define NON_Q_VECTORS (OTHER_VECTOR)
168164

169165
#define MAX_MSIX_Q_VECTORS 2
170-
#define MAX_MSIX_COUNT 2
171166

172-
#define MIN_MSIX_Q_VECTORS 2
167+
#define MIN_MSIX_Q_VECTORS 1
173168
#define MIN_MSIX_COUNT (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)
174169

175170
/* board specific private data structure */
@@ -179,14 +174,14 @@ struct ixgbevf_adapter {
179174
u16 bd_number;
180175
struct work_struct reset_task;
181176
struct ixgbevf_q_vector *q_vector[MAX_MSIX_Q_VECTORS];
182-
char name[MAX_MSIX_COUNT][IFNAMSIZ + 9];
183177

184178
/* Interrupt Throttle Rate */
185179
u32 itr_setting;
186180

187181
/* TX */
188182
struct ixgbevf_ring *tx_ring; /* One per active queue */
189183
int num_tx_queues;
184+
u16 tx_itr_setting;
190185
u64 restart_queue;
191186
u64 hw_csum_tx_good;
192187
u64 lsc_int;
@@ -197,6 +192,7 @@ struct ixgbevf_adapter {
197192
/* RX */
198193
struct ixgbevf_ring *rx_ring; /* One per active queue */
199194
int num_rx_queues;
195+
u16 rx_itr_setting;
200196
u64 hw_csum_rx_error;
201197
u64 hw_rx_no_dma_resources;
202198
u64 hw_csum_rx_good;

0 commit comments

Comments
 (0)