Page MenuHomeFreeBSD

ixl(4): Add VxLAN HW offloads support
Needs ReviewPublic

Authored by krzysztof.galazka_intel.com on Tue, Jun 8, 7:13 AM.

Details

Summary

Enabling VXLAN HW offloads requires adding an UDP tunnel
filter. Implement handlers for VXLAN related kernel events
in iflib and ixl driver to add and remove such filters.

New handlers are responsible for managing the used udp ports list.
Changes in the list are communicated to the HW using ixl_sync_udp_filters()
function called during init or from admin task.

To manage the requested UDP ports, udp_ports array and
pending_udp_bitmap variable are added. The former keeps track of
assigned UDP port numbers, indices of filtres assigned by hardware
and flag indicating requested deletion of the filter. The latter is used
to inform ixl_sync_udp_filters() that corresponding filters should be
synchronized with hardware.

Also, new interface capabilities are added. IFCAP_VXLAN_HWCSUM and
IFCAP_VXLAN_HWTSO flags inform if_vxlan device that the hardware is
capable of computing the offloads.

This patch also introduces registration handlers and IFCAP_VXLAN_HWCSUM
and IFCAP_VXLAN_HWTSO capabilities in iflib.

VXLAN HW TX checksum offload requires informations about
outer and inner frame headers. Extend if_pkt_info structure
to store type of outer Ethernet frame and length of IP
and tunnel headers. Add to iflib parsing of inner frame headers.

Rename ixl_tso_setup function, previously used to configure
context descriptor for TSO, to ixl_ctxd_setup and use it also
to add context descriptor required for tunneled packets.

Add detection of tunneled packets in ixl_rx_checksum function
and properly interpret checksum error flags in RX descriptors.

Co-authored-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com

Test Plan

Compile-tested with minimal touch-testing. Respectfully requesting validation team to perform a test pass before committing.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 39788
Build 36677: arc lint + arc unit