]> git.baikalelectronics.ru Git - kernel.git/commit
ice: move headroom initialization to ice_setup_rx_ctx
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 3 Mar 2021 15:39:27 +0000 (16:39 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 12 Mar 2021 15:43:46 +0000 (07:43 -0800)
commit1446a6386c6cb979a3f9c9114086e9d417bee4b1
tree50552388171ffc9c0323ebe67d6a4b6afd43cafc
parent889e1a87e4a95f62e6895ccf604f3daae59a7e06
ice: move headroom initialization to ice_setup_rx_ctx

ice_rx_offset(), that is supposed to initialize the Rx buffer headroom,
relies on ICE_RX_FLAGS_RING_BUILD_SKB flag as well as XDP prog presence.

Currently, the callsite of mentioned function is placed incorrectly
within ice_setup_rx_ring() where Rx ring's build skb flag is not
set yet. This causes the XDP_REDIRECT to be partially broken due to
inability to create xdp_frame in the headroom space, as the headroom is
0.

Fix this by moving ice_rx_offset() to ice_setup_rx_ctx() after the flag
setting.

Fixes: 498dc0b568bc ("ice: store the result of ice_rx_offset() onto ice_ring")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_base.c
drivers/net/ethernet/intel/ice/ice_txrx.c