#
92632371 |
| 27-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Prefer SYSCTL_INT over TUNABLE_INT
This driver does not need to retrieve those tunable during early boot. Meanwhile SYSCTL_INT can provide rich info such as description. Also `sysctl ne
if_vxlan(4): Prefer SYSCTL_INT over TUNABLE_INT
This driver does not need to retrieve those tunable during early boot. Meanwhile SYSCTL_INT can provide rich info such as description. Also `sysctl net.link.vxlan.[legacy_port|reuse_port]` can report the current settings.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48621
show more ...
|
#
5e0dbbc2 |
| 24-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Use static initializers
MFC after: 1 week
|
#
960c5bb0 |
| 21-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured
It is harmless but pointless to invoke vxlan_stop event handler when the interface was not previously configured. T
if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured
It is harmless but pointless to invoke vxlan_stop event handler when the interface was not previously configured. This change will also prevent an assert panic from t4_vxlan_stop_handler().
Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48494
show more ...
|
Revision tags: release/14.2.0, release/13.4.0 |
|
#
087f5e08 |
| 02-Jul-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Plug a memory leak
On clone creating, either failure from vxlan_set_user_config() or ifc_copyin() will result in leaking previous allocated counters.
Since counter_u64_alloc(M_WAITOK)
if_vxlan(4): Plug a memory leak
On clone creating, either failure from vxlan_set_user_config() or ifc_copyin() will result in leaking previous allocated counters.
Since counter_u64_alloc(M_WAITOK) never fails, make vxlan_stats_alloc() void and move the allocation for counters below checking ifd->params to avoid memory leak.
Reviewed by: kp, glebius Fixes: b092fd6c973d if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45822
show more ...
|
#
d6963b9e |
| 02-Jul-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Exclude ETHER_CRC_LEN from macro VXLAN_MAX_MTU
The encapsulated (original) frame does not count in FCS as per Section 5 of RFC 7348.
Reviewed by: afedorov, bryanv, #network Fixes: b75
if_vxlan(4): Exclude ETHER_CRC_LEN from macro VXLAN_MAX_MTU
The encapsulated (original) frame does not count in FCS as per Section 5 of RFC 7348.
Reviewed by: afedorov, bryanv, #network Fixes: b7592822d5de Allow set MTU more than 1500 bytes MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45195
show more ...
|
#
aa386085 |
| 28-Jun-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functiona
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by: kp, imp, glebius, stevek MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45740
show more ...
|
Revision tags: release/14.1.0 |
|
#
93fbfef0 |
| 20-May-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
if_vxlan(4): Add checking for loops and nesting of tunnels
User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by u
if_vxlan(4): Add checking for loops and nesting of tunnels
User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting().
PR: 278394 Diagnosed by: markj Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197
show more ...
|
Revision tags: release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0 |
|
#
2c2b37ad |
| 13-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
ifnet/API: Move struct ifnet definition to a <net/if_private.h>
Hide the ifnet structure definition, no user serviceable parts inside, it's a netstack implementation detail. Include it temporarily
ifnet/API: Move struct ifnet definition to a <net/if_private.h>
Hide the ifnet structure definition, no user serviceable parts inside, it's a netstack implementation detail. Include it temporarily in <net/if_var.h> until all drivers are updated to use the accessors exclusively.
Reviewed by: glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38046
show more ...
|
Revision tags: release/12.4.0 |
|
#
de1ea2d5 |
| 07-Oct-2022 |
Zhenlei Huang <zlei.huang@gmail.com> |
if_vxlan(4): Correct the statistic for output bytes
The vxlan interface encapsulates the Ethernet frame by prepending IP/UDP and vxlan headers. For statistics, only the payload, i.e. the encapsulate
if_vxlan(4): Correct the statistic for output bytes
The vxlan interface encapsulates the Ethernet frame by prepending IP/UDP and vxlan headers. For statistics, only the payload, i.e. the encapsulated (inner) frame should be counted.
Event: Aberdeen Hackathon 2022 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D36855
show more ...
|
#
1fc839f4 |
| 05-Oct-2022 |
Zhenlei Huang <zlei.huang@gmail.com> |
if_vxlan(4): Add missing statistic for input packets
Event: Aberdeen hackathon 2022 Reviewed by: bryanv, kp Differential Revision: https://reviews.freebsd.org/D36841
|
#
8707cb19 |
| 30-Sep-2022 |
Zhenlei Huang <zlei.huang@gmail.com> |
if_vxlan(4): Check the size of data available in mbuf before using them
PR: 261711 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D36794
|
#
91ebcbe0 |
| 22-Sep-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
if_clone: migrate some consumers to the new KPI.
Convert most of the cloner customers who require custom params to the new if_clone KPI.
Reviewed by: kp Differential Revision: https://reviews.free
if_clone: migrate some consumers to the new KPI.
Convert most of the cloner customers who require custom params to the new if_clone KPI.
Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D36636 MFC after: 2 weeks
show more ...
|
#
7f7a804a |
| 08-Jul-2022 |
Zhenlei Huang <zlei.huang@gmail.com> |
vxlan: Add support for socket ioctls SIOC[SG]TUNFIB
Submitted by: Luiz Amaral <email@luiz.eng.br> PR: 244004 Differential Revision: https://reviews.freebsd.org/D32820 MFC after: 2 weeks
|
Revision tags: release/13.1.0 |
|
#
742e7210 |
| 11-Apr-2022 |
Kristof Provost <kp@FreeBSD.org> |
udp: allow udp_tun_func_t() to indicate it did not eat the packet
Allow udp tunnel functions to indicate they have not taken ownership of the packet, and that normal UDP processing should continue.
udp: allow udp_tun_func_t() to indicate it did not eat the packet
Allow udp tunnel functions to indicate they have not taken ownership of the packet, and that normal UDP processing should continue.
This is especially useful for scenarios where the kernel has taken ownership of a socket that was originally created by userspace. It allows the tunnel function to pass through certain packets for userspace processing.
The primary user of this is if_ovpn, when it receives messages from unknown peers (which might be a new client).
Reviewed by: tuexen Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34883
show more ...
|
#
bef80a72 |
| 07-Feb-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
vxlan(4): Fix two typos in sysctl descriptions
- s/fowarding/forwarding/
MFC after: 3 days
|
#
ceaf442f |
| 06-Feb-2022 |
Aleksandr Fedorov <afedorov@FreeBSD.org> |
if_vxlan(4): Allow netmap_generic to intercept RX packets.
Netmap (generic) intercepts the if_input method to handle RX packets.
Call ifp->if_input() instead of netisr_dispatch(). Add stricter chec
if_vxlan(4): Allow netmap_generic to intercept RX packets.
Netmap (generic) intercepts the if_input method to handle RX packets.
Call ifp->if_input() instead of netisr_dispatch(). Add stricter check for incoming packet length.
This change is very useful with bhyve + vale + if_vxlan.
Reviewed by: vmaffione (mentor), kib, np, donner Approved by: vmaffione (mentor), kib, np, donner MFC after: 2 weeks Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D30638
show more ...
|
Revision tags: release/12.3.0 |
|
#
a3c2c06b |
| 06-Jun-2021 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Make LINT NOINET and NOIP kernel builds warning free.
Apply #ifdef INET or #if defined(INET6) || defined(INET) to make universe NOINET and NOIP LINT kernels warning free as well again.
|
Revision tags: release/13.0.0 |
|
#
baacf701 |
| 29-Mar-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vxlan: correct interface MTU when using hw offloads
Otherwise it breaks when offloading like checksum or TSO are used, because second (encapsulated) ip_output() processing passes fragments of the en
vxlan: correct interface MTU when using hw offloads
Otherwise it breaks when offloading like checksum or TSO are used, because second (encapsulated) ip_output() processing passes fragments of the encapsulated packet down to the hardware interface.
Diagnosed by: hselasky Reviewed by: np Sponsored by: Nvidia Networking / Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29501
show more ...
|
#
e243367b |
| 12-Feb-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
mbuf: add a way to mark flowid as calculated from the internal headers
In some settings offload might calculate hash from decapsulated packet. Reserve a bit in packet header rsstype to indicate that
mbuf: add a way to mark flowid as calculated from the internal headers
In some settings offload might calculate hash from decapsulated packet. Reserve a bit in packet header rsstype to indicate that.
Add m_adj_decap() that acts similarly to m_adj, but also either clear flowid if it is not marked as inner, or transfer it to the decapsulated header, clearing inner indicator. It depends on the internals of m_adj() that reuses the argument packet header for the result.
Use m_adj_decap() for decapsulating vxlan(4) and gif(4) input packets.
Reviewed by: ae, hselasky, np Sponsored by: Nvidia Networking / Mellanox Technologies MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28773
show more ...
|
#
994e4702 |
| 21-Dec-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
vxlan: stop checking CSUM_ENCAP_VXLAN when converting inner CSUM flags into normal, for decapsulation.
The packet, if processed at this point, was already parsed to be UDP directed to a vxlan port.
vxlan: stop checking CSUM_ENCAP_VXLAN when converting inner CSUM flags into normal, for decapsulation.
The packet, if processed at this point, was already parsed to be UDP directed to a vxlan port.
Connect-X 4+ does not provide easy method to infer which parser processed the packet, so driver cannot set the flag without a lot of efforts which are only to satisfy the formal requirements.
Reviewed by: bryanv, np Sponsored by: Mellanox Technologies/NVidia Networking Differential revision: https://reviews.freebsd.org/D27449 MFC after: 1 week
show more ...
|
Revision tags: release/12.2.0 |
|
#
610d3459 |
| 22-Oct-2020 |
Navdeep Parhar <np@FreeBSD.org> |
if_vxlan(4): csum_flags_to_inner_flags takes the tunnel protocol as a parameter.
No functional change.
|
#
b092fd6c |
| 18-Sep-2020 |
Navdeep Parhar <np@FreeBSD.org> |
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
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
show more ...
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|