summaryrefslogtreecommitdiff
path: root/sys/net/if.h
AgeCommit message (Collapse)Author
2014-06-13Instead of updating all the cluster allocation water marks of all theMartin Pieuchot
interfaces when the kernel is livelocked, only do it for the current pool and defer the other updates. This allow us to get rid of an interface list iteration in a critical path. Ridding the libc crank since this change introduce an ABI break. ok claudio@
2013-11-21split kernel parts of the if.h into a separate header file if_var.hMike Belopuhov
which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
2013-11-09ticks is compared against mcl_grown to see if time has elapsed sinceDavid Gwynne
the rx ring was last allowed to grow and then assigned to it. it is erroneous to do this because mcl_grown is a u_int and ticks is an int. this makes mcl_grown an int, and follows the idiom in kern_timeout.c of going "thing - ticks < diff", which better copes with ticks wrapping around and being used to calculate relative intervals. ok pirofti@ guenther@
2013-11-01keep net/hfsc.h away from userspace, except in pfctlpelikan
tested by naddy, ok deraadt
2013-10-21nuke comment. How soon is now?Sebastian Benoit
"do it" deraadt@
2013-10-19Bring back the if_detachhook. We're going to have more users now.Reyk Floeter
ok mpi@ henning@ benno@
2013-10-13Import vxlan(4), the virtual extensible local area network tunnelReyk Floeter
interface. VXLAN is a UDP-based tunnelling protocol for overlaying virtualized layer 2 networks over layer 3 networks. The implementation is based on draft-mahalingam-dutt-dcops-vxlan-04 and has been tested with other implementations in the wild. put it in deraadt@
2013-10-12new bandwidth shaping subsystem, kernel sideHenning Brauer
uses hfsc behind the scenes; altq stays in parallel for a migration phase. if.h even more messy for the transition, but eventuelly it should become readable... looked over & tested by many, ok phessler sthen
2013-09-17Change vlan(4) detach procedure to not use a hook but a list of vlansMartin Pieuchot
on the parent interface. This is similar to what bridge(4), trunk(4) or carp(4) are doing and allows us to get rid of the detachhook. ok reyk@, mikeb@
2013-08-28Remove unused argument from *rtrequest()Martin Pieuchot
ok krw@, mikeb@
2013-06-20Revert previous and unbreak asr, the new include should be protected.Martin Pieuchot
Reported by naddy@
2013-06-20Allocate the various hook head descriptors as part of the ifnetMartin Pieuchot
structure rather than doing various M_WAITOK allocations during the *attach() functions, we always rely on them anyway. ok mikeb@, uebayasi@
2013-04-02Instead of storing the link-level address of every interface in a globalMartin Pieuchot
array indexed by interface numbers, add a new field to the interface descriptor pointing to it. claudio@ and todd@ like it, ok mikeb@
2013-03-26Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.Martin Pieuchot
ok beck@, mikeb@
2013-03-20Introduce if_get() to retrieve an interface descriptor pointer givenMartin Pieuchot
an interface index and replace all the redondant checks and accesses to a global array by a call to this function. With imputs from and ok bluhm@, mikeb@
2013-03-07Remove unused ifa_ifwithaf() function.Martin Pieuchot
ok mikeb@, miod@
2013-03-07Remove the IFAFREE() macro, the ifafree() function it was calling alreadyMartin Pieuchot
check for the reference counter. ok mikeb@, miod@, pelikan@, kettenis@, krw@
2012-11-23Add SIOCGIFHARDMTU to allow retrieving the driver's maximum supported MTUStuart Henderson
looks fine reyk@ ok mikeb@
2012-11-11align ifaliasreq.ifra_addr similar to the way that ifreq is fixed --Theo de Raadt
a gruesome union, to block the compiler from placing the struct incorrectly aligned on stack frames ok guenther
2012-10-05Point an interface directly to its bridgeport configuration, insteadCamiel Dobbelaar
of to the bridge itself. This is ok, since an interface can only be part of one bridge, and the parent bridge is easy to find from the bridgeport. This way we can get rid of a lot of list walks, improving performance and shortening the code. ok henning stsp sthen reyk
2012-09-19defina an IFCAP_CSUM_MASK, covering IFCAP_CSUM_*, and use it in if_vlan.cHenning Brauer
to replace the list of them. this actually makes vlan inherit the IPv6 CSUM flags from it's parent, that had been commented out since this code was committed back in 2001. ok benno mpf
2012-09-10Bring into compliance with POSIX, exposing just the specified bits.Philip Guenthe
Requested by jasper@, ok kettenis@
2012-08-21Reverse the name and meaning of the IFXF_INET6_PRIVACY interfaceAlexander Bluhm
flag. It is now called IFXF_INET6_NOPRIVACY. So IPv6 privacy addresses are on by default without resetting the flag during ifconfig down/up. OK stsp@, sperreault@ (who wrote the same diff)
2011-12-02Kill unused IFCAP_IPSEC and IFCAP_IPCOMP.Christiano F. Haesbaert
ok claudio@ henning@ mikeb@
2011-11-02Expose if_capabilities to userland so that ifconfig can display theChristiano F. Haesbaert
device hardware features. Tune ifconfig to show them with 'hwfeatures' argument. While here, kill some old unused capabilities and respect 80 columns in brconfig.h. ok mcbride@, henning@, mpf@.
2011-10-07rename some vars and functionsHenning Brauer
unfortunately altq is one giant namespace violation. rename just those that conflict with new stuff for now only to be found on my laptop. reduce pain, the diff is huge already. ok ryan
2011-07-08new priority queueing implementation, extremely low overhead, thus fast.Henning Brauer
unconditional, always on. 8 priority levels, as every better switch, the vlan header etc etc. ok ryan mpf sthen, pea tested as well
2011-07-07provide IF_LEN and IFQ_LEN to access ifq_len on an ifqueue, ryan okHenning Brauer
2011-07-05now of course I only noticed if_qflush is completely unused afterHenning Brauer
adjusting it to the new world order in my tree... remove it, ok ryan claudio
2011-07-03IFQ_CLASSIFY is also just schrapnelHenning Brauer
2011-07-03no traces of ALTQ_DECL to be found anywhere, thus kill the #definesHenning Brauer
2011-07-03LINK_STATE_IS_UP() should consider LINK_STATE_UNKNOWN as an up state.Claudio Jeker
This is now possible because carp no longer uses LINK_STATE_UNKNOWN for a state that is considered down. This will simplify a lot of code. OK mpf@ mcbride@ henning@
2011-03-13Add a way to enable/disable Wake On LAN with ifconfig.Stefan Sperling
ok deraadt
2010-11-17introduce ifa_update_broadaddr to update an ifaddr's broadcast address,Henning Brauer
trivial for the moment, more needed soon tested by many as part of a larger diff, ok sthen claudio dlg krw
2010-09-24Implement if_freenameindex() as a real function as required by posix.Claudio Jeker
OK deraadt@, millert@
2010-09-23tweak the mclgeti algorithm to behave better under load.David Gwynne
instead of letting hardware rings grow on every interrupt, restrict it so it can only grow once per softclock tick. we can only punish the rings on softclock ticks, so it make sense to only grow on softclock tick boundaries too. the rings are now punished after >1 lost softclock tick rather than >2. mclgeti is now more aggressive at detecting livelock. the rings get punished by an 8th, rather than by half. we now allow the rings to be punished again even if the system is already considered in livelock. without this diff a livelocked system will have its rx ring sizes scale up and down very rapidly, while holding the rings low for too long. this affected throughput significantly. discussed and tested heavily at j2k10. there are still some games with softnet we can play, but this is a good first step. "put it in" and ok deraadt@ ok claudio@ krw@ henning@ mcbride@ if we find out that it sucks we can pull it out again later. till then we'll run with it and see how it goes.
2010-08-27remove the unused if_init callback in struct ifnetJonathan Gray
ok deraadt@ henning@ claudio@
2010-06-26Implement a simple keepalive mechanism in gre(4) that is compatible withClaudio Jeker
the one used by Cisco. It sends a return gre packet inside a gre packet to the other side and expects it to return. OK deraadt, reyk additional testing by sthen
2010-05-28Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS intoClaudio Jeker
ether_output() and later on other L2 output functions use a trick and over- load the ifp->if_output() function pointer on MPLS enabled interfaces to go through mpls_output() which will then call the link level output function. By setting IFXF_MPLS on an interface the output pointers are switched. This now allows to cleanup the MPLS input and output pathes and fix mpe(4) so that the MPLS code now actually works for both P and PE systems. Tested by myself and michele (A custom kernel with MPLS and mpe enabled is still needed).
2010-04-17split SIOCSIFLLADDR code out into an ifnewlladr() functionTheo de Raadt
ok stsp
2010-04-06Simple implementation of RFC4941, "Privacy Extensions for StatelessStefan Sperling
Address Autoconfiguration in IPv6". For those among us who are paranoid about broadcasting their MAC address to the IPv6 internet. Man page help from jmc, testing by weerd, arc4random API hints from djm. ok deraadt, claudio
2010-01-13maintain a global RB tree of all local addresses in the system. thisHenning Brauer
includes AF_LINK addresses (aka mac addresses in the ethernet case). for inet this also includes the broadcast addresses. depends on ifinit() called earlier so we have a chance to pool_init before autoconf assigns the AF_LINK addresses, the v6 fix, and the ifa_add/del abstraction i just committed. this is a change in semantics, it is now illegal to change the actual address in an ifaddr struct because then the RB tree becomes unbalanced. nothing using this tree yet. ok theo ryan dlg
2010-01-13instead of fiddling with the per-interface address lists directly inHenning Brauer
many places create a proper API (ifa_add / ifa_del) and use it. ok theo ryan dlg
2010-01-12Make the structures for ifa_msghdr and friends even more likeTheo de Raadt
the route messages so that people and compilers will not get confused. ok claudio
2009-09-17Remove the comaptibility structures for routing socket version 3.Claudio Jeker
The RTM_VERSION bump is 2 years ago and so there is no need for this. Diff made by tedu@ some time ago but got never commited so I do it now.
2009-09-14Add a way to convert the ifi_link_state to a string without the use ofClaudio Jeker
if_media. This makes link state tracking a lot easier as there is no need to convert if types to if_media types, etc. Additionally this allows us to extend the link states to include states tracked on higher protocol layers. gre(4) keepalives packets, bfd and udld can be implemented without ugly hacks. OK henning, michele, sthen, deraadt
2009-08-10At sys_reboot time, bring all the interfaces down so that their xxstopTheo de Raadt
functions are called, which will turn off DMA. Receiving packets into your memory after a system reboot is pretty nasty. This will also mean that the shutdown hooks can go; this solution is smaller. ok henning miod dlg kettenis
2009-06-06when xflags got changed, tell the userland by routing socketsRainer Giedat
ok henning@
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
2009-06-04allow IPvShit to be turned off completely per-interface.Henning Brauer
ifconfig em0 -inet6 deletes all v6 addresses including link-local and prevents new ones from being added. ifconfig em0 inet6 <addr> re-enables v6, brings the link local back and adds optional <addr> ok theo reyk