summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorCorinna Vinschen <vinschen@redhat.com>2022-01-19 15:52:59 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-02-07 14:23:01 -0800
commite62ad74aa534404b3ee7e250b114a3536ac56987 (patch)
tree6ba6010c8a5fae0a5272eba6b1e90c8336f36dc9 /drivers/net/ethernet/intel/igb/igb_ethtool.c
parent453307b569a0d41bddd07f26bf41b784cd82a4c9 (diff)
downloadlinux-e62ad74aa534404b3ee7e250b114a3536ac56987.tar.gz
linux-e62ad74aa534404b3ee7e250b114a3536ac56987.tar.bz2
linux-e62ad74aa534404b3ee7e250b114a3536ac56987.zip
igb: refactor XDP registration
On changing the RX ring parameters igb uses a hack to avoid a warning when calling xdp_rxq_info_reg via igb_setup_rx_resources. It just clears the struct xdp_rxq_info content. Instead, change this to unregister if we're already registered. Align code to the igc code. Fixes: 9cbc948b5a20c ("igb: add XDP support") Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 51a2dcaf553d..2a5782063f4c 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -965,10 +965,6 @@ static int igb_set_ringparam(struct net_device *netdev,
memcpy(&temp_ring[i], adapter->rx_ring[i],
sizeof(struct igb_ring));
- /* Clear copied XDP RX-queue info */
- memset(&temp_ring[i].xdp_rxq, 0,
- sizeof(temp_ring[i].xdp_rxq));
-
temp_ring[i].count = new_rx_count;
err = igb_setup_rx_resources(&temp_ring[i]);
if (err) {