History log of /src/sys/net/agr/if_agr.c |
Revision | | Date | Author | Comments |
1.57 |
| 29-Jun-2024 |
riastradh | if_stats(9): Add ifp argument to if_stat..._ref.
This will enable us to pass the ifp through to a dtrace probe inside.
No functional change intended in this change, but this is an API change visible to modules so it shouldn't be pulled up.
PR kern/58377
|
1.56 |
| 18-Sep-2022 |
thorpej | Eliminate use of IFF_OACTIVE.
|
1.55 |
| 20-Jun-2022 |
yamaguchi | Handling frames that vlan id is 0 as non-VLAN frames even if a vlan tag is stripped by harware offloading
|
1.54 |
| 31-Dec-2021 |
riastradh | sys: Use if_init wrapper function.
Exception: Not in kern_pmf.c, for the kind of silly reason that it avoids having kern_pmf.c refer to symbols defined only in net; this avoids a pain in the rump.
|
1.53 |
| 30-Sep-2021 |
yamaguchi | Replace ifnet::if_agriprivate with ifnet::if_lagg
agr(4) and lagg(4) can not be used on the same interface so that if_agrprivate and if_lagg are not used at the same time. For resolve this wasteful, if_lagg is used in not only lagg(4) but also agr(4).
After this modification, if_lagg has 3 states: 1. if_lagg == NULL - Both agr(4) and lagg(4) are not running on the interface 2. if_lagg != NULL && ifp->if_type != IFT_IEEE8023ADLAG - agr(4) is running on the I/F 3. if_lagg != NULL && ifp->if_type == IFT_IEEE8023ADLAG - lagg(4) is running on the I/F
|
1.52 |
| 02-Aug-2021 |
andvar | fix various typos in comments and log messages.
|
1.51 |
| 29-Jan-2020 |
thorpej | Adopt <net/if_stats.h>.
|
1.50 |
| 06-Oct-2019 |
uwe | branches: 1.50.2; xc_barrier - convenience function to xc_broadcast() a nop.
Make the intent more clear and also avoid a bunch of (xcfunc_t)nullop casts that gcc 8 -Wcast-function-type is not happy about.
|
1.49 |
| 26-Apr-2019 |
pgoyette | Some more empty-string --> NULL conversions for module dependencies
|
1.48 |
| 23-Mar-2019 |
pgoyette | Replace compile-time checking for vlan code with a module hook.
Should resolve the errors reported on irc when booting a kernel which has agr without vlan:
[ 1.0000000] WARNING: module error: built-in module if_agr can't find builtin dependency `if_vlan' [ 1.0000000] WARNING: module error: built-in module if_agr prerequisite if_vlan failed, error 2
|
1.47 |
| 26-Jun-2018 |
msaitoh | branches: 1.47.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD.
This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
|
1.46 |
| 25-Jan-2018 |
christos | branches: 1.46.2; Add locking.
|
1.45 |
| 16-Jan-2018 |
knakahara | Fix agr(4) module build. Reviewed by pgoyette@n.o, thanks.
|
1.44 |
| 15-Jan-2018 |
maxv | Mmh, fix a weird mistake: the guy who added #if NVLAN > 0 forgot to actually include vlan.h, so the branches are never compiled.
They don't compile, by the way, so fix that too, by reproducing the vlan input path of ether_input().
|
1.43 |
| 06-Dec-2017 |
ozaki-r | Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description "resource allocated". (The description is a bit doubtful though, I believe the change is still proper.)
|
1.42 |
| 06-Dec-2017 |
ozaki-r | Simplify; share agr_vlan_add and agr_vlan_del (NFCI)
|
1.41 |
| 28-Jan-2017 |
maya | branches: 1.41.6; Switch agr(4) to use a workqueue. This is necessary because during a callout, it allocates memory with M_WAITOK, which triggers a DEBUG assert.
XXX we should drain the workqueue.
ok riastradh
|
1.40 |
| 15-Dec-2016 |
ozaki-r | branches: 1.40.2; Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are: - We can reduce codes - We can provide the same behavior between drivers - Where/When if_ipackets is counted up - Note that some drivers still update packet statistics in their own way (periodical update) - Moved bpf_mtap run in softint - This makes it easy to MP-ify bpf
Proposed on tech-kern and tech-net
|
1.39 |
| 07-Aug-2016 |
christos | modularize some more drivers and merge the module glue
|
1.38 |
| 20-Jul-2016 |
ozaki-r | Apply pserialize to some iterations of IP address lists
|
1.37 |
| 07-Jul-2016 |
ozaki-r | branches: 1.37.2; Switch the address list of intefaces to pslist(9)
As usual, we leave the old list to avoid breaking kvm(3) users.
|
1.36 |
| 20-Jun-2016 |
knakahara | apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling).
|
1.35 |
| 10-Jun-2016 |
ozaki-r | Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf. They are counterpart of m_get_rcvif, which will come in another commit, hide internal of rcvif operation, and reduce the diff of the upcoming change.
No functional change.
|
1.34 |
| 09-Feb-2016 |
ozaki-r | Introduce softint-based if_input
This change intends to run the whole network stack in softint context (or normal LWP), not hardware interrupt context. Note that the work is still incomplete by this change; to that end, we also have to softint-ify if_link_state_change (and bpf) which can still run in hardware interrupt.
This change softint-ifies at ifp->if_input that is called from each device driver (and ieee80211_input) to ensure Layer 2 runs in softint (e.g., ether_input and bridge_input). To this end, we provide a framework (called percpuq) that utlizes softint(9) and percpu ifqueues. With this patch, rxintr of most drivers just queues received packets and schedules a softint, and the softint dequeues packets and does rest packet processing.
To minimize changes to each driver, percpuq is allocated in struct ifnet for now and that is initialized by default (in if_attach). We probably have to move percpuq to softc of each driver, but it's future work. At this point, only wm(4) has percpuq in its softc as a reference implementation.
Additional information including performance numbers can be found in the thread at tech-kern@ and tech-net@: http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html
Acknowledgment: riastradh@ greatly helped this work. Thank you very much!
|
1.33 |
| 24-Aug-2015 |
pooka | sprinkle _KERNEL_OPT
|
1.32 |
| 20-Aug-2015 |
christos | include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.
|
1.31 |
| 12-Sep-2013 |
martin | branches: 1.31.6; Remove unused variable
|
1.30 |
| 19-Oct-2011 |
dyoung | branches: 1.30.2; 1.30.12; 1.30.16; Use if_flags_set() and if_addr_init() instead of ifp->if_ioctl().
|
1.29 |
| 11-Aug-2010 |
pgoyette | Keep condvar wmesg within 8 char limit
|
1.28 |
| 26-May-2010 |
dyoung | Change sc_wrports from an int to a bool and "test truth" instead of comparing with 0.
Add 'volatile' to several other state variables that need it.
|
1.27 |
| 05-Apr-2010 |
joerg | Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf check into the inline functions as well the fourth argument for bpf_attach.
|
1.26 |
| 08-Feb-2010 |
dyoung | branches: 1.26.2; Take another stab at fixing the LOCKDEBUG panic reported in PR kern/39940 and by Martti Kuparinen on current-users@: replace the ioctl lock with finer-grained locking. Lock the ports list and wait to if_clone_destroy() until all threads are out of the softc.
Thanks to Martti Kuparinen for testing these changes.
|
1.25 |
| 19-Jan-2010 |
pooka | branches: 1.25.2; Redefine bpf linkage through an always present op vector, i.e. #if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized.
Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here.
Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
|
1.24 |
| 09-Jun-2009 |
yamt | comment style. no functional change.
|
1.23 |
| 29-May-2009 |
darran | Add vlan support and hardware offload capabilities to agr. These changes allow vlans to be layered above agr, with the attach and detach propogated to the member ports in the aggregation. Note the agr interface must be up before the vlan is attached.
Adds SIOCINITIFADDR support to the wm driver for setting the AF_LINK address, necessary for agr to be able to set the mac addresses of each port to the agr address (i.e. so it can receive all intended traffic at the hardware level).
Adds support for disabling the LACP protocol by setting LINK1 on the agr interface (e.g. ifconfig agr0 link1).
In consultation with tls@.
|
1.22 |
| 07-Nov-2008 |
dyoung | branches: 1.22.4; *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link 02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor Advertisement to update the network-/link-layer address bindings on our LAN peers.
Refuse a change of ethernet address to the address 00:00:00:00:00:00 or to any multicast/broadcast address. (Thanks matt@.)
Reorder ifnet ioctl operations so that driver ioctls may inherit the functions of their "class"---ether_ioctl(), fddi_ioctl(), et cetera---and the class ioctls may inherit from the generic ioctl, ifioctl_common(), but both driver- and class-ioctls may override the generic behavior. Make network drivers share more code.
Distinguish a "factory" link-layer address from others for the purposes of both protecting that address from deletion and computing EUI64.
Return consistent, appropriate error codes from network drivers.
Improve readability. KNF.
*** Details ***
In if_attach(), always initialize the interface ioctl routine, ifnet->if_ioctl, if the driver has not already initialized it. Delete if_ioctl == NULL tests everywhere else, because it cannot happen.
In the ioctl routines of network interfaces, inherit common ioctl behaviors by calling either ifioctl_common() or whichever ioctl routine is appropriate for the class of interface---e.g., ether_ioctl() for ethernets.
Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In the user->kernel interface, SIOCSIFADDR's argument was an ifreq, but on the protocol->ifnet interface, SIOCSIFADDR's argument was an ifaddr. That was confusing, and it would work against me as I make it possible for a network interface to overload most ioctls. On the protocol->ifnet interface, replace SIOCSIFADDR with SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to invoke SIOCINITIFADDR.
In ifioctl(), give the interface the first shot at handling most interface ioctls, and give the protocol the second shot, instead of the other way around. Finally, let compatibility code (COMPAT_OSOCK) take a shot.
Pull device initialization out of switch statements under SIOCINITIFADDR. For example, pull ..._init() out of any switch statement that looks like this:
switch (...->sa_family) { case ...: ..._init(); ... break; ... default: ..._init(); ... break; }
Rewrite many if-else clauses that handle all permutations of IFF_UP and IFF_RUNNING to use a switch statement,
switch (x & (IFF_UP|IFF_RUNNING)) { case 0: ... break; case IFF_RUNNING: ... break; case IFF_UP: ... break; case IFF_UP|IFF_RUNNING: ... break; }
unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and #ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).
In ipw(4), remove an if_set_sadl() call that is out of place.
In nfe(4), reuse the jumbo MTU logic in ether_ioctl().
Let ethernets register a callback for setting h/w state such as promiscuous mode and the multicast filter in accord with a change in the if_flags: ether_set_ifflags_cb() registers a callback that returns ENETRESET if the caller should reset the ethernet by calling if_init(), 0 on success, != 0 on failure. Pull common code from ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(), and register if_flags callbacks for those drivers.
Return ENOTTY instead of EINVAL for inappropriate ioctls. In zyd(4), use ENXIO instead of ENOTTY to indicate that the device is not any longer attached.
Add to if_set_sadl() a boolean 'factory' argument that indicates whether a link-layer address was assigned by the factory or some other source. In a comment, recommend using the factory address for generating an EUI64, and update in6_get_hw_ifid() to prefer a factory address to any other link-layer address.
Add a routing message, RTM_LLINFO_UPD, that tells protocols to update the binding of network-layer addresses to link-layer addresses. Implement this message in IPv4 and IPv6 by sending a gratuitous ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD messages on a change of an interface's link-layer address.
In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address that is broadcast/multicast or equal to 00:00:00:00:00:00.
Make ether_ioctl() call ifioctl_common() to handle ioctls that it does not understand.
In gif(4), initialize if_softc and use it, instead of assuming that the gif_softc and ifp overlap.
Let ifioctl_common() handle SIOCGIFADDR.
Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels that certain invariants on a struct route are satisfied.
In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit about the ioctls that we do not allow on an agr(4) member interface.
bzero -> memset. Delete unnecessary casts to void *. Use sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with NULL instead of "testing truth". Replace some instances of (type *)0 with NULL. Change some K&R prototypes to ANSI C, and join lines.
|
1.21 |
| 19-May-2008 |
yamt | branches: 1.21.4; 1.21.6; 1.21.8; 1.21.12; agr_ioctl_filter: comment the intention.
|
1.20 |
| 20-Dec-2007 |
dyoung | branches: 1.20.6; 1.20.8; 1.20.10; 1.20.12; Poison struct route->ro_rt uses in the kernel by changing the name to _ro_rt. Use rtcache_getrt() to access a route cache's struct rtentry *.
Introduce struct ifnet->if_dl that always points at the interface identifier/link-layer address. Make code that treated the first ifaddr on struct ifnet->if_addrlist as the interface address use if_dl, instead.
Remove stale debugging code from net/route.c. Move the rtflush() code into rtcache_clear() and delete rtflush(). Delete rtalloc(), because nothing uses it any more.
Make ND6_HINT an inline, lowercase subroutine, nd6_hint.
I've done my best to convert IP Filter, the ISO stack, and the AppleTalk stack to rtcache_getrt(). They compile, but I have not tested them. I have given the changes to PF, GRE, IPv4 and IPv6 stacks a lot of exercise.
|
1.19 |
| 08-Dec-2007 |
ad | branches: 1.19.4; Unbork
|
1.18 |
| 08-Dec-2007 |
elad | Replace usage of p_cred in kauth(9) call with kauth_cred_get().
okay yamt@.
|
1.17 |
| 05-Dec-2007 |
dyoung | Use IFADDR_FIRST(), IFADDR_NEXT().
|
1.16 |
| 02-Sep-2007 |
dyoung | branches: 1.16.6; 1.16.8; We cannot sleep in a software interrupt, so do not sockaddr_dl_alloc(..., M_WAITOK). Instead, sockaddr_dl_init() a sockaddr_dl on the stack.
|
1.15 |
| 30-Aug-2007 |
dyoung | Use malloc(9) for sockaddrs instead of pool(9), and remove dom_sa_pool and dom_sa_len members from struct domain. Pools of fixed-size objects are too rigid for sockaddr_dls, whose size can vary over a wide range.
Return sockaddr_dl to its "historical" size. Now that I'm using malloc(9) instead of pool(9) to allocate sockaddr_dl, I can create a sockaddr_dl of any size in the kernel, so expanding sockaddr_dl is useless.
Avoid using sizeof(struct sockaddr_dl) in the kernel.
Introduce sockaddr_dl_alloc() for allocating & initializing an arbitrary sockaddr_dl on the heap.
Add an argument, the sockaddr length, to sockaddr_alloc(), sockaddr_copy(), and sockaddr_dl_setaddr().
Constify: LLADDR() -> CLLADDR().
Where the kernel overwrites LLADDR(), use sockaddr_dl_setaddr(), instead. Used properly, sockaddr_dl_setaddr() will not overrun the end of the sockaddr.
|
1.14 |
| 26-Aug-2007 |
dyoung | branches: 1.14.2; Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to identify sockaddr_dl abuse that remains in the kernel, especially the potential for overwriting memory past the end of a sockaddr_dl with, e.g., memcpy(LLADDR(), ...).
Use sockaddr_dl_setaddr() in a few places.
|
1.13 |
| 07-Aug-2007 |
dyoung | branches: 1.13.2; Use sockaddr_dl_measure() and sockaddr_dl_init(). Erase unnecessary cast.
|
1.12 |
| 20-May-2007 |
yamt | branches: 1.12.2; 1.12.6; use mutex.
|
1.11 |
| 04-Mar-2007 |
christos | branches: 1.11.2; 1.11.4; 1.11.6; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.10 |
| 22-Feb-2007 |
thorpej | TRUE -> true, FALSE -> false
|
1.9 |
| 21-Feb-2007 |
thorpej | Replace the Mach-derived boolean_t type with the C99 bool type. A future commit will replace use of TRUE and FALSE with true and false.
|
1.8 |
| 29-Oct-2006 |
yamt | branches: 1.8.4; agr_setconfig: ensure ifname is NUL terminated. PR/34894 from Michael Pounov.
|
1.7 |
| 25-Oct-2006 |
elad | Kill KAUTH_GENERIC_ISSUSER use.
|
1.6 |
| 08-Jul-2006 |
yamt | branches: 1.6.4; 1.6.6; agr_ioctl: wrap a long line after kauth merge.
|
1.5 |
| 15-May-2006 |
yamt | branches: 1.5.4; include sys/kauth.h for kauth_authorize_generic.
|
1.4 |
| 14-May-2006 |
elad | integrate kauth.
|
1.3 |
| 11-Dec-2005 |
christos | branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12; merge ktrace-lwp.
|
1.2 |
| 12-Aug-2005 |
yamt | include callout.h explicitly.
|
1.1 |
| 18-Mar-2005 |
yamt | branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; add agr(4), a pseudo network device driver for link aggregation.
|
1.1.8.6 |
| 21-Jan-2008 |
yamt | sync with head
|
1.1.8.5 |
| 07-Dec-2007 |
yamt | sync with head
|
1.1.8.4 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.1.8.3 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.1.8.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.1.8.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.1.6.2 |
| 29-Apr-2005 |
kent | sync with -current
|
1.1.6.1 |
| 18-Mar-2005 |
kent | file if_agr.c was added on branch kent-audio2 on 2005-04-29 11:29:32 +0000
|
1.1.4.3 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.1.4.2 |
| 01-Apr-2005 |
skrll | Sync with HEAD.
|
1.1.4.1 |
| 18-Mar-2005 |
skrll | file if_agr.c was added on branch ktrace-lwp on 2005-04-01 14:31:50 +0000
|
1.1.2.2 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.1.2.1 |
| 18-Mar-2005 |
yamt | file if_agr.c was added on branch yamt-km on 2005-03-19 08:36:35 +0000
|
1.3.12.1 |
| 24-May-2006 |
tron | Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
|
1.3.10.2 |
| 10-Mar-2006 |
elad | generic_authorize() -> kauth_authorize_generic().
|
1.3.10.1 |
| 08-Mar-2006 |
elad | Adapt to kernel authorization KPI.
|
1.3.8.2 |
| 11-Aug-2006 |
yamt | sync with head
|
1.3.8.1 |
| 24-May-2006 |
yamt | sync with head.
|
1.3.6.1 |
| 01-Jun-2006 |
kardel | Sync with head.
|
1.3.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.5.4.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.6.6.1 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.6.4.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.8.4.2 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.8.4.1 |
| 27-Feb-2007 |
yamt | - sync with head. - move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
|
1.11.6.1 |
| 09-Dec-2007 |
reinoud | Pullup to HEAD
|
1.11.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.11.2.3 |
| 09-Oct-2007 |
ad | Sync with head.
|
1.11.2.2 |
| 20-Aug-2007 |
ad | Sync with HEAD.
|
1.11.2.1 |
| 08-Jun-2007 |
ad | Sync with head.
|
1.12.6.3 |
| 09-Dec-2007 |
jmcneill | Sync with HEAD.
|
1.12.6.2 |
| 03-Sep-2007 |
jmcneill | Sync with HEAD.
|
1.12.6.1 |
| 09-Aug-2007 |
jmcneill | Sync with HEAD.
|
1.12.2.2 |
| 03-Sep-2007 |
skrll | Sync with HEAD.
|
1.12.2.1 |
| 15-Aug-2007 |
skrll | Sync with HEAD.
|
1.13.2.2 |
| 07-Aug-2007 |
dyoung | Use sockaddr_dl_measure() and sockaddr_dl_init(). Erase unnecessary cast.
|
1.13.2.1 |
| 07-Aug-2007 |
dyoung | file if_agr.c was added on branch matt-mips64 on 2007-08-07 04:27:45 +0000
|
1.14.2.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.14.2.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.16.8.2 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.16.8.1 |
| 08-Dec-2007 |
ad | Sync with head.
|
1.16.6.2 |
| 27-Dec-2007 |
mjf | Sync with HEAD.
|
1.16.6.1 |
| 08-Dec-2007 |
mjf | Sync with HEAD.
|
1.19.4.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.20.12.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.20.10.5 |
| 09-Oct-2010 |
yamt | sync with head
|
1.20.10.4 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.20.10.3 |
| 11-Mar-2010 |
yamt | sync with head
|
1.20.10.2 |
| 20-Jun-2009 |
yamt | sync with head
|
1.20.10.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.20.8.1 |
| 04-Jun-2008 |
yamt | sync with head
|
1.20.6.2 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.20.6.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.21.12.1 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.21.8.1 |
| 05-Jun-2009 |
snj | Pull up following revision(s) (requested by 792): sys/dev/pci/if_wm.c: revision 1.175 via patch sys/net/if_ethersubr.c: revision 1.172 via patch sys/net/agr/ieee8023ad_lacp.c: revision 1.9 via patch sys/net/agr/if_agr.c: revision 1.23 via patch sys/net/agr/if_agrether.c: revision 1.7 via patch sys/net/agr/if_agrvar_impl.h: revision 1.8 via patch Add vlan support and hardware offload capabilities to agr. These changes allow vlans to be layered above agr, with the attach and detach propogated to the member ports in the aggregation. Note the agr interface must be up before the vlan is attached. Adds SIOCSIFADDR support to the wm driver for setting the AF_LINK address, necessary for agr to be able to set the mac addresses of each port to the agr address (i.e. so it can receive all intended traffic at the hardware level). Adds support for disabling the LACP protocol by setting LINK1 on the agr interface (e.g. ifconfig agr0 link1). In consultation with tls@.
|
1.21.6.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.21.4.1 |
| 13-Dec-2008 |
haad | Update haad-dm branch to haad-dm-base2.
|
1.22.4.1 |
| 23-Jul-2009 |
jym | Sync with HEAD.
|
1.25.2.2 |
| 17-Aug-2010 |
uebayasi | Sync with HEAD.
|
1.25.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.26.2.2 |
| 05-Mar-2011 |
rmind | sync with head
|
1.26.2.1 |
| 30-May-2010 |
rmind | sync with head
|
1.30.16.1 |
| 18-May-2014 |
rmind | sync with head
|
1.30.12.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.30.12.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.30.2.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.31.6.5 |
| 05-Feb-2017 |
skrll | Sync with HEAD
|
1.31.6.4 |
| 05-Oct-2016 |
skrll | Sync with HEAD
|
1.31.6.3 |
| 09-Jul-2016 |
skrll | Sync with HEAD
|
1.31.6.2 |
| 19-Mar-2016 |
skrll | Sync with HEAD
|
1.31.6.1 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.37.2.3 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.37.2.2 |
| 07-Jan-2017 |
pgoyette | Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
|
1.37.2.1 |
| 26-Jul-2016 |
pgoyette | Sync with HEAD
|
1.40.2.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.41.6.2 |
| 05-Feb-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #528): sys/net/agr/if_agr.c: revision 1.42 sys/netinet6/nd6_rtr.c: revision 1.137 sys/netinet6/nd6_rtr.c: revision 1.138 sys/net/agr/if_agr.c: revision 1.46 sys/net/route.c: revision 1.206 sys/net/if.c: revision 1.419 sys/net/agr/if_agrether.c: revision 1.10 sys/netinet6/nd6.c: revision 1.241 sys/netinet6/nd6.c: revision 1.242 sys/netinet6/nd6.c: revision 1.243 sys/netinet6/nd6.c: revision 1.244 sys/netinet6/nd6.c: revision 1.245 sys/netipsec/ipsec_input.c: revision 1.52 sys/netipsec/ipsec_input.c: revision 1.53 sys/net/agr/if_agrsubr.h: revision 1.5 sys/kern/subr_workqueue.c: revision 1.35 sys/netipsec/ipsec.c: revision 1.124 sys/net/agr/if_agrsubr.c: revision 1.11 sys/net/agr/if_agrsubr.c: revision 1.12 Simplify; share agr_vlan_add and agr_vlan_del (NFCI) Fix late NULL-checking (CID 1427782: Null pointer dereferences (REVERSE_INULL)) KNF: replace soft tabs with hard tabs Add missing NULL-checking for m_pullup (CID 1427770: Null pointer dereferences (NULL_RETURNS)) Add locking. Revert "Get rid of unnecessary splsoftnet" (v1.133) It's not always true that softnet_lock is held these places. See PR kern/52947. Get rid of unnecessary splsoftnet (redo) Unless NET_MPSAFE, splsoftnet is still needed for rt_* functions. Use existing fill_[pd]rlist() functions to calculate size of buffer to allocate, rather than relying on an arbitrary length passed in from userland. Allow copyout() of partial results if the user buffer is too small, to be consistent with the way sysctl(3) is documented. Garbage-collect now-unused third parrameter in the fill_[pd]rlist() functions. As discussed on IRC. OK kamil@ and christos@ XXX Needs pull-up to netbsd-8 branch. Simplify, from christos@ More simplification, this time from ozaki-r@ No need to break after return. One more from christos@ No need to initialize fill_func more cleanup (don't allow oldlenp == NULL) Destroy ifq_lock at the end of if_detach It still can be used in if_detach. Prevent rt_free_global.wk from being enqueued to workqueue doubly Check if a queued work is tried to be enqueued again, which is not allowed
|
1.41.6.1 |
| 02-Jan-2018 |
snj | Pull up following revision(s) (requested by ozaki-r in ticket #456): sys/arch/arm/sunxi/sunxi_emac.c: 1.9 sys/dev/ic/dwc_gmac.c: 1.43-1.44 sys/dev/pci/if_iwm.c: 1.75 sys/dev/pci/if_wm.c: 1.543 sys/dev/pci/ixgbe/ixgbe.c: 1.112 sys/dev/pci/ixgbe/ixv.c: 1.74 sys/kern/sys_socket.c: 1.75 sys/net/agr/if_agr.c: 1.43 sys/net/bpf.c: 1.219 sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416 sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257 sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146 sys/net/if_etherip.c: 1.40 sys/net/if_ethersubr.c: 1.243, 1.246 sys/net/if_faith.c: 1.57 sys/net/if_gif.c: 1.132 sys/net/if_l2tp.c: 1.15, 1.17 sys/net/if_loop.c: 1.98-1.101 sys/net/if_media.c: 1.35 sys/net/if_pppoe.c: 1.131-1.132 sys/net/if_spppsubr.c: 1.176-1.177 sys/net/if_tun.c: 1.142 sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121 sys/net/npf/npf_ifaddr.c: 1.3 sys/net/npf/npf_os.c: 1.8-1.9 sys/net/rtsock.c: 1.230 sys/netcan/if_canloop.c: 1.3-1.5 sys/netinet/if_arp.c: 1.255 sys/netinet/igmp.c: 1.65 sys/netinet/in.c: 1.210-1.211 sys/netinet/in_pcb.c: 1.180 sys/netinet/ip_carp.c: 1.92, 1.94 sys/netinet/ip_flow.c: 1.81 sys/netinet/ip_input.c: 1.362 sys/netinet/ip_mroute.c: 1.147 sys/netinet/ip_output.c: 1.283, 1.285, 1.287 sys/netinet6/frag6.c: 1.61 sys/netinet6/in6.c: 1.251, 1.255 sys/netinet6/in6_pcb.c: 1.162 sys/netinet6/ip6_flow.c: 1.35 sys/netinet6/ip6_input.c: 1.183 sys/netinet6/ip6_output.c: 1.196 sys/netinet6/mld6.c: 1.90 sys/netinet6/nd6.c: 1.239-1.240 sys/netinet6/nd6_nbr.c: 1.139 sys/netinet6/nd6_rtr.c: 1.136 sys/netipsec/ipsec_output.c: 1.65 sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10 kmem_intr_free kmem_intr_[z]alloced memory the underlying pools are the same but api-wise those should match Unify IFEF_*_MPSAFE into IFEF_MPSAFE There are already two flags for if_output and if_start, however, it seems such MPSAFE flags are eventually needed for all if_XXX operations. Having discrete flags for each operation is wasteful of if_extflags bits. So let's unify the flags into one: IFEF_MPSAFE. Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so we can change them without breaking backward compatibility of the releases (though the kernel version of -current should be bumped). Note that if an interface have both MP-safe and non-MP-safe operations at a time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe opeartions take the kernel lock. Proposed on tech-kern@ and tech-net@ Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..." scattered all over the source code and makes it easy to identify remaining KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE. No functional change Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE If IFEF_MPSAFE is set, hold the lock and otherwise don't hold. This change requires additions of KERNEL_LOCK to subsequence functions from if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe components. Proposed on tech-kern@ and tech-net@ Ensure to hold if_ioctl_lock when calling if_flags_set Fix locking against myself on ifpromisc vlan_unconfig_locked could be called with holding if_ioctl_lock. Ensure to not turn on IFF_RUNNING of an interface until its initialization completes And ensure to turn off it before destruction as per IFF_RUNNING's description "resource allocated". (The description is a bit doubtful though, I believe the change is still proper.) Ensure to hold if_ioctl_lock on if_up and if_down One exception for if_down is if_detach; in the case the lock isn't needed because it's guaranteed that no other one can access ifp at that point. Make if_link_queue MP-safe if IFEF_MPSAFE if_link_queue is a queue to store events of link state changes, which is used to pass events from (typically) an interrupt handler to if_link_state_change softint. The queue was protected by KERNEL_LOCK so far, but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it by a spin mutex. Additionally with this change KERNEL_LOCK of if_link_state_change softint is omitted if NET_MPSAFE is enabled. Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of if_timer (see the comment). Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH At that point no other one modifies the list so IFADDR_READER_FOREACH is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though, if we try to detect contract violations of pserialize, using it violates the contract. So avoid using it makes life easy. Ensure to call if_addr_init with holding if_ioctl_lock Get rid of outdated comments Fix build of kernels without ether By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that created a unnecessary dependency from if.c to if_ethersubr.c. PR kern/52790 Rename IFNET_LOCK to IFNET_GLOBAL_LOCK IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then). Wrap if_ioctl_lock with IFNET_* macros (NFC) Also if_ioctl_lock perhaps needs to be renamed to something because it's now not just for ioctl... Reorder some destruction routines in if_detach - Destroy if_ioctl_lock at the end of the if_detach because it's used in various destruction routines - Move psref_target_destroy after pr_purgeif because we want to use psref in pr_purgeif (otherwise destruction procedures can be tricky) Ensure to call if_mcast_op with holding IFNET_LOCK Note that CARP doesn't deal with IFNET_LOCK yet. Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held Describe which lock is used to protect each member variable of struct ifnet Requested by skrll@ Write a guideline for converting an interface to IFEF_MPSAFE Requested by skrll@ Note that IFNET_LOCK must not be held in softint Don't set IFEF_MPSAFE unless NET_MPSAFE at this point Because recent investigations show that interfaces with IFEF_MPSAFE need to follow additional restrictions to work with the flag safely. We should enable it on an interface by default only if the interface surely satisfies the restrictions, which are described in if.h. Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because the network stack is still serialized by the big kernel locks by default.
|
1.46.2.1 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.47.2.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.47.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.47.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.50.2.1 |
| 29-Feb-2020 |
ad | Sync with head.
|