summaryrefslogtreecommitdiffstats
path: root/sys/net/if_edsc.c
Commit message (Collapse)AuthorAgeFilesLines
* Get closer to a VIMAGE network stack teardown from top to bottom ratherbz2016-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than removing the network interfaces first. This change is rather larger and convoluted as the ordering requirements cannot be separated. Move the pfil(9) framework to SI_SUB_PROTO_PFIL, move Firewalls and related modules to their own SI_SUB_PROTO_FIREWALL. Move initialization of "physical" interfaces to SI_SUB_DRIVERS, move virtual (cloned) interfaces to SI_SUB_PSEUDO. Move Multicast to SI_SUB_PROTO_MC. Re-work parts of multicast initialisation and teardown, not taking the huge amount of memory into account if used as a module yet. For interface teardown we try to do as many of them as we can on SI_SUB_INIT_IF, but for some this makes no sense, e.g., when tunnelling over a higher layer protocol such as IP. In that case the interface has to go along (or before) the higher layer protocol is shutdown. Kernel hhooks need to go last on teardown as they may be used at various higher layers and we cannot remove them before we cleaned up the higher layers. For interface teardown there are multiple paths: (a) a cloned interface is destroyed (inside a VIMAGE or in the base system), (b) any interface is moved from a virtual network stack to a different network stack ("vmove"), or (c) a virtual network stack is being shut down. All code paths go through if_detach_internal() where we, depending on the vmove flag or the vnet state, make a decision on how much to shut down; in case we are destroying a VNET the individual protocol layers will cleanup their own parts thus we cannot do so again for each interface as we end up with, e.g., double-frees, destroying locks twice or acquiring already destroyed locks. When calling into protocol cleanups we equally have to tell them whether they need to detach upper layer protocols ("ulp") or not (e.g., in6_ifdetach()). Provide or enahnce helper functions to do proper cleanup at a protocol rather than at an interface level. Approved by: re (hrs) Obtained from: projects/vnet Reviewed by: gnn, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6747
* Virtualize if_edsc(4).hrs2014-10-051-18/+33
|
* Mechanically convert to if_inc_counter().glebius2014-09-191-2/+2
|
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-10-261-1/+2
| | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Make the "struct if_clone" opaque to users of the cloning API. Usersglebius2012-10-161-14/+13
| | | | | | | | | | | | now use function calls: if_clone_simple() if_clone_advanced() to initialize a cloner, instead of macros that initialize if_clone structure. Discussed with: brooks, bz, 1 year ago
* Give a hint that softc can contain many things besides ifp.yar2007-03-261-0/+5
|
* We no longer embed ifnet in softc, and the pointer to ifnetyar2007-03-261-4/+4
| | | | | | | | | | doesn't need to be first in softc now. (It was the whole ifnet structure itself that needed to be first in the good old days.) Fix the respective comment accordingly. Add xrefs to ifnet(9) in some other comments while I'm here. Pointed out by: thompsa
* Introduce a new toy interface, edsc(4). It's a discard interfaceyar2007-03-261-0/+349
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be attached to it for testing and benchmarking purposes. Its source can be an introduction to the anatomy of a network interface driver due to its simplicity as well as to a bunch of comments in it. (The rest of needed changes were in my previous commit, which got interrupted in the middle. Alas, CVS commits are not atomic.)
OpenPOWER on IntegriCloud