#
257480b8 |
| 04-Nov-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Convert netinet6/ to use new routing API.
* Remove &ifpp from ip6_output() in favor of ri->ri_nh_info * Provide different wrappers to in6_selectsrc: Currently it is used by 2 differenct type of cu
Convert netinet6/ to use new routing API.
* Remove &ifpp from ip6_output() in favor of ri->ri_nh_info * Provide different wrappers to in6_selectsrc: Currently it is used by 2 differenct type of customers: - socket-based one, which all are unsure about provided address scope and - in-kernel ones (ND code mostly), which don't have any sockets, options, crededentials, etc. So, we provide two different wrappers to in6_selectsrc() returning select source. * Make different versions of selectroute(): Currenly selectroute() is used in two scenarios: - SAS, via in6_selecsrc() -> in6_selectif() -> selectroute() - output, via in6_output -> wrapper -> selectroute() Provide different versions for each customer: - fib6_lookup_nh_basic()-based in6_selectif() which is capable of returning interface only, without MTU/NHOP/L2 calculations - full-blown fib6_selectroute() with cached route/multipath/ MTU/L2 * Stop using routing table for link-local address lookups * Add in6_ifawithifp_lla() to make for-us check faster for link-local * Add in6_splitscope / in6_setllascope for faster embed/deembed scopes
show more ...
|
#
9f65116c |
| 25-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
* Increase nh_flags to be u16 thus reducing nhop payload to be 48 bytes * Use NHF_ namespace for all nhop flags * Rename nhop_data -> nhop_prepend * Rename fib4_lookup_nh_extended -> fib4_lookup_nh_e
* Increase nh_flags to be u16 thus reducing nhop payload to be 48 bytes * Use NHF_ namespace for all nhop flags * Rename nhop_data -> nhop_prepend * Rename fib4_lookup_nh_extended -> fib4_lookup_nh_ext * Add "flags" argument to fib4_lookup_nh_ext() to specify whether we want returned nh_ext structure to be refcounted or not.
show more ...
|
#
2bb83c79 |
| 23-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Rename ip_sendmbuf to fib4_sendmbuf() and move it to rt_nhops api. Convert IPv4 SAS to use new routing api.
|
#
b4e8f808 |
| 19-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Switch IPv4 output path to use new routing api.
The goals of the new API is to provide consumers with minimal needed information, but as fast as possible. So we provide full nexthop info copied
Switch IPv4 output path to use new routing api.
The goals of the new API is to provide consumers with minimal needed information, but as fast as possible. So we provide full nexthop info copied into alighed on-cache structure instead of rte/ia pointers, their refcounts and locks. This does not provide solution for protecting from egress ifp destruction, but does not make it any worse.
Current changes:
nhops: Add fib4_lookup_prepend() function which stores either full L2+L3 prepend info (e.g. MAC header in case of plain IPv4) or L3 info with NH_FLAGS_L2_INCOMPLETE flag indicating that no valid L2 info exists and we have to take "slow" path.
ip_output: Currently ip[ 46]_output consumers use 'struct route' for the following purposes: 1) double lookup avoidance(route caching) 2) plain route caching 3) get path MTU to be able to notify source. The former pattern is mostly used by various tunnels (gif, gre, stf). (Actually, gre is the only remaining, others were already converted. Their locking model did not scale good enogh to benefit from such caching, so we have (temporarily) removed it without any performance loss). Plain route caching used by SCTP is simply wrong and should be removed. Temporary break it for now just to be able to compile. Optimize path mtu reporting by providing it in new 'route_info' stucture.
Minimize games with @ia locking/refcounting for route lookup: add special nhop[46]_extended structure to store more route attributes. Pointer to given structure can be passed to fib4_lookup_prepend() to indicate we want this info (we actually needs it for UDP and raw IP).
ether_output: Provide light-weight ether_output2() call to deal with transmitting L2 frame (e.g. properly handle broadcast/simloop/bridge/ other L2 hooks before actually transmitting frame by if_transmit()). Add a hack based on new RT_NHOP ro_flag to distinguish which version should we call. Better way is probably to add a new "if_output_frame" driver callbacks.
Next steps: * Convert ip_fastfwd part * Implement auto-growing array for per-radix nexthops * Implement LLE tracking for nexthop calculations to be able to immediately provide all necessary info in single route lookup for gateway routes * Switch radix locking scheme to runtime/cfg lock * Implement multipath support for rtsock * Implement "tracked nexthops" for tunnels (e.g. _proper_ nexthop caching) * Add IPv6 support for remaining parts (postponed not to interfere with user/ae/inet6 branch) * Consider adding "if_output_frame" driver call to ease logical frame pushing.
show more ...
|
#
2a382033 |
| 14-Oct-2014 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head@r273095
Sponsored by: The FreeBSD Foundation
|
#
f1a52b69 |
| 14-Oct-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r273066
|
#
f0cace5d |
| 12-Oct-2014 |
Robert Watson <rwatson@FreeBSD.org> |
When deciding whether to call m_pullup() even though there is adequate data in an mbuf, use M_WRITABLE() instead of a direct test of M_EXT; the latter both unnecessarily exposes mbuf-allocator intern
When deciding whether to call m_pullup() even though there is adequate data in an mbuf, use M_WRITABLE() instead of a direct test of M_EXT; the latter both unnecessarily exposes mbuf-allocator internals in the protocol stack and is also insufficient to catch all cases of non-writability.
(NB: m_pullup() does not actually guarantee that a writable mbuf is returned, so further refinement of all of these code paths continues to be required.)
Reviewed by: bz MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D900
show more ...
|
#
c81ab40b |
| 11-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Merge HEAD@r272944.
|
#
107af8f2 |
| 05-Oct-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r272481
|
#
1ce4b357 |
| 04-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r272516.
|
#
698271d8 |
| 02-Oct-2014 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head@r272414
Sponsored by: The FreeBSD Foundation
|
#
9c57a5b6 |
| 02-Oct-2014 |
Hiroki Sato <hrs@FreeBSD.org> |
Add an additional routing table lookup when m->m_pkthdr.fibnum is changed at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform a routing table lookup when the destination address was
Add an additional routing table lookup when m->m_pkthdr.fibnum is changed at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform a routing table lookup when the destination address was not changed.
CR: D805
show more ...
|
#
b6cf6c8c |
| 20-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r271887
|
#
22bfa4f5 |
| 19-Sep-2014 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove disabled code, that is very unlikely to be ever enabled again, as well as the comment that explains why is it disabled.
|
#
4e27d36d |
| 17-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r271694
|
#
58a39d8c |
| 16-Sep-2014 |
Alan Somers <asomers@FreeBSD.org> |
Fix source address selection on unbound sockets in the presence of multiple fibs. Use the mbuf's or the socket's fib instead of RT_ALL_FIBS. Fixes PR 187553. Also fixes netperf's UDP_STREAM test on a
Fix source address selection on unbound sockets in the presence of multiple fibs. Use the mbuf's or the socket's fib instead of RT_ALL_FIBS. Fixes PR 187553. Also fixes netperf's UDP_STREAM test on a nondefault fib.
sys/netinet/ip_output.c In ip_output, lookup the source address using the mbuf's fib instead of RT_ALL_FIBS.
sys/netinet/in_pcb.c in in_pcbladdr, lookup the source address using the socket's fib, because we don't seem to have the mbuf fib. They should be the same, though.
tests/sys/net/fibs_test.sh Clear the expected failure on udp_dontroute.
PR: 187553 CR: https://reviews.freebsd.org/D772 MFC after: 3 weeks Sponsored by: Spectra Logic
show more ...
|
#
4f8585e0 |
| 11-Sep-2014 |
Alan Somers <asomers@FreeBSD.org> |
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and ifa_ifwithdstaddr. For the sake of backwards compatibility, the new arguments were added to new functions named ifa_ifwithn
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and ifa_ifwithdstaddr. For the sake of backwards compatibility, the new arguments were added to new functions named ifa_ifwithnet_fib and ifa_ifwithdstaddr_fib, while the old functions became wrappers around the new ones that passed RT_ALL_FIBS for the fib argument. However, the backwards compatibility is not desired for FreeBSD 11, because there are numerous other incompatible changes to the ifnet(9) API. We therefore decided to remove it from head but leave it in place for stable/9 and stable/10. In addition, this commit adds the fib argument to ifa_ifwithbroadaddr for consistency's sake.
sys/sys/param.h Increment __FreeBSD_version
sys/net/if.c sys/net/if_var.h sys/net/route.c Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute.
sys/net/route.c sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_options.c sys/netinet/ip_output.c sys/netinet6/nd6.c Fixup calls of modified functions.
share/man/man9/ifnet.9 Document changed API.
CR: https://reviews.freebsd.org/D458 MFC after: Never Sponsored by: Spectra Logic
show more ...
|
#
9d3ddf43 |
| 09-Sep-2014 |
Adrian Chadd <adrian@FreeBSD.org> |
Add support for receiving and setting flowtype, flowid and RSS bucket information as part of recvmsg().
This is primarily used for debugging/verification of the various processing paths in the IP, P
Add support for receiving and setting flowtype, flowid and RSS bucket information as part of recvmsg().
This is primarily used for debugging/verification of the various processing paths in the IP, PCB and driver layers.
Unfortunately the current implementation of the control message path results in a ~10% or so drop in UDP frame throughput when it's used.
Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan
show more ...
|
#
061a4b4c |
| 09-Sep-2014 |
Adrian Chadd <adrian@FreeBSD.org> |
Add a flag to ip_output() - IP_NODEFAULTFLOWID - which prevents it from overriding an existing flowid/flowtype field in the outbound mbuf with the inp_flowid/inp_flowtype details.
The upcoming RSS U
Add a flag to ip_output() - IP_NODEFAULTFLOWID - which prevents it from overriding an existing flowid/flowtype field in the outbound mbuf with the inp_flowid/inp_flowtype details.
The upcoming RSS UDP support calculates a valid RSS value for outbound mbufs and since it may change per send, it doesn't cache it in the inpcb. So overriding it here would be wrong.
Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan
show more ...
|
#
c9daea0b |
| 05-Sep-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r271160.
|
#
bf7dcda3 |
| 03-Sep-2014 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Clean up unused CSUM_FRAGMENT.
Sponsored by: Nginx, Inc.
|
#
246e7a2b |
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
#
ee7b0571 |
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
#
1b833d53 |
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
Revision tags: release/9.3.0 |
|
#
0a100a6f |
| 10-Jul-2014 |
Adrian Chadd <adrian@FreeBSD.org> |
Implement the first stage of multi-bind listen sockets and RSS socket awareness.
* Introduce IP_BINDMULTI - indicating that it's okay to bind multiple sockets on the same bind details.
Although
Implement the first stage of multi-bind listen sockets and RSS socket awareness.
* Introduce IP_BINDMULTI - indicating that it's okay to bind multiple sockets on the same bind details.
Although the PCB code has been taught about this (see below) this patch doesn't introduce the rest of the PCB changes necessary to distribute lookups among multiple PCB entries in the global wildcard table.
* Introduce IP_RSS_LISTEN_BUCKET - placing an listen socket into the given RSS bucket (and thus a single PCBGROUP hash.)
* Modify the PCB add path to be aware of IP_BINDMULTI: + Only allow further PCB entries to be added if the owner credentials and IP_BINDMULTI has been specified. Ie, only allow further IP_BINDMULTI sockets to appear if the first bind() was IP_BINDMULTI.
* Teach the PCBGROUP code about IP_RSS_LISTE_BUCKET marked PCB entries. Instead of using the wildcard logic and hashing, these sockets are simply placed into the PCBGROUP and _not_ in the wildcard hash.
* When doing a PCBGROUP lookup, also do a wildcard match as well. This allows for an RSS bucket PCB entry to appear in a PCBGROUP rather than having to exist in the wildcard list.
Tested:
* TCP IPv4 server testing with igb(4) * TCP IPv4 server testing with ix(4)
TODO:
* The pcbgroup lookup code duplicated the wildcard and wildcard-PCB logic. This could be refactored into a single function.
* This doesn't yet work for IPv6 (The PCBGROUP code in netinet6/ doesn't yet know about this); nor does it yet fully work for UDP.
show more ...
|