| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the code is refactored so the IFQ macros call newly implemented ifq
functions. the ifq code is split so each discipline (priq and hfsc
in our case) is an opaque set of operations that the common ifq
code can call. the common code does the locking, accounting (ifq_len
manipulation), and freeing of the mbuf if the disciplines enqueue
function rejects it. theyre kind of like bufqs in the block layer
with their fifo and nscan disciplines.
the new api also supports atomic switching of disciplines at runtime.
the hfsc setup in pf_ioctl.c has been tweaked to build a complete
hfsc_if structure which it attaches to the send queue in a single
operation, rather than attaching to the interface up front and
building up a list of queues.
the send queue is now mutexed, which raises the expectation that
packets can be enqueued or purged on one cpu while another cpu is
dequeueing them in a driver for transmission. a lot of drivers use
IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before
committing to it with a later IFQ_DEQUEUE operation. if the mbuf
gets freed in between the POLL and DEQUEUE operations, fireworks
will ensue.
to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback,
and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq
mutex and get a reference to the mbuf they wish to try and tx. if
there's space, they can ifq_deq_commit it to remove the mbuf and
release the mutex. if there's no space, ifq_deq_rollback simply
releases the mutex. this api was developed to make updating the
drivers using IFQ_POLL easy, instead of having to do significant
semantic changes to avoid POLL that we cannot test on all the
hardware.
the common code has been tested pretty hard, and all the driver
modifications are straightforward except for de(4). if that breaks
it can be dealt with later.
ok mpi@ jmatthew@
|
| |
|
| |
|
|
|
|
|
| |
changes done by kettenis@. Tested by Hrvoje Popovski and chris@
dlg@, mpi@ and kettenis@ agree on developping this further in tree.
|
| |
|
|
|
|
| |
ok dlg
|
|
|
|
|
|
|
| |
architectures to communicate better what size is needed to mclgeti.
Makes ix(4) consistent with em(4).
ok mikeb@, dlg@
|
|
|
|
|
|
|
| |
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
|
|
|
|
| |
ok mikeb@
|
|
|
|
| |
Tested by/ok sthen@, ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attention and fix re-tested by Kapetanakis Giannis. Thanks a lot!
Original commit message:
When setting up advanced TX descriptor use m_getptr to locate the IP
or IPv6 header instead of assuming contiguousness of the target buffer
across Ethernet and IP/IPv6 headers.
Tested by Kapetanakis Giannis <bilias at edu ! physics ! uoc ! gr>,
thanks! Problem analysis and initial diff by dlg@.
|
|
|
|
| |
ok mpi@ henning@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hardware is fairly retarded. While it allows receive buffers with an
ETHER_ALIGN offset, it only allows the size of the buffers to be specified in
multiples of 1K. This means that if we want to use standard mbuf clusters
we will waste 1024 - ETHER_ALIGN bytes per cluster, which is a lot for the
2K clusters we use now. Compromise a bit by using 4K clusters on strict
alignment architectures and tell the hardware to use 3K of those, reducing
the spillage a bit. While this isn't optimal, at least on sparc64 where we
have 8K pages, the pool page allocation overhead should be the same as on
amd64/i386 where we have 4K pages and continue to use 2K mbuf clusters.
ok mikeb@, dlg@
|
|
|
|
|
|
|
|
| |
or IPv6 header instead of assuming contiguousness of the target buffer
across Ethernet and IP/IPv6 headers.
Tested by Kapetanakis Giannis <bilias at edu ! physics ! uoc ! gr>,
thanks! Problem analysis and initial diff by dlg@.
|
| |
|
| |
|
|
|
|
| |
ok tedu@ deraadt@
|
|
|
|
|
|
| |
unused TSO code.
ok mikeb@
|
|
|
|
|
|
|
|
|
| |
still unset when at this point, and some MD variants of pci_intr_establish(9)
make a copy of the string instead of storing a pointer.
Makes vmstat -i properly print the device name on sparc64.
ok mikeb@, deraadt@
|
|
|
|
| |
ok mikeb@
|
|
|
|
|
|
|
| |
- Remove a bogus if_ierrors++ which if the counter was incremented it
would be overwritten by ixgbe_update_stats_counters()
ok mikeb@
|