| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
in case we fail to do it at the spot. prevents rx ring
lockups under high load. ok dlg
|
|
|
|
|
|
| |
lost during update. Originally from claudio, rev1.46.
ok claudio
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the IP ckecksum offloading logic that disables and breaks offloading
if the packet is neither TCP nor UDP because of an erroneous "default" case.
No functional change in the default build because IP checksum offloading
is currently disabled in ix(4).
Tested on 82598 and 82599 (though checksums are still disabled by default).
ok claudio
|
|
|
|
| |
Removing a leftover M from my tree makes also my machine happy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the rx ring, schedule a timeout to keep trying until it gets some.
a timeout is used here cos the chip doesnt have a way of reporting
if its out of descriptors or when there's a ring overflow. we have
to manage that ourselves in software.
mikeb reported this issue on an ipsec gateway. ipsec would consume
all the mbufs while they were stuck in crypto waiting for the cpu
to catch up, by which time it was too late to give more to the
hardware. without any rx descriptors the chip would never interrupt
and we'd never try to fill the ring again.
the fix was tested by and is ok mikeb@
|
|
|
|
|
|
|
|
|
| |
in FreeBSD. This seems to fix a lot of problems on 82599 based cards
including the VLAN problems and the corrupted receives.
Putting this in now to work on it in tree since a few additional things
need to be merged. Tested by myself, deraadt@ and jsg@ on both 98er and
99er cards.
OK jsg@, deraadt@
|
|
|
|
|
|
| |
Found by LLVM/Clang Static Analyzer.
ok henning@ krw@ claudio@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than looping over them until it runs out of work to do.
in my testing i have found that under what i consider high pps
(>160kpps) ix would loop 4 or 5 times in the interrupt handler,
where each loop does a bus_space_read and the mclgeti loop (ie, rx
dequeue followed by rx ring fill).
looping in the isr is bad for several reasons:
firstly, the chip does interrupt mitigation so you have a
decent/predictable amount of work to do in the isr. your first loop
will do that chunk of work (ie, it pulls off 50ish packets), and
then the successive looping aggressively pull one or two packets
off the rx ring. these extra loops work against the benefit that
interrupt mitigation provides.
bus space reads are slow. we should avoid doing them where possible
(but we should always do them when necessary).
doing the loop 5 times per isr works against the mclgeti semantics.
it knows a nic is busy and therefore needs more rx descriptors by
watching to see when the nic uses all of its descriptors between
interrupts. if we're aggressively pulling packets off by looping
in the isr then we're skewing this check.
ok deraadt@ claudio@
testing by phessler@ bluhm@ and me in production
|
|
|
|
| |
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
|
|
|
| |
ok claudio krw
|
|
|
|
| |
ok claudio@
|
|
|
|
|
|
|
| |
to the maximum value to reduce the number of low latency interrupts
hitting the card when the ring is getting full.
Tested at least by deraadt@ on 99 and myself on 99 and 98 ix(4).
OK mikeb@
|
| |
|
|
|
|
| |
ok jsg
|
|
|
|
| |
case. Adapted from Intel code in FreeBSD and tested on 82598/82599.
|
|
|
|
|
|
|
|
| |
Due to the messy context setup code this was breaking ipv6 forwarding
when ipv4 offloading was enabled. All checksum offloading remains
disabled for now.
Debugged with and ok claudio@
|
|
|
|
|
| |
unit, it just wasn't called.
Problem is present in the FreeBSD driver (but not the Linux one).
|
|
|
|
| |
adapted from FreeBSD.
|
|
|
|
| |
it was removed from the equivalent FreeBSD code over a year ago.
|
|
|
|
|
|
|
|
| |
effectively lose receive descriptors each time we reset the interface, until
we run out of descriptors and panic. Should fix the "em_rxeof: NULL mbuf in
slot 0 (nrx 256, filled 255)" panic on em(4).
ok jsing@ (for the em(4) bits), jsg@
|
| |
|
|
|
|
|
|
|
| |
Tested by deraadt on a HotLava card and myself with an Intel X520
and a CX4 82598.
ok claudio@
|
|
|
|
|
|
|
|
|
|
|
|
| |
like if_ix.c mostly untouched for now. This brings in support for
newer 82598 parts and adds several things that will be needed for 82599.
Initially from claudio with some additions by me.
Tested by claudio, dlg (earlier version) and myself on different cards
and media types.
ok claudio@
|
|
|
|
| |
ok dlg@
|
|
|
|
|
|
|
|
|
| |
Note: it did not work before because the checksum offloading was
taking care about TCP and UDP but forgot about IP fragments and other
IP protocols. We need to take care that IP fragments are handled
correctly when we do IP/TCP/UDP offloading.
ok jsg@ deraadt@, discussed with others
|
|
|
|
|
| |
this allows to enable/disable checksum offloading at one point in the driver
without the need to care about stupid #defines. no functional change.
|
|
|
|
|
|
|
|
| |
if the packet is neither TCP nor UDP because of an erroneous "default" case.
No functional change in the default build because IP checksum offloading
is currently disabled in ix(4).
ok jsg@
|
|
|
|
| |
ok dlg@
|
|
|
|
|
|
|
|
|
|
| |
running out of mbufs for rx rings.
if the system low watermark is lower than a rx rings low watermark,
we'll never send a packet up the stack, we'll always recycle it.
found by thib@ on a bge
sadface
|
|
|
|
|
|
|
|
|
| |
if no arguments are passed to a variadic macro.
Create a seperate non variadic macro for this fixed argument
case. No binary change.
ok reyk@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to free some for use on the rx rings on network cards.
this modifies m_cluncount to advise callers when we're in such a
situation, and makes them responsible for freeing up the cluster
for allocation by MCLGETI later.
fixes an awesome lockup with sis(4) henning has been experiencing.
this is not the best fix, but it is better than the current situation.
yep deraadt@ tested by henning@
|
|
|
|
| |
we now know the interface has already been stopped
|
|
|
|
|
|
| |
reducing the amount of splnet/splx dancing required.. especially in the
worst case (of m_cldrop)
ok dlg kettenis damien
|
|
|
|
|
|
|
| |
old code showed the nic as active all the time, which makes it suck as
part of a trunk.
testing and ok by reyk@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
| |
bring back rev 1.16, em style MCLGETI based on a diff from reyk with
critical fixes by me.
|
|
|
|
|
|
|
|
| |
leak memory, lose maps or cause double frees.
Problem courtesy of our good friends at Intel in the original
FreeBSD driver.
"awesome" dlg@
|
|
|
|
|
|
|
| |
if_ix.h) since it corrupts packets or the checksum flags or something
upwards and breaks nfs. The 1.16 MCLGETI change does not cause this
but has a double free on reboot, and the 1.18 fixes that double free
but introduces the packet corruption.
|
|
|
|
| |
from brad
|
|
|
|
|
|
| |
have to allocate everything up front.
Requested by reyk@, 'I'm fine with it' dlg@, 'commit it' deraadt@
|
|
|
|
|
| |
vlan filter so it will work properly.
ok reyk@
|
|
|
|
|
| |
Initial diff from reyk with a bunch of critical fixes from me.
ok reyk@, 'put it in when you're confident with it' dlg@ on an earlier rev.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from the individual drivers now that ether_ioctl() handles this.
Shrinks the i386 kernels by..
RAMDISK - 2176 bytes
RAMDISKB - 1504 bytes
RAMDISKC - 736 bytes
Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users.
Build tested on almost all archs by todd@/brad@
ok naddy@
|
|
|
|
|
|
|
|
|
| |
creates the VLAN encapsulation from the tag stored in the mbuf
header. Idea from FreeBSD, input from claudio@ and canacar@.
Switch all hardware VLAN enabled drivers to the new function.
ok claudio@
|
|
|
|
| |
support.
|
|
|
|
|
|
| |
tag in the header. Convert TX tagging in the drivers.
Help and ok brad@
|
|
|
|
|
|
| |
enable RX tag stripping for re(4).
ok brad@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move calling ether_ioctl() from the top of the ioctl function, which
at the moment does absolutely nothing, to the default switch case.
Thus allowing drivers to define their own ioctl handlers and then
falling back on ether_ioctl(). The only functional change this results
in at the moment is having all Ethernet drivers returning the proper
errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown
ioctl's.
Shrinks the i386 kernels by..
RAMDISK - 1024 bytes
RAMDISKB - 1120 bytes
RAMDISKC - 832 bytes
Tested by martin@/jsing@/todd@/brad@
Build tested on almost all archs by todd@/brad@
ok jsing@
|
|
|
|
|
|
|
| |
Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.
ok art@, krw@
|