NetBSD/sys/netinet
dyoung 60149b1ce8 Work in progress: use a raw socket for GRE in IP encapsulation
instead of adding/subtracting our own IPv4 header.

There are many benefits:  gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code.  The IP
stack needn't grok GRE, so it is simplified, too.  gre(4) will
benefit from optimizations in the socket code.  Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.

There is a small performance loss.  A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code.  TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code.  A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.

I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use.  They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.

A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.

Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
2007-10-05 03:28:12 +00:00
..
Makefile Work in progress: use a raw socket for GRE in IP encapsulation 2007-10-05 03:28:12 +00:00
files.ipfilter
files.netinet Remove obsolete files netinet/in_route.[ch]. 2007-05-02 22:39:03 +00:00
icmp6.h
icmp_var.h
if_arp.c We cannot sleep in a software interrupt, so do not sockaddr_dl_alloc(..., 2007-09-02 19:42:21 +00:00
if_atm.c We cannot sleep in a software interrupt, so do not sockaddr_dl_alloc(..., 2007-09-05 05:29:35 +00:00
if_atm.h
if_ether.h
if_inarp.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
igmp.c Get rid of some gratuitous casts and join some lines. 2007-04-25 00:11:18 +00:00
igmp.h
igmp_var.h
in.c Use ifreq_setaddr(), ifreq_getaddr(), sockaddr_in_init(), and 2007-09-01 04:32:50 +00:00
in.h 1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that 2007-09-19 04:33:42 +00:00
in4_cksum.c Pass (char *) to mtod(9) on address calculation. 2007-03-04 10:53:32 +00:00
in_cksum.c
in_gif.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in_gif.h
in_ifattach.h
in_offload.c Constify. 2007-04-24 23:43:50 +00:00
in_offload.h Constify. 2007-04-24 23:43:50 +00:00
in_pcb.c Use sockaddr_in_init(). 2007-08-21 08:34:33 +00:00
in_pcb.h 1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that 2007-09-19 04:33:42 +00:00
in_pcb_hdr.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
in_proto.c Work in progress: use a raw socket for GRE in IP encapsulation 2007-10-05 03:28:12 +00:00
in_proto.h
in_selsrc.c
in_selsrc.h
in_systm.h
in_var.h Use ifreq_setaddr(), ifreq_getaddr(), sockaddr_in_init(), and 2007-09-01 04:32:50 +00:00
ip.h
ip6.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ip_carp.c Constify sockaddr argument to ether_multiaddr(). Change struct 2007-09-19 05:25:33 +00:00
ip_carp.h
ip_ecn.c
ip_ecn.h
ip_encap.c Use LIST_FOREACH(). 2007-06-13 04:55:25 +00:00
ip_encap.h
ip_etherip.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
ip_etherip.h
ip_flow.c Don't call rtcache_check() from the fast-forward code, which runs 2007-08-20 19:42:34 +00:00
ip_icmp.c Cosmetic: 0 -> NULL. Remove unnecessary cast. 2007-08-27 05:39:44 +00:00
ip_icmp.h
ip_id.c
ip_input.c Delete the unused second argument to ip_stripoptions(), move it 2007-10-02 20:35:04 +00:00
ip_mroute.c m_copym(..., 0, M_COPYALL, ...) -> m_copypacket(..., ...). 2007-09-02 07:18:55 +00:00
ip_mroute.h Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
ip_output.c 1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that 2007-09-19 04:33:42 +00:00
ip_var.h Delete the unused second argument to ip_stripoptions(), move it 2007-10-02 20:35:04 +00:00
pim.h
pim_var.h
raw_ip.c 1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that 2007-09-19 04:33:42 +00:00
tcp.h TCP socket buffers automatic sizing - ported from FreeBSD. 2007-08-02 02:42:40 +00:00
tcp_congctl.c Replace a simple lock with a mutex and make it static. 2007-07-11 21:34:16 +00:00
tcp_congctl.h
tcp_debug.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tcp_debug.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tcp_fsm.h
tcp_input.c our tcp timestamps are in PR_SLOWHZ, not HZ. 2007-08-02 13:06:30 +00:00
tcp_output.c m_copy() was deprecated, apparently, long ago. m_copy(...) -> 2007-09-02 03:12:23 +00:00
tcp_sack.c Pass an ipl argument to pool_init/POOL_INIT to be used when initializing 2007-03-12 18:18:22 +00:00
tcp_seq.h
tcp_subr.c TCP socket buffers automatic sizing - ported from FreeBSD. 2007-08-02 02:42:40 +00:00
tcp_timer.c - per socket keepalive settings 2007-06-20 15:29:17 +00:00
tcp_timer.h - per socket keepalive settings 2007-06-20 15:29:17 +00:00
tcp_usrreq.c 1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that 2007-09-19 04:33:42 +00:00
tcp_var.h TCP socket buffers automatic sizing - ported from FreeBSD. 2007-08-02 02:42:40 +00:00
tcpip.h
udp.h
udp_usrreq.c m_copym(..., 0, M_COPYALL, ...) -> m_copypacket(..., ...). 2007-09-02 07:18:55 +00:00
udp_var.h