ice: xsk: fix VSI state check in ice_xsk_wakeup()
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Thu, 17 Mar 2022 18:36:28 +0000 (19:36 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 5 Apr 2022 16:08:41 +0000 (09:08 -0700)
ICE_DOWN is dedicated for pf->state. Check for ICE_VSI_DOWN being set on
vsi->state in ice_xsk_wakeup().

Fixes: 2d4238f55697 ("ice: Add support for AF_XDP")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Shwetha Nagaraju <shwetha.nagaraju@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_xsk.c

index 33b28a72ffcb293e1c5aa92d3e5ccb2fb9b22199..866ee4df9671cf82be5c92791ee993959620f0db 100644 (file)
@@ -920,7 +920,7 @@ ice_xsk_wakeup(struct net_device *netdev, u32 queue_id,
        struct ice_vsi *vsi = np->vsi;
        struct ice_tx_ring *ring;
 
-       if (test_bit(ICE_DOWN, vsi->state))
+       if (test_bit(ICE_VSI_DOWN, vsi->state))
                return -ENETDOWN;
 
        if (!ice_is_xdp_ena_vsi(vsi))