]> git.baikalelectronics.ru Git - kernel.git/commit
igb: refactor XDP registration
authorCorinna Vinschen <vinschen@redhat.com>
Wed, 19 Jan 2022 14:52:59 +0000 (15:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:29 +0000 (14:23 +0200)
commitcd1f98cdd2326328060019c50567c2f51d25a751
tree19a9b627e399f03cfb6991d30e8a875f0be1e588
parent16cf9617adb5cb09e2310d72c271467ba618d7b4
igb: refactor XDP registration

[ Upstream commit d2746ed466cbcc8847c0a0b5003d44a1670102a0 ]

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: 15d5613e82546 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c