ice: Change number of XDP TxQ to 0 when destroying rings
authorMarta Plantykow <marta.a.plantykow@intel.com>
Sat, 16 May 2020 00:42:15 +0000 (17:42 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 28 May 2020 00:49:56 +0000 (17:49 -0700)
When XDP Tx rings are destroyed the number of XDP Tx queues
is not changing. This patch is changing this number to 0.

Signed-off-by: Marta Plantykow <marta.a.plantykow@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index 247e7b186b3c6fee66a63fe9e215f492ad540c75..081fec3131cd1a2369eedd28009320f7bd55fde9 100644 (file)
@@ -1899,6 +1899,9 @@ free_qmap:
        for (i = 0; i < vsi->tc_cfg.numtc; i++)
                max_txqs[i] = vsi->num_txq;
 
+       /* change number of XDP Tx queues to 0 */
+       vsi->num_xdp_txq = 0;
+
        return ice_cfg_vsi_lan(vsi->port_info, vsi->idx, vsi->tc_cfg.ena_tc,
                               max_txqs);
 }