/* $NetBSD: nexf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */ /* * Written by Ben Harris, 2000. This file is in the Public Domain. */ #include "softfloat-for-gcc.h" #include "milieu.h" #include "softfloat.h" #include #if defined(LIBC_SCCS) && !defined(lint) __RCSID("$NetBSD: nexf2.c,v 1.2 2004/09/27 10:16:24 he Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef FLOATX80 flag __nexf2(floatx80, floatx80); flag __nexf2(floatx80 a, floatx80 b) { /* libgcc1.c says a != b */ return !floatx80_eq(a, b); } #endif /* FLOATX80 */ name='h' onchange='this.form.submit();'> NetBSD fork for lockdoc analysismerlin@scholz.ruhr
summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_gre.c
AgeCommit message (Collapse)Author
2007-10-05Work in progress: use a raw socket for GRE in IP encapsulationdyoung
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-09-02Be consistent: use the prefix sc_ for all members of the gre_softc.dyoung
2007-05-06Oops, commit this straggler from the last change to net/if_gre.[ch].dyoung
2007-03-21If we do not recognize the protocol of a received packet, thendyoung
increase ifi_noproto. If the GRE header contains routing options, increase the input-error count, ifi_ierrors. While I am here, make some cosmetic changes: remove unnecessary 'proto' argument from gre_input3(). Shorten some staircases.
2006-11-16Use LIST_FOREACH().dyoung
2006-11-16Cosmetic: s/g_proto/sc_proto/. Remove superfluous parentheses anddyoung
curly braces.
2006-09-07remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.dogcow
2006-08-31Add a mode to gre(4) that sends GRE tunnel packets in UDP datagrams.dyoung
Fix MOBILE encapsulation. Add many debugging printfs (mainly concerning UDP mode). Clean up the gre(4) code a bit. Add the capability to setup UDP tunnels to ifconfig. Update documentation. In UDP mode, gre(4) puts a GRE header onto transmitted packets, and hands them to a UDP socket for transmission. That is, the encapsulation looks like this: IP+UDP+GRE+encapsulated packet. There are two ways to set up a UDP tunnel. One way is to tell the source and destination IP+port to gre(4), and let gre(4) create the socket. The other way to create a UDP tunnel is for userland to "delegate" a UDP socket to the kernel.
2006-07-28Extract predicate M_UNWRITABLE(m, len), which is true iff lendyoung
consecutive bytes at the front of m are writable (i.e., neither shared nor read-only).
2006-07-28Fix mtod() usage. If we will write to the mbuf data, check whetherdyoung
the data is read-only/shared and call m_pullup(). Otherwise, extract a const pointer to the mbuf data. XXX I should extract a new macro, M_WRITABLE(m, len), that is true if m has len consecutive writable bytes at its front. KNF slightly. Use bpf_mtap_af().
2006-07-28Use bpf_mtap_af(). KNF slightly.dyoung
2006-01-31fix tyop.elad
pr 32678 from yves emmanuel jutard.
2005-12-11merge ktrace-lwp.christos
2005-07-26PR/30844: Gert Doering: Non-inet traffic is passed to bpf incorrectly (as inet)christos
2005-03-30Add IPv6 over GRE (contributed by Gert Doering in PR 29150).is
2005-02-26nuke trailing whitespaceperry
2005-02-03some ANSIfying, and remove an unsightly tabperry
2005-02-02de-__P -- will ANSIfy .c files later.perry
2004-04-26Remove #else clause of __STDC__matt
2003-09-05u_short -> u_int16_titojun
2003-06-26tabifyitojun
2003-05-02clear m_flags just for safetyitojun
2003-04-21remove redundant adjustment of m->m_pkthdr.lenitojun
2003-04-21correct arg to m_pullup (need to count IP header size as well)itojun
2003-04-21correct (false) assumptions on mbuf chain. not sure if it really helps, butitojun
anyways, it is necessary to perform m_pullup.
2002-11-25The "osrc" variable in gre_mobile_input() is only ever set but notsimonb
referenced; remove it.
2002-09-11KNF - return is not a function. sync w/kame.itojun
2002-08-14avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACEitojun
optimization made last year. should solve PR 17867 and 10195. IP_HDRINCL behavior of raw ip socket is kept unchanged. we may want to provide IP_HDRINCL variant that does not swap endian.
2002-08-10inject GRE packet to raw ip socket input, to support userland GRE decapsulator.itojun
discussed on openbsd developers list.
2002-06-09styleitojun
2002-06-09whitespaceitojun