| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok dlg@ kn@
|
|
|
|
|
|
|
|
|
|
| |
Less scheduling, lock contention and queues.
Previously, if_netisr() handled the net lock around those calls, now
if_input_process() does it before calling ether_input(), so no need to add
or remove NET_*LOCK() anywhere.
OK mvs claudio
|
|
|
|
| |
ok claudio@ kn@
|
|
|
|
|
|
| |
local variable. This argument was always passed as 0.
ok kn@
|
|
|
|
|
|
|
|
| |
Pretty much all members are under the net lock, some are proctected by
both net and kernel lock, e.g. the start routine is called with
KERNEL_LOCK().
OK mpi
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.
Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.
OK mvs
|
|
|
|
|
|
|
|
| |
There are either length variables tracking the allocated buffer or strings
allocated by their length, reuse the same idiom each time when freeing.
Reminder from Peter J. Philipp to account for NUL bytes in strings as well
OK mvs
|
|
|
|
| |
ok mpi@
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
|
|
|
|
|
| |
All ticks arguments to timeout_add() calls are positive multiple of hz, so
simply reduce it and use the appropiate function.
Also, (hz / 50) [ticks] = 1 / 50 [s] = 20 [ms].
OK mpi
|
|
|
|
|
|
|
| |
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
|
|
|
|
| |
memory shortage. As it is invoked from a system call, it should
not fail and wait instead.
OK visa@ mpi@
|
| |
|
|
|
|
| |
Tested by Hrvoje Popovski, ok bluhm@
|
|
|
|
|
|
|
| |
freed but another m_freem call happens later. Set m to NULL if m_pulldown()
fails like in all other cases of this function.
Found by Ilja Van Sprundel
OK bluhm@
|
|
|
|
|
|
| |
While here remove superfluous splnet()/splx() in the ioctl routine.
ok sashan@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
|
| |
this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.
ok mpi@ deraadt@
|
| |
|
|
|
|
| |
Assert reported and diff tested by semarie@
|
|
|
|
|
|
| |
new "llprio" setting on the pppoe(4) interface instead.
Tested by Daniel Gillen and myself, ok mikeb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
priority. This is translated into an 802.1p priority tag when
sent over a vlan interface, reducing the risk of them being
crowded out by data packets on a busy link.
Some users have problems with ISPs that place specific
requirements on vlan priority (typically the packet header
value must be '0', relating to priority 1). This diff
doesn't fix that yet, but gives a single place to patch
to change tags on control packets without affecting
normal vlan priority operation on other interfaces.
ok mikeb.
|
|
|
|
|
|
|
|
|
|
|
| |
The EBUSY hack imposes an order on the ifconfig commands issued
against the pppoe interface used to configure the sppp layer below.
To counter this we use the ENETRESET trick that other drivers use
to tell the pppoe layer that sppp has requested a stop/init reset
sequence to proceed which we oblige with in case pppoe is UP and
RUNNING.
Tested by semarie@ and Jan Schreiber <jes@posteo.de>, thanks!
|
| |
|
|
|
|
|
|
|
|
|
| |
eleven years, remove it.
Despite what the wildly outdated time(9) claims, there is no longer
globally visible "struct timeval mono_time" or "struct timeval time".
ok mpi@ sthen@ mikeb@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
pointer to the parent "pppoedev", it now only stores an interface
index. This also fixes a potential NULL pointer dereference that
could happen in pppoe_find_softc_by_session() when the parent got
deconfigured but the session was still active.
Found the hard way with pppoe(4) on vlan7.
OK mpi@, with debugging help from mikeb@
|
|
|
|
|
|
|
| |
support for sppp with framing, simplifying things. Remove unused ifdefs while
there.
"sppp will go away before it gets used for something else" dlg@
|
|
|
|
|
|
|
|
|
| |
L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''. Not having to care about an ``ifa'' makes our life easier
in our MP effort. Fewer dependencies between data structures implies
fewer headaches.
Discussed with bluhm@, ok claudio@
|
|
|
|
|
|
| |
needs to see lo0 in the output path.
ok claudio@
|
|
|
|
|
|
|
|
|
| |
Use instead the RTF_LOCAL flag to loop local traffic back to the
corresponding protocol queue.
With this change rt_ifp is now always the same as rt_ifa->ifa_ifp.
ok claudio@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
receiving interface in the packet header of every mbuf.
The interface pointer should now be retrieved when necessary with
if_get(). If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.
Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.
Tested by jmatthew@ and krw@, discussed with many.
ok mikeb@, bluhm@, dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with niqueues.
this change is so big because there's a lot of code that takes
pointers to different input queues (eg, ether_input picks between
ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through
to code to enqueue packets against the pointer. if i changed only
one of the input queues id have to add sepearate code paths, one
for ifqueues and one for niqueues in each of these places
by flipping all these input queues at once i can keep the currently
common code common.
testing by mpi@ sthen@ and rafael zalamena
ok mpi@ sthen@ claudio@ henning@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
| |
ok mikeb@, krw@, bluhm@, tedu@
|
|
|
|
| |
to include that than rdnvar.h. ok deraadt dlg
|
|
|
|
|
|
| |
Active Discovery Terminate packets.
ok mikeb@, henning@, phessler@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
| |
the #define stays since it's userland visible and who knows what uses it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the confusion by using an appropriate name for the variable.
Note that since routing domain IDs are a subset of the set of routing
table IDs, the following idiom is correct:
rtableid = rdomain
But to get the routing domain ID corresponding to a given routing table
ID, you must call rtable_l2(9).
claudio@ likes it, ok mikeb@
|
|
|
|
|
|
|
| |
move them to the corresponding header with an appropriate comment if
necessary.
ok guenther@
|
| |
|
|
|
|
| |
figured out by and ok guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compatible equipment provided that the physical interface and other layer 2
devices involved support and are configured to use jumbo frames.
Manpage to follow; typical use is to request 1500 MTU for pppoe, this
requires 1508+ MTU on the physical interface, e.g. "ifconfig em0 mtu 1508;
ifconfig pppoe0 mtu 1500". Known to be usable in the UK with some ISPs
(e.g. aaisp) using BT FTTC backhaul.
From Matt Dainty, originally based on support in NetBSD, changed to
decouple pppoe from physical interface MTU. Tested with UK FTTC by Matt,
no regressions on my standard UK ADSL setup or yasuoka@'s setup (in Japan,
NTT uses 1452 byte MTU for PPPoE and 1500 byte MTU for IPv6 on the same
network).
ok yasuoka@
|
| |
|
|
|
|
| |
ones that make assumptions about ifqueue internals... ok ryan claudio
|
|
|
|
|
|
|
| |
Encapsulated pppoe packets are moved into the rdomain of the physical interface
because it is possible that a pppoe(4) interface is in a different rdomain
then the physical interface.
OK reyk@
|
|
|
|
|
|
| |
levels. This will allow for platforms where soft interrupt levels do not
map to real hardware interrupt levels to have soft ipl values overlapping
hard ipl values without breaking spl asserts.
|
|
|
|
|
| |
interfaces attached to different networks can use the same session id.
reported by gm_sjo <saqmaster at gmail dot com>
|
|
|
|
|
|
|
| |
there, fix some typos, and pass M_CANFAIL to all malloc() calls which use
M_WAITOK but are tested for failure.
test&ok brad@
|