Age | Commit message (Collapse) | Author |
|
ok mpi@ mikeb@ sthen@
|
|
ok dlg@, kettenis@
|
|
is no point in keeping an unused level of abstraction.
ok mikeb@, claudio@
|
|
another not so simple free, repaired by mpi
|
|
|
|
net/rtable.c. This will ease the introduction of rtable_put().
Routing tables are mapped to a tuple (idx, af) so the public API
should as much as possible require these two keys.
ok dlg@
|
|
The routing table is not an optional component of the network stack
and initializing it inside the "routing domain" requires some ugly
introspection in the domain interface.
This put the rtable* layer at the same level of the if* level. These
two subsystem are organized around the two global data structure used
in the network stack:
- the global &ifnet list, to be used in process context only, and
- the routing table which can be read in interrupt context.
This change makes the rtable_* layer domain-aware and extends the
"struct domain" such that INET, INET6 and MPLS can specify the length
of the binary key used in lookups. This allows us to keep, or move
towards, AF-free route and rtable layers.
While here stop the madness and pass the size of the maximum key length
in *byte* to rn_inithead0().
ok claudio@, mikeb@
|
|
|
|
rtable_insert().
inputs and ok bluhm@
|
|
corresponding interface.
bfp_tap() and _bpf_mtap() are mostly run without the KERNEL_LOCK. The
use of SRPs in these functions gives us the guarantees that manipulated
BPF descriptors are alive but not the associated interface desctiptor!
And indeed they can be cleared by another CPU running bpf_detachd().
Prevent a race reported by Hrvoje Popovski when closing tcpdump(8) with
an IPL_MPSAFE ix(4).
ok mikeb@, dlg@, deraadt@
|
|
(Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because
IFQ_ENQUEUE() already does it. Oops.)
After this revert, the situation becomes:
- if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but
it is not shown to userland, and
- if_data.ifi_oqdrops is shown to userland, but it is not incremented by
anyone.
|
|
mpi@ prefers checking IFQ_ENQUEUE() error, and this matches that.
OK dlg@
|
|
mpi@ plans to clean-up IF_DROP()'s, but fix consistent use of it for now.
OK dlg@
|
|
mpi@ questioned usefulness of if_snd.ifq_drops, but this is what exists now.
This area is going to be readily polished.
OK dlg@
|
|
Necessary bumps in Ports will be handled by sthen@.
OK mpi@ dlg@
|
|
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
|
|
diff from Yuuichi Someya
|
|
ok deraadt@
|
|
Input deraadt@
Bug fix & OK benno@
|
|
interface whose tunnel destination corresponded to the incoming packets'
source address.
ok reyk
|
|
|
|
this avoids confusion with the public functions (hfsc_enqueue,
hfsc_dequeue, etc), and maps almost 1:1 to the mbuf list ops they
now use.
ok mpi@ henning@ mikeb@
|
|
the rest was done in r1.96. ok mikeb@
|
|
this will allow packets to taken off an interfaces send queue, and
requeued if space didnt exist on the hardware.
the internal names are a bit ugly, i want to change them in the
next commit.
ok henning@ mpi@
|
|
this is done by moving to the refcnt api and using refcnt_finalize.
tested by Hrjove Popovski
ok mpi@
|
|
and always return EHOSTUNREACH.
Please let me know if you find any new "No route to host" error.
ok claudio@
|
|
ppp framing, and the drivers for sync serial cards have been removed so the
sppp code is now only used to support pppoe(4). ok mpi@, kill it chris@
|
|
bpf_program contains a pointer to that same array, but also the
number of elements in it. this allows us to know the size when we
want to free them.
ok deraadt@
|
|
ok mpi
|
|
|
|
for ART.
While here sync the two remaining mix() macros.
ok chris@, dlg@
|
|
Tested by <mxb AT alumni DOT chalmers DOT se>.
ok dlg@
|
|
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@
|
|
Can be used to check if a MAC address is all zeros.
Will be used by iwm(4) soon.
ok kettenis@
|
|
With suggestions from tedu@ and guenther@
ok kettenis@
|
|
the mbuf in both the hfsc and priq error paths.
ok mikeb@ mpi@ claudio@ henning@
|
|
Local route entries, being now attached to their corresponding interface,
are susceptible to be brought DOWN when a link state change occurs. When
this happens locally configured addresses are no longer reachable.
So keep the previous (original) behavior by forcing such route entries to
always be UP.
ok sthen@, claudio@
|
|
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
|
|
ok dlg, mpi
|
|
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
|
|
specific places.
ok claudio@, benno@
|
|
ok yasuoka@
|
|
rtrequest1(9) otherwise the route will remain attached to a stale ifa.
Found by matthieu@
|
|
From David Hill, ok sthen@
|
|
Found by benno@.
ok phessler@, claudio@, benno@
|
|
so packets can get enqueued for the arp netisr to process.
fixes jsgs nfs mountroot problem.
|
|
ok mpi@
|