igc: Add XDP hints kfuncs for RX hash
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 18 Apr 2023 13:30:52 +0000 (15:30 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Apr 2023 16:42:19 +0000 (18:42 +0200)
commit8416814fffa9cfa74c18da149f522dd9e1850987
tree62f75701926c9fef0a284ed912786b7b7d6d7743
parent73b7123de0cfa4f6609677e927ab02cb05b593c2
igc: Add XDP hints kfuncs for RX hash

This implements XDP hints kfunc for RX-hash (xmo_rx_hash).
The HW rss hash type is handled via mapping table.

This igc driver (default config) does L3 hashing for UDP packets
(excludes UDP src/dest ports in hash calc).  Meaning RSS hash type is
L3 based.  Tested that the igc_rss_type_num for UDP is either
IGC_RSS_TYPE_HASH_IPV4 or IGC_RSS_TYPE_HASH_IPV6.

This patch also updates AF_XDP zero-copy function igc_clean_rx_irq_zc()
to use the xdp_buff wrapper struct igc_xdp_buff.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Yoong Siang <yoong.siang.song@intel.com>
Link: https://lore.kernel.org/bpf/168182465285.616355.2701740913376314790.stgit@firesoul
drivers/net/ethernet/intel/igc/igc.h
drivers/net/ethernet/intel/igc/igc_main.c