diff options
author | Larysa Zaremba <larysa.zaremba@intel.com> | 2023-12-06 00:08:39 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-12-14 03:16:41 +0300 |
commit | 714ed949c6f3ebdff562bd9eb7247abf6a79a416 (patch) | |
tree | 61498bc14409d767073a3b6192a85deb05771731 /drivers/net/ethernet/intel/ice/ice_txrx.h | |
parent | e6795330f88b4f643c649a02662d47b779340535 (diff) | |
download | linux-714ed949c6f3ebdff562bd9eb7247abf6a79a416.tar.xz |
ice: Implement VLAN tag hint
Implement .xmo_rx_vlan_tag callback to allow XDP code to read
packet's VLAN tag.
At the same time, use vlan_tci instead of vlan_tag in touched code,
because VLAN tag often refers to VLAN proto and VLAN TCI combined,
while in the code we clearly store only VLAN TCI.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://lore.kernel.org/r/20231205210847.28460-11-larysa.zaremba@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx.h')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_txrx.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h index ce3434c73a4b..b3379ff73674 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx.h +++ b/drivers/net/ethernet/intel/ice/ice_txrx.h @@ -259,6 +259,7 @@ enum ice_rx_dtype { struct ice_pkt_ctx { u64 cached_phctime; + __be16 vlan_proto; }; struct ice_xdp_buff { @@ -335,7 +336,10 @@ struct ice_rx_ring { /* CL3 - 3rd cacheline starts here */ union { struct ice_pkt_ctx pkt_ctx; - u64 cached_phctime; + struct { + u64 cached_phctime; + __be16 vlan_proto; + }; }; struct bpf_prog *xdp_prog; u16 rx_offset; |