igc: Add igc_xdp_buff wrapper for xdp_buff in driver
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 18 Apr 2023 13:30:47 +0000 (15:30 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Apr 2023 16:42:19 +0000 (18:42 +0200)
commit73b7123de0cfa4f6609677e927ab02cb05b593c2
tree3040d6862d6cf76bb9837869093fbcc894b4e5b8
parent84214ab4689f962b4bfc47fc9a5838d25ac4274d
igc: Add igc_xdp_buff wrapper for xdp_buff in driver

Driver specific metadata data for XDP-hints kfuncs are propagated via tail
extending the struct xdp_buff with a locally scoped driver struct.

Zero-Copy AF_XDP/XSK does similar tricks via struct xdp_buff_xsk. This
xdp_buff_xsk struct contains a CB area (24 bytes) that can be used for
extending the locally scoped driver into. The XSK_CHECK_PRIV_TYPE define
catch size violations build time.

The changes needed for AF_XDP zero-copy in igc_clean_rx_irq_zc()
is done in next patch, because the member rx_desc isn't available
at this point.

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/168182464779.616355.3761989884165609387.stgit@firesoul
drivers/net/ethernet/intel/igc/igc.h
drivers/net/ethernet/intel/igc/igc_main.c