| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
also the comment above IFQ_ENQUEUE that says the pattr argument is unused.
ok mpi@
|
|
|
|
| |
ok mikeb@
|
|
|
|
|
|
|
| |
return EPNOTSUPP for SIOCGLIFPHYTTL and SIOCGVNETID. all so drivers
dont have to do these checks themselves.
ok mikeb@ mpi@
|
|
|
|
| |
ok dlg@, kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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@ questioned usefulness of if_snd.ifq_drops, but this is what exists now.
This area is going to be readily polished.
OK dlg@
|
|
|
|
|
|
|
| |
this is done by moving to the refcnt api and using refcnt_finalize.
tested by Hrjove Popovski
ok mpi@
|
|
|
|
|
| |
With suggestions from tedu@ and guenther@
ok kettenis@
|
|
|
|
| |
With and ok claudio@
|
|
|
|
|
|
| |
needs to see lo0 in the output path.
ok claudio@
|
|
|
|
| |
refcnt_finalize.
|
|
|
|
|
|
| |
context.
ok mpi@, 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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
each index in the ifidx map is now an SRP that points at each
interfaces struct ifnet.
because the map needs to be grown at run time as interfaces are
added to the system, we now use an SRP to gain access to the map.
if_get enters the idx map and follows it to the ifnet pointer. if
an interface exists at that index it gets adds a refcount before
leaving the ifp SRP.
modifications to the map pointer and the interface pointers are
serialised by the kernel lock.
ok mpi@ claudio@
|
|
|
|
|
|
|
|
|
|
| |
the protocol queues.
It basically does what looutput() was doing but having a generic
function will allow us to get rid of the loopback hack overwwritting
the rt_ifp field of RTF_LOCAL routes.
ok mikeb@, dlg@, claudio@
|
|
|
|
|
|
| |
entry.
ok bluhm@, claudio@
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
entry forever.
this will fix hangs when you have more than 7 interfaces.
ok mpi@
|
|
|
|
|
|
| |
this also tries to document how things work and what if index 0 is for.
ok mpi@ claudio@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
the map.
avoids a NULL deref jsg@ found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if_get can get a reference to an ifp, but it never releases that
reference. this provides an if_put function that can be used to
decrement the refcount.
we cannot come up with a scheme for letting the network stack run on
one (or many) cpus while ioctls are pulling interfaces down on another
cpu without refcounts for the interfaces.
if_put is going in now so we can go through the stack and put the
necessary calls to it in, and then we'll backfill this implementation
to actually check the refcounts when the interface detaches.
ok mpi@ mikeb@ claudio@
|
| |
|
|
|
|
|
|
|
| |
As a side effect there's no need to run if_attachdomain() after the
list of domains has been built.
ok claudio@, reyk@
|
| |
|
|
|
|
| |
Prodded by and ok bluhm@
|
| |
|
|
|
|
|
|
| |
load ifp->if_bpf into a local variable, test that, and pass it to bpf.
this is instead of instead of assuming ifp->if_bpf wont change between
checking it and passing it to bpf.
|
|
|
|
|
|
|
|
| |
does not have any registered handler.
Plug a mbuf leak found by sthen@ with gif(4) in a bridge.
ok sthen@, claudio@
|
|
|
|
|
|
| |
directly. Also protect non mp-safe functions while at it.
ok mpi@.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
if_input() has been designed to be able to safely handle a batch of
packets from physical drivers to the network stack. Most of these
drivers have an interrupt routine executed at IPL_NET and the check
made sense during the conversion. However we also want to re-enqueue
packets with if_input() from the network stack currently running at
IPL_SOFTNET.
ok claudio@
|
|
|
|
|
|
| |
with MPLS packets.
ok mpi@, claudio@
|
|
|
|
|
|
|
|
|
| |
in the &ifnet list of interfaces.
carp(4) is slowly becoming less special. Should keep the carp interfaces
in the correct order in ifconfig output as reported by Johan Huldtgren.
ok florian@, claudio@, benno@
|
|
|
|
|
|
|
|
|
|
| |
Code abusing the radix internals for the routing table should now
includes <net/rtable.h> and only deal with "struct rtentry".
Code using a radix tree for another purpose can still include
<net/radix.h>.
Inputs from and ok claudio@, mikeb@
|
|
|
|
| |
Tweak and ok florian@
|
|
|
|
|
|
|
|
| |
if a pseudo-interface is on a different rdomain than its parent.
Sorry for the inconvenience, I hope you'll fly again with us.
Regression reported by and ok semarie@, ok phessler@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
This fix some weird bridge(4) configurations involving pseudo-drivers
stacked on top of interfaces in a bridge.
Also simplifies the loop prevention logic to match bridge's input path.
Instead of using a tag per port/bridge simply flag output mbufs to make
sure only one copy per bridge go through bridge_output().
ok bluhm@, claudio@
|
|
|
|
|
|
|
|
| |
Not all drivers make use of ether_output() and there's no real reason to
call it when no ARP resolution is needed. But in this case we still want
to make sure we're sending packets in the correct rdomain.
ok bluhm@, claudio@ as part of a larger diff.
|
|
|
|
|
|
|
|
|
| |
an interface is destroyed or removed.
Since the introduction of ph_ifidx, as soon as a mbuf with an invalid
interface index is dequeued it will be freed.
ok claudio@, dlg@
|
|
|
|
|
|
|
| |
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move bridge_input() outside of ether_input() in order to duplicate packets
flowing through a bridge port before applying any transformation on mbufs.
This saves a various m_adj(9)/M_PREPEND(9) dances and remove the bridge(4)
hack from vlan(4).
Tested by mxb <mxb AT alumni DOT chalmers DOT se> and kettenis@
ok bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|