ionic: add initial framework for XDP support
authorShannon Nelson <shannon.nelson@amd.com>
Wed, 14 Feb 2024 17:59:04 +0000 (09:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Feb 2024 08:48:08 +0000 (08:48 +0000)
commit180e35cdf035d1c2e9ebdc06a9944a9eb81cc3d8
treefd00ab9d120bec2f5e10a8e24f15860139daac80
parentd67ee210dafd0a3f3d65ed2d01027cd0e0de93d6
ionic: add initial framework for XDP support

Set up the basics for running Rx packets through XDP programs.
Add new queue setup and teardown steps for adding/removing an
XDP program, and add the call to run the XDP on a packet.

The XDP frame size needs to be the MTU plus standard ethernet
header, plus head room for XDP scribblings and tail room for a
struct skb_shared_info.  Also, at this point, we don't support
XDP frags, only a single contiguous Rx buffer.  This means
that our page splitting is not very useful, so when XDP is in
use we need to use the full Rx buffer size and not do sharing.

Co-developed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_lif.h
drivers/net/ethernet/pensando/ionic/ionic_stats.c
drivers/net/ethernet/pensando/ionic/ionic_txrx.c