Age | Commit message (Collapse) | Author |
|
this lets pflogd run again.
rename if_data() to if_getdata() while here to make grepping for
things less noisy.
reported by jsg@
worked through with deraadt@
|
|
a new if_data() function takes a pointer to ifnet and merges its
if_data and ifq statistics. it takes the ifq mutex around the reads
of the ifq stats so they get a consistent copy.
the ifnet and ifq stats are merged because some parts of the stack
still update the ifnet counters.
ok visa@ (on an earlier diff) mpi@ claudio@
|
|
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@
|
|
Network drivers shouldn't have to deal with PF data structures. This change
prevent m_free(9) called from an interrupt handler at IPL_NET to mess with
pf(4) internals.
Prevent an splassert reported by Mark Patruck.
ok mikeb@, bluhm@
|
|
run a drivers ioctl handler and check if it worked before calling
if_up or if_down to report the change. propagate that error up to
userland so ifconfig can report what happened.
ok mpi@
|
|
only check ml_empty the second time if bpf was run and may have
filtered the list.
only call task_add if mq_enlist worked.
|
|
this saves doing wakeups of the softnet thread.
ok deraadt@
|
|
Pointed out by and ok jsg@, ok mikeb@
|
|
splsoftnet()/splx() until the known issues are fixed.
In other words, stop using a rwlock since it creates a deadlock when
chrome is used.
Issue reported by Dimitris Papastamos and kettenis@
ok visa@
|
|
Helps route(4) listeners to refresh their knowledge of the MTU of
interfaces. Prompted by a diff for ospfd(8) by Remi Locherer, ok claudio@
|
|
With help from and OK mpi.
|
|
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.
This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.
Inputs from and ok bluhm@, ok dlg@
|
|
inputs and ok bluhm@
|
|
Local var 'up' is never set in ifioctl().
OK mpi@
|
|
|
|
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@, claudio@
|
|
Prodded by claudio@
|
|
Make rdomain's default loopback test pass again.
|
|
In order to stop abusing lo0 for all rdomains, a new loopback interface
will be created every time a rdomain is created. The unit number will
be the same as the rdomain, i.e. lo1 will be attached to rdomain 1.
If this loopback interface is already in use it wont be possible to create
the corresponding rdomain.
In order to know which lo(4) interface is attached to a rdomain, its index
is stored in the rtable/rdomain map.
This is a long overdue since the introduction of rtable/rdomain. It also
fixes a recent regression due to resetting the rdomain of an incoming
packet reported by semarie@, Andreas Bartelt and Nils Frohberg.
ok claudio@
|
|
|
|
ok vgross@
|
|
ok bluhm henning
|
|
accumulated during processing, especially pf(4) data is removed.
When a packet is reinserted to local input processing, we have to
start from scratch with a clean mbuf header. Also the packet has
to be in the routing doamin of the interface where it is inserted.
Incoming packet with stale inp pointer seen by patrick@ on lo(4);
OK sashan@ mpi@
|
|
OK guenther@
|
|
adding code to if.c.
ok mpi@
|
|
code to if.c.
ok mpi@
|
|
the switch(4) without prior removal.
ok reyk@, goda@
|
|
From dhill@, found the hardway by semarie@
|
|
With and ok mpi, tested by David Hill and tb@, thanks!
|
|
linkstate is changed from if_up() & if_down().
ok claudio@
|
|
Requested by and ok dlg@
|
|
reference count.
rtable_iterate() frees the passed ``rt'' and returns the next one on the
multipath list or NULL if there's none.
ok dlg@
|
|
pass the ifindex to that function and not the ifp. This fixes the missing
link state change messages on if_up and if_down. This is a fix for Rev 1.444
which introduced this problem.
OK florian@
|
|
or linkstate task sleeping.
Pass an index to the task and use if_get(9) if the ifp is still alive.
Found the hardway by awolk@.
ok claudio@, bluhm@, mikeb@
|
|
device, inherit the rdomain from the calling process. This adds an
rdomain argument to if_clone_create().
OK mpi@ henning@
|
|
to a new function if_setrdomain().
OK mpi@ henning@
|
|
This is done to stop using stale ifa attached to routes, which is
the easiest way to make rtisvalid(9) MP-safe.
sthen@ and henning@ like it, ok claudio@
|
|
This is a correctness change that will allow us to check that
nothing happend with kernel added routes.
|
|
Reduce the number of if_get/if_put from one per packet to one per ring
since we now know that all the packets are coming from the same interface.
Improve forwarding performances by 10Kpps in Hrvoje Popovski's test setup.
ok bluhm@, henning@, dlg@
|
|
switch(4) currently supports OpenFlow 1.3.5.
Currently, it's disabled by the kernel config.
With help from yasuoka@ reyk@ jsg@.
ok deraadt@ yasuoka@ reyk@ henning@
|
|
the big reason for this is to let us use rw locks in the network
stack, which is how at least two major efforts outside the tree
have approached making pf mpsafe.
this was discussed at length at n2k16. there was general agreement
that this is necessary for us to move smp work forward in the stack.
|
|
triggered by updating a cached, but removed from the table, entry is
properly fixed.
Diff from dlg@, prodding deraadt@
|
|
input handlers.
ok dlg@
|
|
to ifconfig.
"llprio" allows one to set the priority of packets that do not go through
pf(4), as the case is for arp(4) or bpf(4).
ok sthen@ mikeb@
|
|
the srp_ref struct is used to track the location of the callers
hazard pointer so later calls to srp_follow and srp_enter already
know what to clear. this in turn means most of the caveats around
using srps go away. specifically, you can now:
- switch cpus while holding an srp ref
- ie, you can sleep while holding an srp ref
- you can take and release srp refs in any order
the original intent was to simplify use of the api when dealing
with complicated data structures. the caller now no longer has to
track the location of the srp a value was fetched from, the srp_ref
effectively does that for you.
srp lists have been refactored to use srp_refs instead of srpl_iter
structs.
this is in preparation of using srps inside the ART code. ART is a
complicated data structure, and lookups require overlapping holds
of srp references.
ok mpi@ jmatthew@
|
|
ok mpi@
|
|
hint.
ok kettenis@, deraadt@
|
|
Use a new task that runs holding the KERNEL_LOCK to execute mp-unsafe
code. Our current goal is to progressively move input functions to the
unlocked task.
This gives a small performance boost confirmed by Hrvoje Popovski's
IPv4 forwarding measurement:
before: after:
send receive send receive
400kpps 400kpps 400kpps 400kpps
500kpps 500kpps 500kpps 500kpps
600kpps 600kpps 600kpps 600kpps
650kpps 650kpps 650kpps 640kpps
700kpps 700kpps 700kpps 700kpps
720kpps 640kpps 720kpps 710kpps
800kpps 640kpps 800kpps 650kpps
1.4Mpps 570kpps 1.4Mpps 590kpps
14Mpps 570kpps 14Mpps 590kpps
ok kettenis@, bluhm@, dlg@
|
|
detect this and bump ifq_congestion forward rather than claim the
system is congested for a long period of time.
ok mpi@ henning@ jmatthew@
|
|
ok mpi@ millert@
|