Skip to content

Commit 90382dc

Browse files
jrfastabdavem330
authored andcommitted
ixgbe: NULL xdp_tx rings on resource cleanup
tx_rings and rx_rings are cleaned up on close paths in ixgbe driver however, xdp_rings are not. Set the xdp_rings to NULL here so that we can use the pointer to indicate if the XDP rings are initialized. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ff65fa6 commit 90382dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,12 @@ static void ixgbe_free_q_vector(struct ixgbe_adapter *adapter, int v_idx)
10181018
struct ixgbe_q_vector *q_vector = adapter->q_vector[v_idx];
10191019
struct ixgbe_ring *ring;
10201020

1021-
ixgbe_for_each_ring(ring, q_vector->tx)
1022-
adapter->tx_ring[ring->queue_index] = NULL;
1021+
ixgbe_for_each_ring(ring, q_vector->tx) {
1022+
if (ring_is_xdp(ring))
1023+
adapter->xdp_ring[ring->queue_index] = NULL;
1024+
else
1025+
adapter->tx_ring[ring->queue_index] = NULL;
1026+
}
10231027

10241028
ixgbe_for_each_ring(ring, q_vector->rx)
10251029
adapter->rx_ring[ring->queue_index] = NULL;

0 commit comments

Comments
 (0)