aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* Introduce scalable route multipath.Alexander V. Chernikov2020-10-033-40/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is based on the nexthop objects landed in D24232. The change introduces the concept of nexthop groups. Each group contains the collection of nexthops with their relative weights and a dataplane-optimized structure to enable efficient nexthop selection. Simular to the nexthops, nexthop groups are immutable. Dataplane part gets compiled during group creation and is basically an array of nexthop pointers, compiled w.r.t their weights. With this change, `rt_nhop` field of `struct rtentry` contains either nexthop or nexthop group. They are distinguished by the presense of NHF_MULTIPATH flag. All dataplane lookup functions returns pointer to the nexthop object, leaving nexhop groups details inside routing subsystem. User-visible changes: The change is intended to be backward-compatible: all non-mpath operations should work as before with ROUTE_MPATH and net.route.multipath=1. All routes now comes with weight, default weight is 1, maximum is 2^24-1. Current maximum multipath group width is statically set to 64. This will become sysctl-tunable in the followup changes. Using functionality: * Recompile kernel with ROUTE_MPATH * set net.route.multipath to 1 route add -6 2001:db8::/32 2001:db8::2 -weight 10 route add -6 2001:db8::/32 2001:db8::3 -weight 20 netstat -6On Nexthop groups data Internet6: GrpIdx NhIdx Weight Slots Gateway Netif Refcnt 1 ------- ------- ------- --------------------------------------- --------- 1 13 10 1 2001:db8::2 vlan2 14 20 2 2001:db8::3 vlan2 Next steps: * Land outbound hashing for locally-originated routes ( D26523 ). * Fix net/bird multipath (net/frr seems to work fine) * Add ROUTE_MPATH to GENERIC * Set net.route.multipath=1 by default Tested by: olivier Reviewed by: glebius Relnotes: yes Differential Revision: https://reviews.freebsd.org/D26449 Notes: svn path=/head/; revision=366390
* Rework part of routing code to reduce difference to D26449.Alexander V. Chernikov2020-09-211-10/+15
| | | | | | | | | | | | | | * Split rt_setmetrics into get_info_weight() and rt_set_expire_info(), as these two can be applied at different entities and at different times. * Start filling route weight in route change notifications * Pass flowid to UDP/raw IP route lookups * Rework nd6_subscription_cb() and sysctl_dumpentry() to prepare for the fact that rtentry can contain multiple nexthops. Differential Revision: https://reviews.freebsd.org/D26497 Notes: svn path=/head/; revision=365973
* Remove unused nhop_ref_any() function.Alexander V. Chernikov2020-09-202-3/+0
| | | | | | | | | Remove "opt_mpath.h" header where not needed. No functional changes. Notes: svn path=/head/; revision=365930
* if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS.Navdeep Parhar2020-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=365870
* Add a knob to allow zero UDP checksums for UDP/IPv6 traffic on the given UDP ↵Navdeep Parhar2020-09-181-1/+14
| | | | | | | | | | | | | | | | | port. 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 Notes: svn path=/head/; revision=365869
* net: clean up empty lines in .c and .h filesMateusz Guzik2020-09-0120-73/+9
| | | | Notes: svn path=/head/; revision=365071
* ipv6: quit dropping packets looping back on p2p interfacesKyle Evans2020-08-311-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | To paraphrase the below-referenced PR: This logic originated in the KAME project, and was even controversial when it was enabled there by default in 2001. No such equivalent logic exists in the IPv4 stack, and it turns out that this leads to us dropping valid traffic when the "point to point" interface is actually a 1:many tun interface, e.g. with the wireguard userland stack. Even in the case of true point-to-point links, this logic only avoids transient looping of packets sent by misconfigured applications or attackers, which can be subverted by proper route configuration rather than hardcoded logic in the kernel to drop packets. In the review, melifaro goes on to note that the kernel can't fix it, so it perhaps shouldn't try to be 'smart' about it. Additionally, that TTL will still kick in even with incorrect route configuration. PR: 247718 Reviewed by: melifaro, rgrimes MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25567 Notes: svn path=/head/; revision=364982
* Move net/route/shared.h definitions to net/route/route_var.h.Alexander V. Chernikov2020-08-282-2/+0
| | | | | | | | | | | | | | | | No functional changes. net/route/shared.h was created in the inital phases of nexthop conversion. It was intended to serve the same purpose as route_var.h - share definitions of functions and structures between the routing subsystem components. At that time route_var.h was included by many files external to the routing subsystem, which largerly defeats its purpose. As currently this is not the case anymore and amount of route_var.h includes is roughly the same as shared.h, retire the latter in favour of the former. Notes: svn path=/head/; revision=364941
* Make net.inet6.ip6.deembed_scopeid behaviour default & remove sysctl.Alexander V. Chernikov2020-08-153-9/+1
| | | | | | | | Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25637 Notes: svn path=/head/; revision=364250
* Simplify dom_<rtattach|rtdetach>.Alexander V. Chernikov2020-08-143-21/+11
| | | | | | | | | | | | | | Remove unused arguments from dom_rtattach/dom_rtdetach functions and make them return/accept 'struct rib_head' instead of 'void **'. Declare inet/inet6 implementations in the relevant _var.h headers similar to domifattach / domifdetach. Add rib_subscribe_internal() function to accept subscriptions to the rnh directly. Differential Revision: https://reviews.freebsd.org/D26053 Notes: svn path=/head/; revision=364238
* Use a static initializer for the multicast free tasks.Hans Petter Selasky2020-08-111-8/+1
| | | | | | | | | | | This makes the SYSINIT() function updated in r364072 superfluous. Suggested by: glebius@ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=364102
* Fix rib_subscribe() waitok flag by performing allocation outside epoch.Alexander V. Chernikov2020-08-111-7/+4
| | | | | | | | | | Make in6_inithead() use rib_subscribe with waitok to achieve reliable subscription allocation. Reviewed by: glebius Notes: svn path=/head/; revision=364099
* MC: add a note with reference to the discussion and history as-to why weBjoern A. Zeeb2020-08-101-0/+1
| | | | | | | | | | are where we are now. The main thing is to try to get rid of the delayed freeing to avoid blocking on the taskq when shutting down vnets. X-Timeout: if you still see this before 14-RELEASE remove it. Notes: svn path=/head/; revision=364075
* Make sure the multicast release tasks are properly drained whenHans Petter Selasky2020-08-103-3/+11
| | | | | | | | | | | | | | | | destroying a VNET or a network interface. Else the inm release tasks, both IPv4 and IPv6 may cause a panic accessing a freed VNET or network interface. Reviewed by: jmg@ Discussed with: bz@ Differential Revision: https://reviews.freebsd.org/D24914 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=364073
* Use proper prototype for SYSINIT() functions.Hans Petter Selasky2020-08-101-1/+1
| | | | | | | | | | | Mark the unused argument using the __unused macro. Discussed with: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=364072
* IPV6_PKTINFO support for v4-mapped IPv6 socketsBjoern A. Zeeb2020-08-071-1/+1
| | | | | | | | | | | | | | | | When using v4-mapped IPv6 sockets with IPV6_PKTINFO we do not respect the given v4-mapped src address on the IPv4 socket. Implement the needed functionality. This allows single-socket UDP applications (such as OpenVPN) to work better on FreeBSD. Requested by: Gert Doering (gert greenie.net), pfsense Tested by: Gert Doering (gert greenie.net) Reviewed by: melifaro MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24135 Notes: svn path=/head/; revision=364018
* Fix typo.Andrey V. Elsukov2020-08-051-1/+1
| | | | | | | | | Submitted by: Evgeniy Khramtsov <evgeniy at khramtsov org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25932 Notes: svn path=/head/; revision=363900
* Remove an incorrect assertion from in6p_lookup_mcast_ifp().Mark Johnston2020-08-041-9/+5
| | | | | | | | | | | | | | | | The socket may be bound to an IPv4-mapped IPv6 address. However, the inp address is not relevant to the JOIN_GROUP or LEAVE_GROUP operations. While here remove an unnecessary check for inp == NULL. Reported by: syzbot+d01ab3d5e6c1516a393c@syzkaller.appspotmail.com Reviewed by: hselasky MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25888 Notes: svn path=/head/; revision=363841
* ip6_output(): Check the return value of in6_getlinkifnet().Mark Johnston2020-07-301-0/+4
| | | | | | | | | | | | | | | If the destination address has an embedded scope ID, make sure that it corresponds to a valid ifnet before proceeding. Otherwise a sendto() with a bogus link-local address can trigger a NULL pointer dereference. Reported by: syzkaller Reviewed by: ae Fixes: r358572 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25887 Notes: svn path=/head/; revision=363710
* Transition from rtrequest1_fib() to rib_action().Alexander V. Chernikov2020-07-214-37/+48
| | | | | | | | | | | | Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). This is part of the new routing KPI. Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25546 Notes: svn path=/head/; revision=363403
* Temporarly revert r363319 to unbreak the build.Alexander V. Chernikov2020-07-194-48/+37
| | | | | | | | Reported by: CI Pointy hat to: melifaro Notes: svn path=/head/; revision=363320
* Transition from rtrequest1_fib() to rib_action().Alexander V. Chernikov2020-07-194-37/+48
| | | | | | | | | | | | Remove all variations of rtrequest <rtrequest1_fib, rtrequest_fib, in6_rtrequest, rtrequest_fib> and their uses and switch to to rib_action(). This is part of the new routing KPI. Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25546 Notes: svn path=/head/; revision=363319
* Switch inet6 default route subscription to the new rib subscription api.Alexander V. Chernikov2020-07-124-29/+20
| | | | | | | | | | | Old subscription model allowed only single customer. Switch inet6 to the new subscription api and eliminate the old model. Differential Revision: https://reviews.freebsd.org/D25615 Notes: svn path=/head/; revision=363128
* Fix IPv6 regression introduced by r362900.Alexander V. Chernikov2020-07-031-1/+1
| | | | | | | PR: kern/247729 Notes: svn path=/head/; revision=362909
* Complete conversions from fib<4|6>_lookup_nh_<basic|ext> to fib<4|6>_lookup().Alexander V. Chernikov2020-07-026-226/+23
| | | | | | | | | | | | | fib[46]_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. With no callers remaining, remove fib[46]_lookup_nh_ functions. Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25445 Notes: svn path=/head/; revision=362900
* Add the SCTP_SUPPORT kernel option.Mark Johnston2020-06-183-7/+7
| | | | | | | | | | | | | This is in preparation for enabling a loadable SCTP stack. Analogous to IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured in order to support a loadable SCTP implementation. Discussed with: tuexen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=362338
* Retire SCTP_SO_LOCK_TESTING.Michael Tuexen2020-06-071-14/+0
| | | | | | | | | | | | This was intended to test the locking used in the MacOS X kernel on a FreeBSD system, to make use of WITNESS and other debugging infrastructure. This hasn't been used for ages, to take it out to reduce the #ifdef complexity. MFC after: 1 week Notes: svn path=/head/; revision=361895
* Fix typo in previous commitRyan Moeller2020-06-031-1/+1
| | | | | | | | | | | Applied the wrong patch Reported by: Michael Butler <imb@protected-networks.net> Approved by: mav (mentor) Sponsored by: iXsystems.com Notes: svn path=/head/; revision=361757
* scope6: Check for NULL afdata before dereferencingRyan Moeller2020-06-031-0/+4
| | | | | | | | | | | | Narrows the race window with if_detach. Approved by: mav (mentor) MFC after: 3 days Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25017 Notes: svn path=/head/; revision=361756
* * Add rib_<add|del|change>_route() functions to manipulate the routing table.Alexander V. Chernikov2020-06-013-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main driver for the change is the need to improve notification mechanism. Currently callers guess the operation data based on the rtentry structure returned in case of successful operation result. There are two problems with this appoach. First is that it doesn't provide enough information for the upcoming multipath changes, where rtentry refers to a new nexthop group, and there is no way of guessing which paths were added during the change. Second is that some rtentry fields can change during notification and protecting from it by requiring customers to unlock rtentry is not desired. Additionally, as the consumers such as rtsock do know which operation they request in advance, making explicit add/change/del versions of the functions makes sense, especially given the functions don't share a lot of code. With that in mind, introduce rib_cmd_info notification structure and rib_<add|del|change>_route() functions, with mandatory rib_cmd_info pointer. It will be used in upcoming generalized notifications. * Move definitions of the new functions and some other functions/structures used for the routing table manipulation to a separate header file, net/route/route_ctl.h. net/route.h is a frequently used file included in ~140 places in kernel, and 90% of the users don't need these definitions. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D25067 Notes: svn path=/head/; revision=361706
* Revert r361704, it accidentally committed merged D25067 and D25070.Alexander V. Chernikov2020-06-013-3/+0
| | | | Notes: svn path=/head/; revision=361705
* * Add rib_<add|del|change>_route() functions to manipulate the routing table.Alexander V. Chernikov2020-06-013-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main driver for the change is the need to improve notification mechanism. Currently callers guess the operation data based on the rtentry structure returned in case of successful operation result. There are two problems with this appoach. First is that it doesn't provide enough information for the upcoming multipath changes, where rtentry refers to a new nexthop group, and there is no way of guessing which paths were added during the change. Second is that some rtentry fields can change during notification and protecting from it by requiring customers to unlock rtentry is not desired. Additionally, as the consumers such as rtsock do know which operation they request in advance, making explicit add/change/del versions of the functions makes sense, especially given the functions don't share a lot of code. With that in mind, introduce rib_cmd_info notification structure and rib_<add|del|change>_route() functions, with mandatory rib_cmd_info pointer. It will be used in upcoming generalized notifications. * Move definitions of the new functions and some other functions/structures used for the routing table manipulation to a separate header file, net/route/route_ctl.h. net/route.h is a frequently used file included in ~140 places in kernel, and 90% of the users don't need these definitions. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D25067 Notes: svn path=/head/; revision=361704
* Use fib[46]_lookup() in mtu calculations.Alexander V. Chernikov2020-05-281-0/+2
| | | | | | | | | | | | | | | fib[46]_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. Conversion is straight-forwarded, as the only 2 differences are requirement of running in network epoch and the need to handle RTF_GATEWAY case in the caller code. Differential Revision: https://reviews.freebsd.org/D24974 Notes: svn path=/head/; revision=361576
* Replace ip6_ouput fib6_lookup_nh_<ext|basic> calls with fib6_lookup().Alexander V. Chernikov2020-05-281-23/+23
| | | | | | | | | | | | | | | | fib6_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. Conversion is straight-forwarded, as the only 2 differences are requirement of running in network epoch and the need to handle RTF_GATEWAY case in the caller code. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D24973 Notes: svn path=/head/; revision=361573
* Switch gif(4) path verification to fib[46]_check_urfp().Alexander V. Chernikov2020-05-281-7/+3
| | | | | | | | | | | | | | fibX_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. Use specialized fib[46]_check_urpf() from newer KPI instead, to allow removal of older KPI. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D24978 Notes: svn path=/head/; revision=361572
* Move <add|del|change>_route() functions to route_ctl.c in preparation ofAlexander V. Chernikov2020-05-231-1/+0
| | | | | | | | | | | | | | | multipath control plane changed described in D24141. Currently route.c contains core routing init/teardown functions, route table manipulation functions and various helper functions, resulting in >2KLOC file in total. This change moves most of the route table manipulation parts to a dedicated file, simplifying planned multipath changes and making route.c more manageable. Differential Revision: https://reviews.freebsd.org/D24870 Notes: svn path=/head/; revision=361421
* Use epoch(9) for rtentries to simplify control plane operations.Alexander V. Chernikov2020-05-232-15/+18
| | | | | | | | | | | | | | | | | | Currently the only reason of refcounting rtentries is the need to report the rtable operation details immediately after the execution. Delaying rtentry reclamation allows to stop refcounting and simplify the code. Additionally, this change allows to reimplement rib_lookup_info(), which is used by some of the customers to get the matching prefix along with nexthops, in more efficient way. The change keeps per-vnet rtzone uma zone. It adds nh_vnet field to nhop_priv to be able to reliably set curvnet even during vnet teardown. Rest of the reference counting code will be removed in the D24867 . Differential Revision: https://reviews.freebsd.org/D24866 Notes: svn path=/head/; revision=361409
* Allow TCP to reuse local port with different destinationsMike Karels2020-05-182-10/+25
| | | | | | | | | | | | | | | | Previously, tcp_connect() would bind a local port before connecting, forcing the local port to be unique across all outgoing TCP connections for the address family. Instead, choose a local port after selecting the destination and the local address, requiring only that the tuple is unique and does not match a wildcard binding. Reviewed by: tuexen (rscheff, rrs previous version) MFC after: 1 month Sponsored by: Forcepoint LLC Differential Revision: https://reviews.freebsd.org/D24781 Notes: svn path=/head/; revision=361228
* IPv6: Fix a panic in the nd6 code with unmapped mbufs.Andrew Gallatin2020-05-121-3/+21
| | | | | | | | | | | | | | | | | | If the neighbor entry for an IPv6 TCP session using unmapped mbufs times out, IPv6 will send an icmp6 dest. unreachable message. In doing this, it will try to do a software checksum on the reflected packet. If this is a TCP session using unmapped mbufs, then there will be a kernel panic. To fix this, just free packets with unmapped mbufs, rather than sending the icmp. Reviewed by: np, rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D24821 Notes: svn path=/head/; revision=360982
* IPv6: sync IP_NO_SND_TAG_RL support from IPv4Andrew Gallatin2020-05-121-4/+11
| | | | | | | | | | | | | | | | The IP_NO_SND_TAG_RL flag to ip{,6}_output() means that the packets being sent should bypass hardware rate limiting. This is typically used by modern TCP stacks for rexmits. This support was added to IPv4 in r352657, but never added to IPv6, even though rack and bbr call ip6_output() with this flag. Reviewed by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D24822 Notes: svn path=/head/; revision=360961
* Fix the buildAndrew Gallatin2020-05-111-4/+0
| | | | | | | | | | | Back out the IPv6 portion of r360903, as the stamp_tag param is apparently not supported in upstream FreeBSD. Sponsored by: Netflix Pointy hat to: gallatin Notes: svn path=/head/; revision=360930
* Ktls: never skip stamping tags for NIC TLSAndrew Gallatin2020-05-111-0/+4
| | | | | | | | | | | | | | | | | | | The newer RACK and BBR TCP stacks have added a mechanism to disable hardware packet pacing for TCP retransmits. This mechanism works by skipping the send-tag stamp on rate-limited connections when the TCP stack calls ip_output() with the IP_NO_SND_TAG_RL flag set. When doing NIC TLS, we must ignore this flag, as NIC TLS packets must always be stamped. Failure to stamp a NIC TLS packet will result in crypto issues. Reviewed by: hselasky, rrs Sponsored by: Netflix, Mellanox Notes: svn path=/head/; revision=360914
* Remove now-unused rt_ifp,rt_ifa,rt_gateway,rt_mtu rte fields.Alexander V. Chernikov2020-05-041-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | After converting routing subsystem customers to use nexthop objects defined in r359823, some fields in struct rtentry became unused. This commit removes rt_ifp, rt_ifa, rt_gateway and rt_mtu from struct rtentry along with the code initializing and updating these fields. Cleanup of the remaining fields will be addressed by D24669. This commit also changes the implementation of the RTM_CHANGE handling. Old implementation tried to perform the whole operation under radix WLOCK, resulting in slow performance and hacks like using RTF_RNH_LOCKED flag. New implementation looks up the route nexthop under radix RLOCK, creates new nexthop and tries to update rte nhop pointer. Only last part is done under WLOCK. In the hypothetical scenarious where multiple rtsock clients repeatedly issue RTM_CHANGE requests for the same route, route may get updated between read and update operation. This is addressed by retrying the operation multiple (3) times before returning failure back to the caller. Differential Revision: https://reviews.freebsd.org/D24666 Notes: svn path=/head/; revision=360629
* Step 3: anonymize struct mbuf_ext_pgs and move all its fields into mbufGleb Smirnoff2020-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | within m_epg namespace. All edits except the 'struct mbuf' declaration and mb_dupcl() were done mechanically with sed: s/->m_ext_pgs.nrdy/->m_epg_nrdy/g s/->m_ext_pgs.hdr_len/->m_epg_hdrlen/g s/->m_ext_pgs.trail_len/->m_epg_trllen/g s/->m_ext_pgs.first_pg_off/->m_epg_1st_off/g s/->m_ext_pgs.last_pg_len/->m_epg_last_len/g s/->m_ext_pgs.flags/->m_epg_flags/g s/->m_ext_pgs.record_type/->m_epg_record_type/g s/->m_ext_pgs.enc_cnt/->m_epg_enc_cnt/g s/->m_ext_pgs.tls/->m_epg_tls/g s/->m_ext_pgs.so/->m_epg_so/g s/->m_ext_pgs.seqno/->m_epg_seqno/g s/->m_ext_pgs.stailq/->m_epg_stailq/g Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D24598 Notes: svn path=/head/; revision=360579
* Add nhop to the ifa_rtrequest() callback.Alexander V. Chernikov2020-04-291-4/+4
| | | | | | | | | | | | | With the upcoming multipath changes described in D24141, rt->rt_nhop can potentially point to a nexthop group instead of an individual nhop. To simplify caller handling of such cases, change ifa_rtrequest() callback to pass changed nhop directly. Differential Revision: https://reviews.freebsd.org/D24604 Notes: svn path=/head/; revision=360475
* Move route_temporal.c and route_var.h to net/route.Alexander V. Chernikov2020-04-284-4/+4
| | | | | | | | | | | | Nexthop objects implementation, defined in r359823, introduced sys/net/route directory intended to hold all routing-related code. Move recently-introduced route_temporal.c and private route_var.h header there. Differential Revision: https://reviews.freebsd.org/D24597 Notes: svn path=/head/; revision=360449
* Move struct rtentry definition to nhop_var.h.Alexander V. Chernikov2020-04-281-0/+1
| | | | | | | | | | | | | | | One of the goals of the new routing KPI defined in r359823 is to entirely hide`struct rtentry` from the consumers. It will allow to improve routing subsystem internals and deliver features much faster. This is one of the last changes, effectively moving struct rtentry definition to a net/route_var.h header, internal to the routing subsystem. Differential Revision: https://reviews.freebsd.org/D24580 Notes: svn path=/head/; revision=360447
* Eliminate now-unused parts of old routing KPI.Alexander V. Chernikov2020-04-282-23/+0
| | | | | | | | | | | | r360292 switched most of the remaining routing customers to a new KPI, leaving a bunch of wrappers for old routing lookup functions unused. Remove them from the tree as a part of routing cleanup. Differential Revision: https://reviews.freebsd.org/D24569 Notes: svn path=/head/; revision=360430
* Convert debugnet to the new routing KPI.Alexander V. Chernikov2020-04-262-0/+43
| | | | | | | | | | | | | | | | Introduce new fib[46]_lookup_debugnet() functions serving as a special interface for the crash-time operations. Underlying implementation will try to return lookup result if datastructures are not corrupted, avoding locking. Convert debugnet to use fib4_lookup_debugnet() and switch it to use nexthops instead of rtentries. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D24555 Notes: svn path=/head/; revision=360349
* Fix IPv6 link-local operations with RADIX_MPATH.Alexander V. Chernikov2020-04-261-8/+1
| | | | | | | | | | | It was broken by r360292 as fib6_lookup() assumes de-embedded addresses while rtalloc_mpath_fib() requires sockaddr with embedded ones. New fib6_lookup() transparently supports multipath, hence remove old RADIX_MPATH condition. Notes: svn path=/head/; revision=360348