ice: Support RX hash XDP hint
authorLarysa Zaremba <larysa.zaremba@intel.com>
Tue, 5 Dec 2023 21:08:35 +0000 (22:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 14 Dec 2023 00:16:40 +0000 (16:16 -0800)
commit0e6a7b09597011985d7aad3b747c43e9b2a43555
tree4d90ee9377eb683190e367510c86f595dbbf1b5c
parent9031d5f491b95710a1cf871818c7c9730ec50a1b
ice: Support RX hash XDP hint

RX hash XDP hint requests both hash value and type.
Type is XDP-specific, so we need a separate way to map
these values to the hardware ptypes, so create a lookup table.

Instead of creating a new long list, reuse contents
of ice_decode_rx_desc_ptype[] through preprocessor.

Current hash type enum does not contain ICMP packet type,
but ice devices support it, so also add a new type into core code.

Then use previously refactored code and create a function
that allows XDP code to read RX hash.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://lore.kernel.org/r/20231205210847.28460-7-larysa.zaremba@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
drivers/net/ethernet/intel/ice/ice_txrx_lib.c
include/net/xdp.h