Page MenuHomeFreeBSD

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

Authored by krzysztof.galazka_intel.com on Jun 8 2021, 7:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 1:02 AM
Unknown Object (File)
Dec 10 2023, 7:56 PM
Unknown Object (File)
Oct 15 2023, 2:39 AM
Unknown Object (File)
Oct 11 2023, 6:15 PM
Unknown Object (File)
Sep 28 2023, 5:31 AM
Unknown Object (File)
Aug 20 2023, 11:27 AM
Unknown Object (File)
Aug 15 2023, 7:54 AM
Unknown Object (File)
Aug 14 2023, 8:38 PM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 39788
Build 36677: arc lint + arc unit