r365870 np Sept. 18, 2020, 2:37 a.m.
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
ViewVC
r365869 np Sept. 18, 2020, 2:21 a.m.
This will be used by some upcoming changes to if_vxlan(4).  RFC 7348 (VXLAN)
says that the UDP checksum "SHOULD be transmitted as zero.  When a packet is
received with a UDP checksum of zero, it MUST be accepted for decapsulation."
But the original IPv6 RFCs did not allow zero UDP checksum.  RFC 6935 attempts
to resolve this.

Reviewed by:	kib@
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D25873
ViewVC
r365868 np Sept. 18, 2020, 2:10 a.m.
These are similar to the existing VLAN capabilities.

Reviewed by:	kib@
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D25873
ViewVC
r365867 np Sept. 18, 2020, 1:38 a.m.
These are being added to support VXLAN but will work for GENEVE as well.
ENCAP_RSVD1 will likely become ENCAP_GENEVE in the future.

The size of struct mbuf does not change and that means this change can be MFC'd.
If size wasn't a constraint a cleaner way may have been to add inner_csum_flags
and inner_csum_data to go with csum_flags and csum_data.

Reviewed by:	kib@
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D25873
ViewVC
r365863 kib Sept. 17, 2020, 10:29 p.m.
Submitted by:	Dmitry Afanasiev
PR:	249378
MFC after:	3 days
ViewVC
r365861 np Sept. 17, 2020, 10:14 p.m.
Obtained from:	Chelsio Communications
MFC after:	3 days
Sponsored by:	Chelsio Communications
ViewVC
r365859 gbe Sept. 17, 2020, 9:24 p.m.
- no blank before trailing delimiter

MFC after:	3 days
ViewVC
r365858 gbe Sept. 17, 2020, 9:08 p.m.
- whitespace at end of input line
- skipping paragraph macro: Pp after Sh

MFC after:	3 days
ViewVC
r365857 gbe Sept. 17, 2020, 8:55 p.m.
- whitespace at end of input line

MFC after:	3 days
ViewVC
r365856 gbe Sept. 17, 2020, 8:53 p.m.
- whitespace at end of input line
- no blank before trailing delimiter: Dv MJUM16BYTES

MFC after:	3 days
ViewVC
r365855 gbe Sept. 17, 2020, 8:50 p.m.
MFC after:	3 days
ViewVC
r365854 gbe Sept. 17, 2020, 8:42 p.m.
MFC after:	3 days
ViewVC
r365853 gbe Sept. 17, 2020, 8:37 p.m.
- new sentence, new line
- whitespace at end of input line

MFC after:	3 days
ViewVC
r365852 kevans Sept. 17, 2020, 8:35 p.m.
As of r365829, any given base distribution set will now include the /etc/ssl
symlinks that this rehash would've otherwise installed. This extra step is
no longer required.

MFC after:	1 week
X-MFC-With:	r365837
ViewVC
r365851 gbe Sept. 17, 2020, 8:32 p.m.
- new sentence, new line

MFC after:	3 days
ViewVC