freebsd-skq/sys
Navdeep Parhar b092fd6c97 if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS.
This lets a VXLAN pseudo-interface take advantage of hardware checksumming (tx
and rx), TSO, and RSS if the NIC is capable of performing these operations on
inner VXLAN traffic.

A VXLAN interface inherits the capabilities of its vxlandev interface if one is
specified or of the interface that hosts the vxlanlocal address. If other
interfaces will carry traffic for that VXLAN then they must have the same
hardware capabilities.

On transmit, if_vxlan verifies that the outbound interface has the required
capabilities and then translates the CSUM_ flags to their inner equivalents.
This tells the hardware ifnet that it needs to operate on the inner frame and
not the outer VXLAN headers.

An event is generated when a VXLAN ifnet starts. This allows hardware drivers to
configure their devices to expect VXLAN traffic on the specified incoming port.

On receive, the hardware does RSS and checksum verification on the inner frame.
if_vxlan now does a direct netisr dispatch to take full advantage of RSS. It is
not very clear why it didn't do this already.

Future work:
Rx: it should be possible to avoid the first trip up the protocol stack to get
the frame to if_vxlan just so it can decapsulate and requeue for a second trip
up the stack. The hardware NIC driver could directly call an if_vxlan receive
routine for VXLAN traffic instead.

Rx: LRO. depends on what happens with the previous item. There will have to to
be a mechanism to indicate that it's time for if_vxlan to flush its LRO state.

Reviewed by:	kib@
Relnotes:	Yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D25873
2020-09-18 02:37:57 +00:00
..
amd64 Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
arm Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
arm64 Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
bsm
cam mmc_da: universally use uint8_t for the partition index 2020-09-08 06:19:23 +00:00
cddl dtrace: fix fbt return probes on RISC-V 2020-09-11 09:15:49 +00:00
compat Reduce code duplication by introducing linux_copyout_sockaddr() 2020-09-17 12:14:24 +00:00
conf cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0. 2020-09-17 22:14:11 +00:00
contrib Do not copy vp into f_data for DTYPE_VNODE files. 2020-09-15 21:55:21 +00:00
crypto Don't return errors from the cryptodev_process() method. 2020-09-08 22:41:35 +00:00
ddb ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
dev cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0. 2020-09-17 22:14:11 +00:00
dts
fs tmpfs: restore atime updates for reads from page cache. 2020-09-16 21:28:18 +00:00
gdb
geom geom_part: make it possible recovering broken GPT after some LBAs cut off 2020-09-17 04:39:39 +00:00
gnu
i386 Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
isa
kern Move to a more robust and conservative alloation scheme for devctl messages 2020-09-17 17:29:33 +00:00
kgssapi State kgssapi dependency on xdr. 2020-09-17 22:29:38 +00:00
libkern arm64: check for CRC32 support via HWCAP 2020-09-08 15:39:19 +00:00
mips Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
modules cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0. 2020-09-17 22:14:11 +00:00
net if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS. 2020-09-18 02:37:57 +00:00
net80211 net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
netgraph ng_ether: Enter NET_EPOCH where required 2020-09-02 11:49:22 +00:00
netinet if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS. 2020-09-18 02:37:57 +00:00
netinet6 if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS. 2020-09-18 02:37:57 +00:00
netipsec net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
netpfil net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
netsmb net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
nfs nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
nfsclient nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
nfsserver nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
nlm nlm: clean up empty lines in .c and .h files 2020-09-01 22:14:52 +00:00
ofed
opencrypto Include sys/types.h here 2020-09-15 15:21:29 +00:00
powerpc Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
riscv Get rid of sv_errtbl and SV_ABI_ERRNO(). 2020-09-17 11:39:33 +00:00
rpc Fix a potential memory leak in the NFS over TLS handling code. 2020-09-05 00:50:52 +00:00
security mac_framework.h: fix build with DEBUG_VFS_LOCKS and !MAC 2020-09-03 20:30:52 +00:00
sys mbuf checksum flags and fields to support tunneling protocols. 2020-09-18 01:38:47 +00:00
teken
tests Add small tool to invoke kernel test framework tests. 2020-09-02 09:20:40 +00:00
tools
ufs Convert page cache read to VOP. 2020-09-15 22:06:36 +00:00
vm Increase the default vm.max_user_wired value. 2020-09-17 16:49:28 +00:00
x86 Refine the busdma template interface. Provide tools for filling in fields 2020-09-14 05:58:12 +00:00
xdr xdr: clean up empty lines in .c and .h files 2020-09-01 22:13:28 +00:00
xen xen: clean up empty lines in .c and .h files 2020-09-01 21:21:55 +00:00
Makefile