b4e8f808bf
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. |
||
---|---|---|
.. | ||
bpf_buffer.c | ||
bpf_buffer.h | ||
bpf_filter.c | ||
bpf_jitter.c | ||
bpf_jitter.h | ||
bpf_zerocopy.c | ||
bpf_zerocopy.h | ||
bpf.c | ||
bpf.h | ||
bpfdesc.h | ||
bridgestp.c | ||
bridgestp.h | ||
ethernet.h | ||
fddi.h | ||
firewire.h | ||
flowtable.c | ||
flowtable.h | ||
ieee8023ad_lacp.c | ||
ieee8023ad_lacp.h | ||
ieee_oui.h | ||
if_arc.h | ||
if_arcsubr.c | ||
if_arp.h | ||
if_atm.h | ||
if_atmsubr.c | ||
if_bridge.c | ||
if_bridgevar.h | ||
if_clone.c | ||
if_clone.h | ||
if_dead.c | ||
if_debug.c | ||
if_disc.c | ||
if_dl.h | ||
if_edsc.c | ||
if_enc.c | ||
if_enc.h | ||
if_epair.c | ||
if_ethersubr.c | ||
if_faith.c | ||
if_fddisubr.c | ||
if_fwsubr.c | ||
if_gif.c | ||
if_gif.h | ||
if_gre.c | ||
if_gre.h | ||
if_iso88025subr.c | ||
if_lagg.c | ||
if_lagg.h | ||
if_llatbl.c | ||
if_llatbl.h | ||
if_llc.h | ||
if_loop.c | ||
if_media.c | ||
if_media.h | ||
if_mib.c | ||
if_mib.h | ||
if_pflog.h | ||
if_pfsync.h | ||
if_sppp.h | ||
if_spppfr.c | ||
if_spppsubr.c | ||
if_stf.c | ||
if_stf.h | ||
if_tap.c | ||
if_tap.h | ||
if_tapvar.h | ||
if_tun.c | ||
if_tun.h | ||
if_types.h | ||
if_var.h | ||
if_vlan_var.h | ||
if_vlan.c | ||
if.c | ||
if.h | ||
ifq.h | ||
iso88025.h | ||
netisr_internal.h | ||
netisr.c | ||
netisr.h | ||
netmap_user.h | ||
netmap.h | ||
paravirt.h | ||
pfil.c | ||
pfil.h | ||
pfkeyv2.h | ||
pfvar.h | ||
ppp_defs.h | ||
radix_mpath.c | ||
radix_mpath.h | ||
radix.c | ||
radix.h | ||
raw_cb.c | ||
raw_cb.h | ||
raw_usrreq.c | ||
route.c | ||
route.h | ||
rt_nhops.c | ||
rt_nhops.h | ||
rtsock.c | ||
sff8436.h | ||
sff8472.h | ||
slcompress.c | ||
slcompress.h | ||
vnet.c | ||
vnet.h | ||
zlib.c | ||
zlib.h | ||
zutil.h |