ice: Fix undersized tx_flags variable
authorJan Sokolowski <jan.sokolowski@intel.com>
Thu, 11 May 2023 15:53:19 +0000 (08:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2023 08:27:44 +0000 (09:27 +0100)
commit9113302bb43cf7a6d5a414d49b29478e57451c86
tree11ed3b4883dc23cfbf9caaa4392fe3b9057f55c7
parent47af4291711f21e1282dbc1002baebba30595aa2
ice: Fix undersized tx_flags variable

As not all ICE_TX_FLAGS_* fit in current 16-bit limited
tx_flags field that was introduced in the Fixes commit,
VLAN-related information would be discarded completely.
As such, creating a vlan and trying to run ping through
would result in no traffic passing.

Fix that by refactoring tx_flags variable into flags only and
a separate variable that holds VLAN ID. As there is some space left,
type variable can fit between those two. Pahole reports no size
change to ice_tx_buf struct.

Fixes: aa1d3faf71a6 ("ice: Robustify cleaning/completing XDP Tx buffers")
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ice/ice_dcb_lib.c
drivers/net/ethernet/intel/ice/ice_txrx.c
drivers/net/ethernet/intel/ice/ice_txrx.h