Age | Commit message (Collapse) | Author |
|
dont check if its busy at all, actually.
fine with reyk@
|
|
only a driver sets or clears it, and trunk never sets it. therefore it
never needs to clear it.
|
|
ok dlg@
|
|
|
|
lladdr the trunk port is already on the list.
OK mpi
|
|
and a bunch of header fields we have to parse the mbuf for.
siphash24 is about 20% of the cost of sending a udp packet on a
trunk interface with tcpbench on my box. if there's a flowid set
we get all that back.
ok mpi@ mikeb@ sthen@
|
|
This is slightly refactored version of the diff by jmatthew@
that makes use of a single per-trunk task but retains per-port
mbuf queues.
Running LACP frame processing in a task context allows a simple
way to synchronize changes to the trunk ports and trunk itself
performed from the ioctl, timeout and task contexts with a kernel
lock.
OK mpi
|
|
ok mpi
|
|
Instead of violating a layer of abstraction by keeping per pseudo-driver
informations in "struct ifnet", the port trunk is now passed as a cookie
to the interface input handler (ifih).
The time of per pseudo-driver hack in the network stack is over!
ok mikeb@
|
|
requested by mpi@
|
|
reclaiming to the PDU and marker input routines.
m_pullup may return a pointer to the newly allocated mbuf. In this
case m_freem is called by the trunk_input, not by the proto specific
code and pointer to the mbuf is not passed by reference. Therefore
m_freem will either be called on the middle element of the chain
(when the m_pullup call succeeds) or on the stale pointer (when it
frees the chain in the failure case). Fortunately we should never
hit this case as the receive path uniformly uses contiguous chunks
of memory.
Verified with and ok blambert, ok mpi
|
|
This moves around calls to if_ih_insert and if_ih_remove to ensure
that we either have completed port initialization or are going to
tear the port configuration down and don't want any input processes
to get hold of the port.
When trunk_port_destroy is called from the ioctl this would wait for
all input processes to finish and release their references to be able
to disestablish the input handler and ensure full control of the port.
When switching trunkproto it is required for the ioctl context to
be able to touch all trunk ports and the protocol (tr_psc). The
easiest way do this is to disestablish all input handlers (while
making sure they all complete) and then reestablish them after the
trunk reconfiguration is completed.
This avoids getting trunk a separate locking protocol of its own.
ok mpi, suggested by and ok dlg
|
|
iterations and additional locking protection in the future.
Suggested by and ok mpi
|
|
and we want to limit the number of different places where we
access trunk port pointers.
trunk_watchdog should be never called as we don't set up it's
if_timer and trunk_port_watchdog just calls the if_watchdog
from the underlying interface.
It's possible that this is no longer needed due to if_slowtimo/
if_watchdog changes done earlier.
ok mpi
|
|
to pass additional context or transient data with the similar life
time.
ok mpi, suggestions, hand holding and ok from dlg
|
|
instead of having every driver that manipulates the ifih list
understand SRPLs, this moves that processing into if_ih_insert and
if_ih_remove functions.
we rely on the kernel lock to serialise the modifications to the
list.
tested by mpi@
ok mpi@ claudio@ mikeb@
|
|
in promiscuous mode.
The long story is that claudio@ had his ssh session reset multiple
times in the hackroom because czarkoff@'s machine was sending reset.
We figured out that the packet was reaching pf because of this missing
check. pf would then not find any state and sent a reset.
Analyzed with and ok phessler@, claudio@
|
|
|
|
ifp in order to access its ifih handlers.
So get rid of if_get() in the various ifih handlers we know the ifp is
live at this point.
ok dlg@
|
|
talking about (*ifp->if_output)().
ok claudio@, dlg@
|
|
tweaks and ok mpi@
|
|
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
|
|
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@
|
|
in my case dhclient(8), races with ifconfig(8) to free the descriptors
of the joined multicast groups.
While here reduce the difference with carp(4).
ok dms@
|
|
ok dlg@
|
|
the second (unused) argument of the input packet handlers.
ok dlg@
|
|
a packet on the sending queue of an interface.
Tested by many, thanks a lot!
ok dlg@, claudio@
|
|
since they have the same lifetime.
Requested by and ok dlg@
|
|
function.
ok claudio@, reyk@
|
|
Each physical interface of a trunk now gets a specific ifih (interface
input handler) that runs before ether_input().
Tested by sthen@, dlg@, Theo Buehler and <mxb AT alumni.chalmers DOT se>
ok sthen@, dlg@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
long live the one true internet.
ok henning mikeb
|
|
|
|
This removes the system wide if_slowtimo timeout and lets every
interface with a valid if_watchdog method register it's own in
order to get rid of the ifnet loop in the softclock context and
avoid further complications with concurrent access to the ifnet
list.
ok deraadt, input and ok mpi, looked at by claudio
|
|
to include that than rdnvar.h. ok deraadt dlg
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
the various bpf_mtap_* are very similiar, they differ in what (and to some
extent how) they prepend something, and what copy function they pass to
bpf_catchpacket.
use an internal _bpf_mtap as "backend" for bpf_mtap and friends.
extend bpf_mtap_hdr so that it covers all common cases:
if dlen is 0, nothing gets prepended.
copy function can be given, if NULL the default bpf_mcopy is used.
adjust the existing bpf_mtap_hdr users to pass a NULL ptr for the copy fn.
re-implement bpf_mtap_af as simple wrapper for bpf_mtap_hdr.
re-implement bpf_mtap_ether using bpf_map_hdr
re-implement bpf_mtap_pflog as trivial bpf_mtap_hdr wrapper
ok bluhm benno
|
|
ok mikeb@
|
|
ok deraadt@
|
|
While here add a comment explaining detach hooks' order of execution when
destroying/detaching an interface.
|
|
Reported by naddy@
|
|
structure rather than doing various M_WAITOK allocations during
the *attach() functions, we always rely on them anyway.
ok mikeb@, uebayasi@
|
|
jumbo/baby-jumbo frames. To avoid problems with mismatches between trunkports,
any additional ports must have the same MTU as already set on the trunk(4).
Based on changes made in FreeBSD. Tested by myself and jj@, ok reyk@
|
|
array indexed by interface numbers, add a new field to the interface
descriptor pointing to it.
claudio@ and todd@ like it, ok mikeb@
|
|
|
|
the mbuf it just sent on the previous interface. this is bad because the
previous interface could have modified the mbuf chain, which can make the
subsequent m_copym()s panic.
this copies the dance that rtsock.c does for broadcasting mbufs which
copies the mbuf before transmit, except for the last interface which it
handles outside the loop.
tested by halex@ who verified it fixes his panic.
ok claudio@ deraadt@
|
|
tr_linkstate() was not initialized in trunk_rr_attach(), and
tr_init() and tr_stop() were missing in trunk_lb_attach().
Fixes crash triggered by changing trunkproto, reported by Anders
Berggren on bugs@.
ok mpf henning
|
|
broadcast mode.
ok blambert@ mikeb@
|
|
no change in .o
ok claudio
|