Skip to content

Commit dddeeaa

Browse files
jdamato-fslyanguy11
authored andcommitted
igc: Fix XSK queue NAPI ID mapping
In commit b659698 ("igc: Link queues to NAPI instances"), the XSK queues were incorrectly unmapped from their NAPI instances. After discussion on the mailing list and the introduction of a test to codify the expected behavior, we can see that the unmapping causes the check_xsk test to fail: NETIF=enp86s0 ./tools/testing/selftests/drivers/net/queues.py [...] # Check| ksft_eq(q.get('xsk', None), {}, # Check failed None != {} xsk attr on queue we configured not ok 4 queues.check_xsk After this commit, the test passes: ok 4 queues.check_xsk Note that the test itself is only in net-next, so I tested this change by applying it to my local net-next tree, booting, and running the test. Cc: stable@vger.kernel.org Fixes: b659698 ("igc: Link queues to NAPI instances") Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com> Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent acc4d5f commit dddeeaa

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

drivers/net/ethernet/intel/igc/igc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ struct igc_adapter {
337337
struct igc_led_classdev *leds;
338338
};
339339

340-
void igc_set_queue_napi(struct igc_adapter *adapter, int q_idx,
341-
struct napi_struct *napi);
342340
void igc_up(struct igc_adapter *adapter);
343341
void igc_down(struct igc_adapter *adapter);
344342
int igc_open(struct net_device *netdev);

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5022,8 +5022,8 @@ static int igc_sw_init(struct igc_adapter *adapter)
50225022
return 0;
50235023
}
50245024

5025-
void igc_set_queue_napi(struct igc_adapter *adapter, int vector,
5026-
struct napi_struct *napi)
5025+
static void igc_set_queue_napi(struct igc_adapter *adapter, int vector,
5026+
struct napi_struct *napi)
50275027
{
50285028
struct igc_q_vector *q_vector = adapter->q_vector[vector];
50295029

drivers/net/ethernet/intel/igc/igc_xdp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ static int igc_xdp_enable_pool(struct igc_adapter *adapter,
9797
napi_disable(napi);
9898
}
9999

100-
igc_set_queue_napi(adapter, queue_id, NULL);
101100
set_bit(IGC_RING_FLAG_AF_XDP_ZC, &rx_ring->flags);
102101
set_bit(IGC_RING_FLAG_AF_XDP_ZC, &tx_ring->flags);
103102

@@ -147,7 +146,6 @@ static int igc_xdp_disable_pool(struct igc_adapter *adapter, u16 queue_id)
147146
xsk_pool_dma_unmap(pool, IGC_RX_DMA_ATTR);
148147
clear_bit(IGC_RING_FLAG_AF_XDP_ZC, &rx_ring->flags);
149148
clear_bit(IGC_RING_FLAG_AF_XDP_ZC, &tx_ring->flags);
150-
igc_set_queue_napi(adapter, queue_id, napi);
151149

152150
if (needs_reset) {
153151
napi_enable(napi);

0 commit comments

Comments
 (0)