| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
this makes it more consistent with other drivers.
|
|
|
|
|
|
| |
OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@
|
|
|
|
|
|
|
| |
luckily tx_rings and rx_rings have ix_softc pointers in the same
place, so we got away with it.
from Christiano Haesbaert
|
|
|
|
|
|
| |
interrupts. Hence, update the link state manually.
Tested and ok bluhm@
|
|
|
|
|
|
|
|
|
| |
link state changes and an interrupt is fired for that, the MSI-X
interrupt mask bits of the queues are cleared. During init while
the queues are enabled by the driver, the hardware disabled them
in the background. Then receiving packets did not work.
In MSI-X mode, use the FreeBSD logic to read the cause from EICS register.
from Christiano Haesbaert; tested with 82599 and X540T and OK jmatthew@
|
|
|
|
| |
OK jmatthew@
|
|
|
|
|
|
| |
before this the stats were always collected, but you could only see
stats with gdb against the running kernel, or by enabling IX_DEBUG
in the build. neither of these are supported by default.
|
|
|
|
| |
correct way.
|
| |
|
|
|
|
|
| |
while here, stash the rss hash value from rx descriptors in the
mbuf as a flow id.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is an updated version of a diff from christiano haesbaert by way of
mpi@ to enable the use of multiple tx and rx rings with msi-x. now
that patrick@ got interrupts on multiple cpus working on arm64, i
can commit this.
the main changes are to use an intrmap pointer as the flag for
whether msix has been enabled or not, and to use the intrmap to
establish vectors on multiple cpus.
tested by hrvoje popovski
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this calls if_attach_queues and if_attach_iqueues to allocate an
ifq and ifiq per tx ring and rx ring respectivly, and then tie them
together. ix rx rings deliver packets into ifiqs, and ifqs push
packets onto ix tx rings. the return value from ifiq_input is also
used to tell the if_rxr stuff to back off.
this also makes the rx refill timeout per rx ring instead of per
interface, and makes it only schedule the timeout when the ring is
completely empty to avoid races with normal rx ring operation.
tested by hrvoje popovski
ok jmatthew@
|
|
|
|
| |
Tested by Hrvoje Popovski.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation still uses a single queue but already establishes
a different handler for link interrupts. This is done in preparation for
multi-queues support.
The performance and i386 regression exposed by the last version of this
diff have been fixed thanks to the help of Hrvoje Popovski.
Based on a bigger diff from haesbaert@ and on the FreeBSD code.
Tested by Sigi Rudzio, Hrvoje Popovski and jmatthew@, ok jmatthew@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The current implementation still uses a single queue but already establishes
a different handler for link interrupts. This is done in preparation for
multi-queues support.
Based on a bigger diff from haesbaert@ and on the FreeBSD code.
Tested by Hrvoje Popovski and jmatthew@, ok jmatthew@
|
|
|
|
|
|
| |
Tested on 82599 (sfp+) and X540 (baseT) by me and Hrvoje Popovski,
and on X553 by sthen@ and abieber@, and possibly more via snapshots
ok sthen@ mikeb@
|
| |
|
| |
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
|
|
| |
access to the ioctl is serialised by a per ifp rwlock so userland
reads of different pages in the same device address do not confuse
each other.
this was pretty straightforward because a lot of the plumbing for
accessing the i2c bus was already in place.
|
| |
|
|
|
|
|
| |
at the moment there are 256 slots on the right. if rxr raises the
high watermark to 256, we overwrite ring entries.
|
|
|
|
|
|
|
|
| |
this should give a bit of space if the packet needs an m_pullup.
care is taken to ensure the packet is still aligned for the ip
stack.
ok and tweaks claudio@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atomics were used to coordinate updates to the number of available
slots on the tx ring. start would use what was available, and txeof
(completion) would add back freed slots. start and completion
update a producer and consumer index respectively, so we can use
those with the size of the ring to calculate space instead.
while here i simplified what txeof does a fair bit, which combined
with the removal of the atomics gives us a bit of a speed improvement.
hrvoje popovski reports up to a 20% improvement in one environment,
but 5 to 10 is probably more realistic.
ive had this in a tree since 2017, but mpi's "Faster vlan(4)
forwarding?" post made me dig it out and clean it up.
ok jmatthew@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this was wrong and was corrected at the end of last year in rev 1.140.
Before then a 64 bit BAR was not enforced as the test was wrong.
It turns out there exist 82598 parts which have a 32 bit BAR so change
the test to only require a memory BAR and not a 64 bit memory BAR.
Problem reported by Robert Blacquiere. ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an ifq to transmit a packet is picked by the current traffic
conditioner (ie, priq or hfsc) by providing an index into an array
of ifqs. by default interfaces get a single ifq but can ask for
more using if_attach_queues().
the vast majority of our drivers still think there's a 1:1 mapping
between interfaces and transmit queues, so their if_start routines
take an ifnet pointer instead of a pointer to the ifqueue struct.
instead of changing all the drivers in the tree, drivers can opt
into using an if_qstart routine and setting the IFXF_MPSAFE flag.
the stack provides a compatability wrapper from the new if_qstart
handler to the previous if_start handlers if IFXF_MPSAFE isnt set.
enabling hfsc on an interface configures it to transmit everything
through the first ifq. any other ifqs are left configured as priq,
but unused, when hfsc is enabled.
getting this in now so everyone can kick the tyres.
ok mpi@ visa@ (who provided some tweaks for cnmac).
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
The problem noticed, fix tested and OK procter@
|
|
|
|
| |
tested by Hrvoje Popovski, thanks!
|
|
|
|
|
|
| |
Previously only multi-rate fiber modules would disable the TX laser, but
newer Intel driver does it for single rate modules as well. Reminded by
kettenis@, tested by procter@ and Hrvoje Popovski. Thanks!
|
|
|
|
| |
Tested by Hrvoje Popovski and myself.
|
|
|
|
|
|
|
|
| |
Code was obtained from FreeBSD. Make release testing by tb@ on i386
and mikeb@ on amd64 and sparc64. X552 SFP tested by Hrvoje Popovski,
HUGE thanks! X550T tested by mikeb@ on amd64 and sparc64.
ok kettenis, deraadt
|
|
|
|
|
|
|
|
|
| |
A gigabit fiber connection was mistakenly reported as 1000baseT
when a mutli-speed 10GbaseSR/1000baseSX fiber optics module was
set to the gigabit mode.
Reported by and fix tested by Hrvoje Popovski <hrvoje at srce ! hr>,
HUGE thanks!
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested with a X540 interconnected with a X550 via a CAT6 twisted
pair cable, but is expected to work on multi-speed fiber modules
as well to select between 10GbaseLR and 1000baseLX or 10GbaseSR
and 1000baseSX, etc.
This is largely required because X550 doesn't provide support for
auto-negotiation and requires manual configuration.
Obtained from FreeBSD.
|
|
|
|
| |
No functional change.
|
|
|
|
| |
ok mikeb@ who tested on 82599, x540 and x550.
|
|
|
|
|
| |
After a cold boot the PHY power might be disabled by another OS:
https://svnweb.freebsd.org/base?view=revision&revision=295093
|
|
|
|
|
|
| |
Call a chip specific method to disable RX unit;
DPF (Drop [Unicast] Pause Frames) and PMCF (Pass MAC Control Frames)
bits should only be enabled on 82598 since others don't document them.
|
|
|
|
| |
Reported and tested by Hrvoje Popovski, thanks!
|
|
|
|
|
|
| |
This factors out the code configuring General Purpose Interrupts into
a separate function and provides LASI (Link Alarm Status Interrupt)
handler used by controllers in the X550 family lacking integrated PHY.
|
|
|
|
| |
no binary change.
|
|
|
|
|
|
|
|
|
|
| |
- separate functions for delay value calculation and figuring out
whether or not we're doing SFP.
- MAC type detection is now done by ixgbe_set_mac_type;
- call {enable,disable}_tx_laser conditionally;
- unused TSO code bites the dust;
- default to "IFM_ETHER | IFM_AUTO" when we can't select any other
media type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this means that the ethernet header and therefore its payload will
be aligned correctly for the stack. without this em and ix are
sufferring a 30 to 40 percent hit in forwarding performance because
the ethernet stack expects to be able to prepend 8 bytes for an
ethernet header so it can gaurantee its alignment. because em and
ix only had 6 bytes where the ethernet header was, it always prepends
an mbuf which turns out to be expensive. this way the prepend will
be cheap because the 8 byte space will exist.
2k+ETHER_ALIGN clusters will end up using the newly created mcl2k2
pool.
the regression was isolated and the fix tested by hrvoje popovski.
ok mikeb@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
kernel lock in the rx and tx path anymore.
While there seems to be a small decrease in forwarding performance with our
default network stack settings, Performance whiel receiving manymore packets
than we can handle is better. And this change opens the road for future
improvements in the network stack.
ok dlg@, mpi@
|
|
|
|
|
|
|
| |
introduced in the previous step, and use atomic instructions to make the
tx completion path mpsafe as well.
ok claudio@, mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue is now protected by a mutex. this diff makes the oactive
functionality mpsafe too.
IFF_OACTIVE is part of if_flags. there are two problems with that.
firstly, if_flags is a short and we dont have any MI atomic operations
to manipulate a short. secondly, while we could make the IFF_OACTIVE
operates mpsafe, all changes to other flags would have to be made
safe at the same time, otherwise a read-modify-write cycle on their
updates could clobber the oactive change.
instead, this moves the oactive mark into struct ifqueue and provides
an API for changing it. there's ifq_set_oactive, ifq_clr_oactive,
and ifq_is_oactive. these are modelled on ifsq_set_oactive,
ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd.
this diff includes changes to all the drivers manipulating IFF_OACTIVE
to now use the ifsq_{set,clr_is}_oactive API too.
ok kettenis@ mpi@ jmatthew@ deraadt@
|