[Intel-wired-lan] [PATCH v6 0/2] i40e: support for XDP
Björn Töpel
bjorn.topel at gmail.com
Tue May 23 07:33:15 UTC 2017
From: Björn Töpel <bjorn.topel at intel.com>
This series adds XDP support for i40e-based NICs.
The first patch wires up ndo_xdp and implements XDP_DROP semantics for
all actions. The second patch adds egress support via the XDP_TX
action.
Performance numbers (40GbE port, 64B packets) for xdp1 and xdp2
programs, from samples/bpf/:
IOMMU | xdp1 | xdp2
---------------------------+-----------+-----------
iommu=off | 29.7 Mpps | 17.1 Mpps
iommu=pt intel_iommu=on | 29.7 Mpps | 11.6 Mpps
iommu=on intel_iommu=on | 21.8 Mpps | 3.7 Mpps
Future improvements, not covered by the patches:
* Proper debugfs support.
* i40evf support.
Thanks to Alex, Daniel, John and Scott for all feedback!
v6:
* Addressed various cosmetic issues (reverse xmas tree formatting on
local variables, preserve function parameter ordering, qvector
mapping).
* Placed XDP Tx rings directly after Tx rings. This opened up to
various simplications in the code, since we can now treat the XDP
Tx rings as an extension of existing Tx ring space. E.g.,
i40e_set_ringparam now has smaller changeset.
* Ring allocation and setup was simplified (i40e_alloc_rings,
i40e_vsi_alloc_arrays).
v5:
* Aligned the implementation to ixgbe's XDP support: naming, favor
xchg instead of RCU semantics
* Support for XDP headroom (piggybacking on Alex' build_skb work)
* Added xdp tracepoints for exception states (as suggested by
Daniel)
v4:
* Removed unused i40e_page_is_reserved function
* Prior running the XDP program, set the struct xdp_buff
data_hard_start member
v3:
* Rebased patch set on Jeff's dev-queue branch
* MSI-X is no longer a prerequisite for XDP
* RCU locking for the XDP program and XDP_RX support is introduced
in the same patch
* Rx bytes is now bumped for XDP
* Removed pointer-to-pointer clunkiness
* Added comments to XDP preconditions in ndo_xdp
* When a non-EOF is received, log once, and drop the frame
v2:
* Fixed kbuild error for PAGE_SIZE >= 8192.
* Renamed i40e_try_flip_rx_page to i40e_can_reuse_rx_page, which is
more in line to the other Intel Ethernet drivers (igb/fm10k).
* Validate xdp_adjust_head support in ndo_xdp/XDP_SETUP_PROG.
Björn Töpel (2):
i40e: add XDP support for pass and drop actions
i40e: add support for XDP_TX action
drivers/net/ethernet/intel/i40e/i40e.h | 8 +
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 42 ++-
drivers/net/ethernet/intel/i40e/i40e_main.c | 352 ++++++++++++++++++++-----
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 244 ++++++++++++++---
drivers/net/ethernet/intel/i40e/i40e_txrx.h | 12 +
5 files changed, 553 insertions(+), 105 deletions(-)
--
2.11.0
More information about the Intel-wired-lan
mailing list