igb: refactor XDP registration
authorCorinna Vinschen <vinschen@redhat.com>
Wed, 19 Jan 2022 14:52:59 +0000 (15:52 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 7 Feb 2022 22:23:01 +0000 (14:23 -0800)
commite62ad74aa534404b3ee7e250b114a3536ac56987
tree6ba6010c8a5fae0a5272eba6b1e90c8336f36dc9
parent453307b569a0d41bddd07f26bf41b784cd82a4c9
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>
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c