summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2008-11-24add several backend pools to allocate mbufs clusters of various sizes outDavid Gwynne
of. currently limited to MCLBYTES (2048 bytes) and 4096 bytes until pools can allocate objects of sizes greater than PAGESIZE. this allows drivers to ask for "jumbo" packets to fill rx rings with. the second half of this change is per interface mbuf cluster allocator statistics. drivers can use the new interface (MCLGETI), which will use these stats to selectively fail allocations based on demand for mbufs. if the driver isnt rapidly consuming rx mbufs, we dont allow it to allocate many to put on its rx ring. drivers require modifications to take advantage of both the new allocation semantic and large clusters. this was written and developed with deraadt@ over the last two days ok deraadt@ claudio@
2008-11-24Implement link-state tracking on the routing table. Routes to interfacesClaudio Jeker
which are considered down will no be marked ~RTF_UP and so multipath routing will start to work as expected and not pump 50% of the traffic to nirvana. Most of the magic happens in rn_mpath_reprio() which fiddles with the routing table internals. The rest is more straight forward. get it in deraadt@
2008-11-23softraid support for ata over ethernet (aoe). this includes a client andTed Unangst
part of a server. there's no configuration yet, and several other drawbacks, but it can be hammered into shape. i haven't moved the code forward in a year, and marco wants it in the tree to hack on.
2008-11-22Allow rt_msg1() to get a NULL as struct rt_addrinfo this simplifies a fewClaudio Jeker
callers (plus an upcomming one). OK henning@, dlg@
2008-11-21Change rn_mpath_next() to be able to walk over the full multipath listClaudio Jeker
not only over routes of the same prio. This makes it possible to modify rt_mpath_matchgate() so that if only gateway is specified without a specific priority it will scan the full list and not only the first routes. This is also needed for upcoming link state tracking.
2008-11-16Make sure to increment the the output error counter ifBrad Smith
not using TRUNK_PROTO_NONE and there are no member ports. ok mpf@
2008-11-10Clear ifindex2ifnet[] in if_detach() this is needed because link localClaudio Jeker
addressing in IPv6 likes to do ifp = ifindex2ifnet[ifindex] without properly checking if the ifindex is valid. As a side-effect this solves parts of PR 5981. Debugged by jsing@. OK jsing@, deraadt@
2008-11-09Introduce bpf_mtap_ether(), which for the benefit of bpf listenersChristian Weisgerber
creates the VLAN encapsulation from the tag stored in the mbuf header. Idea from FreeBSD, input from claudio@ and canacar@. Switch all hardware VLAN enabled drivers to the new function. ok claudio@
2008-11-08Take into account that our ether_input() already strips theMarco Pfatschbacher
ethernet header. This lets us actually process the incoming LACP-Packets. It should now work with a lot more switches. At least a Catalyst 3500 seems happy. OK brad@
2008-11-07use do { } while (/* CONSTCOND */ 0) construct for all multi-line functional ↵Theo de Raadt
macros; ok otto
2008-11-07give this some /* CONSTCOND */ loveTheo de Raadt
2008-11-07Replace the number of bits to shift with EVL_PRIO_BITS in theBrad Smith
EVL_PRIOFTAG macro. ok naddy@
2008-11-06Introduced IPv6 support of uniform model for TTL handling.Michele Marchetto
OK claudio@ laurent@
2008-11-04Move the trunk port count check from trunk_lb_start() to trunk_start()Brad Smith
before the protocol start routine is called so as to cover all protocols with the same check. ok mpf@
2008-11-01Introduced Uniform Model for TTL handling.Michele Marchetto
MPLS TTL is mapped into network layer one as the packet exits the LSP. Just IPv4 support for now. Added the relevant sysctls to enable this behaviour. Input and OK claudio@
2008-10-30Fix building with !INET6 kernels.Brad Smith
2008-10-28Always skip "urpf-failed" test for IPv6 link local addresses.Marco Pfatschbacher
We could re-embed the scope-id before we do the route lookup, but then we would just find the very interface we've received the packet on anyway. OK markus@, claudio@, henning@
2008-10-28add support for multiple pflow(4) interfacesJoerg Goltermann
OK: claudio@ henning@
2008-10-28Remove return at the end of a void function.Brad Smith
2008-10-28In trunk_media_status() mark the interface as active if any ports areBrad Smith
active rather than just the primary being UP. From FreeBSD Ok mpf@
2008-10-28In trunk_lb_start() port % count will never be greater thanBrad Smith
TRUNK_MAX_PORTS so nuke the test. From FreeBSD Ok mpf@
2008-10-28Feed IPv6 flow label to hash calculation.Brad Smith
From FreeBSD Ok mpf@
2008-10-28Show the ACTIVE flag in ifconfig for the single interface that isBrad Smith
actually active in failover mode rather than all interfaces with a link. This makes it clear if the master interface is in use or one of the backup links. From FreeBSD Tested by jmc@ Ok mpf@
2008-10-28Added mpls_output() used to output mpls packets originating from local host.Michele Marchetto
Strictly similar to mpls_input(). Input and OK claudio@, OK laurent@
2008-10-24Allow the debug printf code which is trying to retreive the interfaceBrad Smith
pointer to get at the interface name by pointing to the correct struct.
2008-10-23use the correct idiom for NFOO things which come from "foo.h" filesTheo de Raadt
ok dlg
2008-10-22#if INET => #ifdef INETMarco Pfatschbacher
#if INET6 => #ifdef INET6
2008-10-21add bpf/tcpdump support to pflow(4)Joerg Goltermann
ok canacar@ henning@
2008-10-18Prevent the user to assign reserved labels to mpe(4) interfaces.Michele Marchetto
OK claudio@
2008-10-16Switch the existing TX VLAN hardware support over to having theChristian Weisgerber
tag in the header. Convert TX tagging in the drivers. Help and ok brad@
2008-10-16* Allow ether_input() and vlan_input() to handle incoming packetsChristian Weisgerber
where the tag is stored in the mbuf header. * Make bridge(4) handle interfaces with and without hardware tag support and forward packets inbetween. Help and ok claudio@
2008-10-16Drop promiscuously received packets if the vlan interface is not inChristian Weisgerber
promiscuous mode itself. Closes PR 5012. With claudio@. ok claudio@, henning@
2008-10-16Make the session id unique per receiving interface so that pppoeCan Erkin Acar
interfaces attached to different networks can use the same session id. reported by gm_sjo <saqmaster at gmail dot com>
2008-10-15Second pass of simple timeout_add -> timeout_add_sec conversionsBret Lambert
This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
2008-10-14Now mpls_input() handles ipv4 and ipv6 explicit null labels.Michele Marchetto
Added mpe_input6 to manage also ipv6 packets insted of just ipv4 ones. OK claudio@ laurent@
2008-10-12Some more cleanup. No binary change.Marco Pfatschbacher
OK reyk@
2008-10-11Make sure no two pppoe devices share the same sc_unique identifier. WhileMiod Vallat
there, fix some typos, and pass M_CANFAIL to all malloc() calls which use M_WAITOK but are tested for failure. test&ok brad@
2008-10-09Add fallback ioctl handlers for MTU and multicast to ether_ioctl().Brad Smith
2008-10-08Get rid of the second table entry pool (pfr_kentry_pl2); we're alreadyRyan Thomas McBride
using the default interrupt handler for both, so there's no need to keep table entries created in interrupt context separate. ok henning art
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
2008-10-02When redirect is used with sticky-address and a matching pass rule usesJoel Sing
reply-to, the sticky-address in the source tracking pool is overwritten with the reply-to address, resulting in new connections being incorrectly redirected to the reply-to host (instead of the sticky-address host). Prevent this by passing a NULL source node reference to pf_map_addr() when looking up the reply-to host, thus preventing the NAT source node from being overwritten. ok mcbride@ henning@
2008-10-01Don't timeout_del() if we're going to do a timeout_add() right away.Michael Knudsen
ok claudio
2008-09-28Ansify function declarations for gif(4).Joel Sing
ok claudio@
2008-09-28Teach PF pf_print_state_parts() about IPv4 in IP and IPv6 in IPJoel Sing
encapsulation. Decapitalise the 'v' in ICMPv6 whilst here. ok henning@
2008-09-22Reorder PFSTATE_PFLOW define:Marco Pfatschbacher
It applies to state_flags, not to sync_flags. OK henning@, gollo@
2008-09-17Solve m_free problem with a not correctly configured pflow interfaceJoerg Goltermann
leading to a kernel crash reported in PR5930 OK claudio@ henning@
2008-09-17fix whitespacesJoerg Goltermann
ok henning@
2008-09-17remove dead stores and newly created unused variables.Charles Longeau
fix potential use of uninitialized value in trunk_port_ioctl() function. Found by LLVM/Clang Static Analyzer. ok mpf@ henning@
2008-09-16netstat statistics for pflow(4) via pseudo familyJoerg Goltermann
ok cluadio@ henning@
2008-09-16fix whitespace/tab typosJoerg Goltermann
ok henning@ claudio@