freebsd-dev/sys/net
Alexander V. Chernikov b4e8f808bf 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.
2014-10-19 21:07:35 +00:00
..
bpf_buffer.c Changes to resolve races in bpfread() and catchpacket() that, at worst, 2012-12-10 16:14:44 +00:00
bpf_buffer.h
bpf_filter.c Include strings.h so that bpf_filter.c can be built in userland. 2014-03-19 13:10:25 +00:00
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c - Modify vm_page_unwire() and vm_page_enqueue() to directly accept 2014-06-16 18:15:27 +00:00
bpf_zerocopy.h
bpf.c Improve logic besides net.bpf.optimize_writers. 2014-06-11 11:27:44 +00:00
bpf.h Style: s/SYS_EVENTHANDLER_H/_SYS_EVENTHANDLER_H_/g 2013-10-28 20:32:05 +00:00
bpfdesc.h Changes to resolve races in bpfread() and catchpacket() that, at worst, 2012-12-10 16:14:44 +00:00
bridgestp.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
bridgestp.h
ethernet.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
fddi.h
firewire.h
flowtable.c Pacify gcc. 2014-03-05 02:35:15 +00:00
flowtable.h Add my copyright to flowtable. 2014-02-17 12:07:17 +00:00
ieee8023ad_lacp.c - Move L2 addr configuration for the primary port to a taskqueue. This fixes 2014-10-05 02:34:21 +00:00
ieee8023ad_lacp.h Use printb() for boolean flags in ro_opts and actor_state for LACP. 2014-10-05 02:37:01 +00:00
ieee_oui.h Bump bhyve allocation up to 20 bits to avoid 2014-05-20 02:59:13 +00:00
if_arc.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_arcsubr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_arp.h Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU 2013-07-09 09:50:15 +00:00
if_atm.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_atmsubr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_bridge.c Virtualize if_bridge(4) cloner. 2014-10-05 19:43:37 +00:00
if_bridgevar.h
if_clone.c Include necessary headers that now are available due to pollution 2013-10-28 07:29:16 +00:00
if_clone.h Style: s/SYS_EVENTHANDLER_H/_SYS_EVENTHANDLER_H_/g 2013-10-28 20:32:05 +00:00
if_dead.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_debug.c Remove ifq_drops from struct ifqueue. Now queue drops are accounted in 2014-09-19 09:01:19 +00:00
if_disc.c Virtualize if_disc(4) cloner. 2014-10-05 19:46:52 +00:00
if_dl.h Simplify filling sockaddr_dl structure for if_resolvemulti() 2014-01-18 23:24:51 +00:00
if_edsc.c Virtualize if_edsc(4). 2014-10-05 21:27:26 +00:00
if_enc.c Our packet filters use mbuf's rcvif pointer to determine incoming interface. 2014-10-07 13:31:04 +00:00
if_enc.h
if_epair.c Virtualize if_epair(4). An if_xname check for both "a" and "b" interfaces 2014-10-10 06:45:13 +00:00
if_ethersubr.c Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
if_faith.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_fddisubr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_fwsubr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_gif.c When tunneling interface is going to insert mbuf into netisr queue after stripping 2014-10-08 21:23:34 +00:00
if_gif.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_gre.c Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
if_gre.h - Virtualize interface cloner for gre(4). This fixes a panic when destroying 2014-09-21 03:56:06 +00:00
if_iso88025subr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_lagg.c - Move L2 addr configuration for the primary port to a taskqueue. This fixes 2014-10-05 02:34:21 +00:00
if_lagg.h - Move L2 addr configuration for the primary port to a taskqueue. This fixes 2014-10-05 02:34:21 +00:00
if_llatbl.c Back out r249318, r249320 and r249327 due to a heisenbug most 2013-05-06 16:42:18 +00:00
if_llatbl.h Remove include opt_ofed.h since OFED is unifdef'd. 2013-08-27 16:45:00 +00:00
if_llc.h
if_loop.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_media.c
if_media.h Introduce a procedural interface to the ifnet structure. The new 2014-06-02 17:54:39 +00:00
if_mib.c Remove ifq_drops from struct ifqueue. Now queue drops are accounted in 2014-09-19 09:01:19 +00:00
if_mib.h
if_pflog.h o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
if_pfsync.h Remove more constants related to static sysctl nodes. The MAXID constants 2014-02-25 18:44:33 +00:00
if_sppp.h
if_spppfr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_spppsubr.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_stf.c Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
if_stf.h Merge 'struct ip6protosw' and 'struct protosw' into one. Now we have 2014-08-08 01:57:15 +00:00
if_tap.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_tap.h
if_tapvar.h Revert part of an earlier patch attempt that snuck in with r240938. 2012-09-25 23:41:45 +00:00
if_tun.c Mechanically convert to if_inc_counter(). 2014-09-19 10:39:58 +00:00
if_tun.h
if_types.h Remove IPX support. 2014-03-14 02:58:48 +00:00
if_var.h Move the unconditional #include of net/ifq.h to the very end of file. 2014-09-28 17:09:40 +00:00
if_vlan_var.h Style: s/SYS_EVENTHANDLER_H/_SYS_EVENTHANDLER_H_/g 2013-10-28 20:32:05 +00:00
if_vlan.c Virtualize net.link.vlan.soft_pad. 2014-10-02 05:56:17 +00:00
if.c Finally, convert counters in struct ifnet to counter(9). 2014-09-28 08:57:07 +00:00
if.h * Add SIOCGI2C driver ioctl used to retrieve i2c info. 2014-08-29 18:02:58 +00:00
ifq.h Remove duplicate declaraton of the if_inc_counter() function after r272244. 2014-09-28 15:38:21 +00:00
iso88025.h Garbage collect long time obsoleted (or never used) stuff from routing API. 2014-03-15 06:49:32 +00:00
netisr_internal.h
netisr.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
netisr.h Update the IPv4 input path to handle reassembled frames and incoming frames 2014-09-09 04:18:20 +00:00
netmap_user.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
netmap.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
paravirt.h Update to the current version of netmap. 2014-08-16 15:00:01 +00:00
pfil.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
pfil.h Whitespace, style cleanups, and improved comments. 2013-08-24 12:03:24 +00:00
pfkeyv2.h
pfvar.h - Count global pf(4) statistics in counter(9). 2014-08-14 18:57:46 +00:00
ppp_defs.h Allow certain headers to be included more easily. 2013-05-21 21:20:10 +00:00
radix_mpath.c - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
radix_mpath.h
radix.c Free radix mask entries on main radix destroy. 2014-10-01 21:24:58 +00:00
radix.h Revert previous commit (262727) and bounce patch back to the 2014-03-04 23:55:04 +00:00
raw_cb.c vnet.h needs to be included before raw_cb.h. Now it compiles due to 2013-10-25 19:49:03 +00:00
raw_cb.h
raw_usrreq.c vnet.h needs to be included before raw_cb.h. Now it compiles due to 2013-10-25 19:49:03 +00:00
route.c Make net.add_addr_allfibs vnet-local. 2014-09-21 03:48:20 +00:00
route.h Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
rt_nhops.c Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
rt_nhops.h Switch IPv4 output path to use new routing api. 2014-10-19 21:07:35 +00:00
rtsock.c Remove ifq_drops from struct ifqueue. Now queue drops are accounted in 2014-09-19 09:01:19 +00:00
sff8436.h * Add new net/sff8436.h containing constants used to access 2014-08-21 17:54:42 +00:00
sff8472.h * Add new net/sff8436.h containing constants used to access 2014-08-21 17:54:42 +00:00
slcompress.c
slcompress.h
vnet.c Remove identical vnet sysctl handlers, and handle CTLFLAG_VNET 2014-02-07 13:47:33 +00:00
vnet.h Fixup for r261590 (vnet sysctl handlers cleanup). 2014-02-09 08:13:17 +00:00
zlib.c Juggle some internal symbols from our antique zlib (that originally came 2013-01-06 14:59:59 +00:00
zlib.h Juggle some internal symbols from our antique zlib (that originally came 2013-01-06 14:59:59 +00:00
zutil.h