Age | Commit message (Collapse) | Author |
|
current status and statistics and can be exported without super-user
rights via sysctl to make it easier for tools like systat to access those.
OK deraadt@, sashan@
|
|
protecing will do the right thing
OK claudio@
|
|
|
|
caused a hanging "ifconfig bridge0 destroy" and a subsequent uvm
fault.
reported and tested by Hrvoje Popovski; OK visa@
|
|
Prevent use-after-free reported by Hrvoje Popovski.
|
|
tun_wakeup is called from the network stack, which generally runs
with NET_LOCK, not KERNEL_LOCK, which is a problem when it calls
into things like csignal or kq code. this started causing corruption
and panics of a list inside the kq code, which got reported to
bugs@.
this version of the fix is ok mpi@ (even though he hasn't seen it)
an earlier but far trickier fix was ok visa@
the bug was reported by Olivier Antoine, and again by jmc@ privately.
|
|
|
|
if_input already runs bpf for all packets on a trunkport. having
lacp code do it again means packets are seen twice by bpf filters
twice, which is misleading.
|
|
This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.
Tested by various, ok dlg@, visa@
|
|
From Naoki Fukaumi, ok yasuoka@, sthen@
|
|
we should swap the value off the wire for 802.1P, not the rxhprio
config value. try and avoid toctou issues by copying the sc_rxprio
value to a local.
|
|
it's not atomic is the main reason. this simplifies leaving the
function too.
|
|
|
|
|
|
|
|
makes vlan more consistent with the rest of the tree, but no
functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this makes it more consistent with the rest of the tree, but has
no functional change.
|
|
nothing needs to see inside it, so it can move. the next steps are
to rename it to vlan_softc and all the variables to sc to make the
driver move consistent with the rest of the tree.
ok visa@ mpi@
|
|
prevent passing negative values to timeout_add().
While here, protect against unsigned wrap around during addition of
bd_rdStart and bd_rtout since it could also cause passing negative
values to timeout_add().
ok bluhm@
Reported-by: syzbot+6771e3d6d9567b3983aa@syzkaller.appspotmail.com
|
|
makes input bytes and packets consistent
|
|
this let's input processing bypass ifiqs. there's a performance
benefit from this, and it will let me tweak the backpressure detection
mechanism that ifiqs use without impacting on a stack of virtual
interfaces.
ive tested all of these except mpw, which i will end up testing
soon anyway.
|
|
ifiqs on vlans are mostly just overhead. this improves vlan input
speeds a lot, depending on your setup. i havent seen any speed
regression with this.
|
|
if_vinput assumes that the interface that its called against uses
per cpu counters so it can count input packets, but basically does
all the things that if_input and ifiq_input do. the main difference
is it assumes the network stack is already running and runs the
interface input handlers directly. this is instead of queuing the
packets for a nettq to run.
ifiqs arent free, especially when they only run per packet like
they do on psuedo interfaces. this allows that overhead to be
bypassed.
|
|
this is a step toward letting interfaces like vlan bypass ifiqs
|
|
i need to come back to this and make it flow a bit better, but this
is a good start.
|
|
Drivers will return ENETREST if the hardware needs to be reinitialized
after successfully switching to the new media mode; it's not an error.
This change fixes unreliable 'ifconfig mode' with some wireless drivers.
ok phessler@ jmatthew@
|
|
no functional change.
|
|
reduces code duplication and chance for error.
|
|
l2 and l3 drivers do the same thing all the time, so reduce the
chance of error by doing the checks once and making it available
for drivers to call instead of rolling on their own again.
|
|
this is modelled on vlan(4) where the packet prio is put in the bpe
header in tx, and the bpe header prio is put on the packet in rx.
|
|
|
|
|
|
ok claudio@
|
|
vlan already used the 802.1p prio in packets to set the mbuf prio.
this maintains that as the default.
ok claudio@
|
|
|
|
IF_HDRPRIO_OUTER says you want the priority from the outer encap header.
ok claudio@
|
|
|
|
by default txprio is set to 0, so the exp field will be 0. howerver,
txprio on mpe/mpw/mpip can be configured with other values or
settings like our other tunnel or encapsulation interfaces.
intermediate LSPs can use the exp field to manage their prioritisation
of encapsulated traffic.
|
|
the idea is to call the hardware transmit routine less since in a
lot of cases posting a producer ring update to the chip is (very)
expensive. it's better to do it for several packets instead of each
packet, hence calling this tx mitigation.
this diff defers the call to the transmit routine to a network
taskq, or until a backlog of packets has built up. dragonflybsd
uses 16 as the size of it's backlog, so i'm copying them for now.
i've tried this before, but previous versions caused deadlocks. i
discovered that the deadlocks in the previous version was from
ifq_barrier calling taskq_barrier against the nettq. interfaces
generally hold NET_LOCK while calling ifq_barrier, but the tq might
already be waiting for the lock we hold.
this version just doesnt have ifq_barrier call taskq_barrier. it
instead relies on the IFF_RUNNING flag and normal ifq serialiser
barrier to guarantee the start routine wont be called when an
interface is going down. the taskq_barrier is only used during
interface destruction to make sure the task struct wont get used
in the future, which is already done without the NET_LOCK being
held.
tx mitigation provides a nice performanace bump in some setups. up
to 25% in some cases.
tested by tb@ and hrvoje popovski (who's running this in production).
ok visa@
|
|
OK visa@
|
|
conditional timeout_barrier(9).
OK kn@ dlg@
|
|
the stack uses the NET_LOCK for most protection now, so it doesnt
need to block actual hardware interrupts. blocking hw interrupts
can cause huge latency spikes, which in turn works against the rx
ring moderation.
im putting this in early in the release cycle so it can get the
most testing possible.
ok mpi@ (a while back)
|
|
this should only be used by root, and it should not tak the NET_LOCK
because a bunch of i2c reads can take a relatively long time during
which packets would be blocked.
while here make sure userland only requests pages from the eeprom
and diag i2c addresses.
ok deraadt@
|
|
this will be used by ifconfig so it can show you things like who
mades what module you're using and when it was made, and on some
modules you get diag info like temperature, vcc, and rx and tx
powers.
im putting the kernel side in so we can keep fiddling with the
userland printf side of things.
this work was done based on a question by rachel roch
ok deraadt@
enthusiasm from many including mikeb@ sthen@ patrick@
|