| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run on LLNW canaries and tested by pho@
gallatin:
Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5
based ConnectX 4-LX NIC, I see an almost 12% improvement in received
packet rate, and a larger improvement in bytes delivered all the way
to userspace.
When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,
I see, using nstat -I mce0 1 before the patch:
InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree
4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32
4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32
4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32
4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32
4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32
4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32
4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32
After the patch
InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree
5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51
5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51
5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51
5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51
5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52
5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52
Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch
Reviewed by: gallatin
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15366
Notes:
svn path=/head/; revision=333813
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When de(4) was imported in 1997 the world was not ready for these ioctls.
In over 20 years that hasn't changed so it seems safe to assume their
time will never come.
Reviewed by: imp, jhb
Approved by: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14889
Notes:
svn path=/head/; revision=331737
|
|
|
|
|
|
|
|
|
|
|
| |
- duplicate words
- typos
- references to old versions of FreeBSD
Reviewed by: imp, benno
Notes:
svn path=/head/; revision=327231
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
|
|
|
|
|
|
|
|
|
|
| |
Makes things easier to read, plus architectures may set NULL to something
different than zero.
Found with: devel/coccinelle
MFC after: 3 weeks
Notes:
svn path=/head/; revision=313982
|
|
|
|
|
|
|
| |
aren't used, and this doesn't change the supported hardware.
Notes:
svn path=/head/; revision=313082
|
|
|
|
|
|
|
| |
Most affect comments, very few have user-visible effects.
Notes:
svn path=/head/; revision=298955
|
|
|
|
|
|
|
| |
Approved by: kib (mentor)
Notes:
svn path=/head/; revision=291095
|
|
|
|
| |
Notes:
svn path=/head/; revision=271849
|
|
|
|
|
|
|
| |
leave them as purely opaque values that are only set by bus_dmamem_alloc().
Notes:
svn path=/head/; revision=267589
|
|
|
|
|
|
|
| |
map created by bus_dmamem_alloc().
Notes:
svn path=/head/; revision=267365
|
|
|
|
|
|
|
|
|
|
|
| |
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Notes:
svn path=/head/; revision=257176
|
|
|
|
|
|
|
| |
malloc(9) flags in sys/dev.
Notes:
svn path=/head/; revision=243857
|
|
|
|
| |
Notes:
svn path=/head/; revision=232874
|
|
|
|
|
|
|
|
|
| |
If I interpret the C standard correctly, the storage specifier should be
placed before the inline keyword. While at it, replace __inline by
inline in the files affected.
Notes:
svn path=/head/; revision=228471
|
|
|
|
|
|
|
|
| |
Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 1 week
Notes:
svn path=/head/; revision=201758
|
|
|
|
|
|
|
|
|
| |
if_watchdog and if_timer.
Tested by: WATANABE Kazuhiro CQG00620 of nifty.ne.jp
Notes:
svn path=/head/; revision=199378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also align setup descriptor on 32 bytes boundary. Tx buffer have no
alignment limitation so create dmamap without alignment
restriction[1]. Rx buffer still seems to require 4 bytes alignment
limitation but we can simply use MCLBYTES for size to map the
buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
with m_getcl(9).
de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.
This should fix de(4) breakage introduced after r176206.
Submitted by: jhb [1]
Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >
Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >,
Takahashi Yoshihiro < nyan <> jp dot freebsd dot org >
Notes:
svn path=/head/; revision=197465
|
|
|
|
| |
Notes:
svn path=/head/; revision=197464
|
|
|
|
| |
Notes:
svn path=/head/; revision=197463
|
|
|
|
|
|
|
|
| |
alignment fixup code for received frames on strict alignment
architectures.
Notes:
svn path=/head/; revision=197461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs. This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.
Approved by: re (kib)
MFC after: 6 weeks
Notes:
svn path=/head/; revision=195049
|
|
|
|
|
|
|
|
| |
Found with: Coverity Prevent(tm)
CID: 1998
Notes:
svn path=/head/; revision=188396
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
part of detecting the media. Explicitly ensure that we don't send it to
bpf(4) as bpf(4) isn't setup yet. This worked by accident before the bpf
interface stuff was reworked to avoid other races (bpf_peers_present, etc.)
but now it needs an explicit check to avoid a panic.
MFC after: 3 days
PR: kern/120915
Notes:
svn path=/head/; revision=177937
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Rx path it allocates a new mbuf with m_getcl(9) so the length of
the mbuf is MCLBYTES which is greater than a segment size specified by
the dma tag. This segment size mismatch caused a voluntary panic.
Fix the panic by settting the mbuf length to TULIP_DATA_PER_DESC.
Reported by: Arne H Juul <arnej AT yahoo-inc DOT com>
Tested by: Arne H Juul <arnej AT yahoo-inc DOT com>
Notes:
svn path=/head/; revision=170389
|
|
|
|
|
|
|
|
|
|
|
| |
default timer value.
Discovered By: gcc 4.2
MFC after: 3 days
Notes:
svn path=/head/; revision=169797
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many
Approved by: re@
Notes:
svn path=/head/; revision=166901
|
|
|
|
|
|
|
|
|
|
|
| |
if_watchdog, etc., or in functions used only in these methods.
In all other functions in the driver use device_printf().
- Use __func__ instead of typing function name.
Submitted by: Alex Lyashkov <umka sevcity.net>
Notes:
svn path=/head/; revision=162321
|
|
|
|
| |
Notes:
svn path=/head/; revision=158471
|
|
|
|
| |
Notes:
svn path=/head/; revision=156034
|
|
|
|
|
|
|
|
|
|
| |
if we need a valid MAC address (for probing the media for example) before
ether_ifattach() has been called since IF_LLADDR() is NULL then.
Tested by: tisco
Notes:
svn path=/head/; revision=153644
|
|
|
|
| |
Notes:
svn path=/head/; revision=153617
|
|
|
|
|
|
|
| |
Suggested by: marcel
Notes:
svn path=/head/; revision=152992
|
|
|
|
|
|
|
| |
Tested by: jhb
Notes:
svn path=/head/; revision=152962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Don't call tulip_addr_filter() to reset the RX address filter in
tulip_reset() since that gets called before ether_ifattach(). Just
call it in tulip_init_locked().
- Use be16dec() and le16dec() to parse MAC addresses when programming
the RX filter.
- Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same
thing with the added bonus that we leaked the driver lock if the MTU
was > ETHERMTU in the homerolled version. This part will be MFC'd.
Clue from: wpaul (1)
Stolen from: marcel (2 via patch for dc(4))
MFC after: 1 week
Notes:
svn path=/head/; revision=152666
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
one) ifaddr_byindex() users were converted to use ifp->if_addr.
- Stop storing a (pointer to) Ethernet address in "struct arpcom",
and drop the IFP2ENADDR() macro; all users have been converted
to use IF_LLADDR() instead.
Notes:
svn path=/head/; revision=152315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tulip_mbuf_compress(). If we fail to allocate a new mbuf to copy the
data into, put the mbuf back in the driver's send queue so that we can
retry it later rather than throwing the packet away.
- Use m_devget() instead of doing it inline ourselves in the
TULIP_COPY_RXDATA case. If we fail to allocate an mbuf to copy the data
into, don't forget about the original mbuf cluster. The old code would
lose the pointer and leak the cluster in that case. Now it doesn't lose
it but always sticks the original rx buffer back into the receive ring
after trying to copy the data out and send it up the stack. Also, if we
fail to allocate a new mbuf to copy the data into, log an input error.
Also, don't combine the priming case with the received-a-packet case to
make the code flow a bit clearer and easier to follow.
Notes:
svn path=/head/; revision=149497
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
(This should really be using m_defrag(), but this diff is just simple
changes for now.)
Notes:
svn path=/head/; revision=149476
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Allocate arrays of metadata for the descriptors in the rx and tx rings
and change the ring pointers to walk the metadata array rather than the
actual descriptor rings. Each metadata object contains a pointer to its
descriptor, a pointer to any associated mbuf, and a pointer to the
associated bus_dmamap_t in the bus_dma case. The mbuf pointers replace
the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
defaults to 0, but can be changed to KTR_DEV at the top of the file
when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
Also, remove an incorrect XXX comment I added earlier, the driver was
correct (at least it does the same thing dc(4) does). TULIP_SP_MAC
was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
so it becomes easier to read at the expense of a couple of duplicated
lines of code. Also, use m_getcl() to get an mbuf cluster rather than
MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
fixup attach to do a better job of cleaning up when it fails. This
gets us a good bit closer to possibly having a detach method someday
and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.
I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on. I'll be removing the non-bus-dma code in a subsequent
commit.
Notes:
svn path=/head/; revision=149473
|
|
|
|
|
|
|
|
|
|
| |
- Don't set IFF_ALLMULTI in our ifnet's if_flags if we end up allowing
all multicast due to limits in the MAC receive filters in hardware.
Requested by: rwatson (2)
Notes:
svn path=/head/; revision=149206
|
|
|
|
| |
Notes:
svn path=/head/; revision=149205
|
|
|
|
|
|
|
|
|
|
| |
to avoid recursing on the driver lock. Not sure why my test box didn't
catch this earlier.
MFC after: 3 days
Notes:
svn path=/head/; revision=148906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.
Reviewed by: pjd, bz
MFC after: 7 days
Notes:
svn path=/head/; revision=148887
|
|
|
|
|
|
|
|
|
|
|
| |
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintained list.
Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca>
MFC after: 1 week
Notes:
svn path=/head/; revision=148654
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add locking to protect the softc and mark this driver as MP safe. There
are still some edge cases with multiport cards that need more locking
work.
MFC after: 1 week
Tested on: alpha
Notes:
svn path=/head/; revision=148445
|
|
|
|
|
|
|
|
| |
- Use pci_enable_busmaster() rather than fiddling with the PCI command
register directly.
Notes:
svn path=/head/; revision=148256
|
|
|
|
|
|
|
|
|
| |
set in tulip_attach() and its value is never changed, so all the extra sets
are redundant. I'm guessing that at some point in time de(4) had an
alternate start routine, but that hasn't been true in recent history.
Notes:
svn path=/head/; revision=148255
|
|
|
|
|
|
|
|
|
|
|
|
| |
default:
- TULIP_NEED_FASTTIMEOUT - tulip_fasttimeout() wasn't called anywhere
- BIG_PACKET - only worked on i386 anyway
- TULIP_USE_SOFTINTR - doesn't compile and was never updated to handle
new netisr registration
- non-FreeBSD code
Notes:
svn path=/head/; revision=148252
|
|
|
|
|
|
|
| |
and alpha, respectively.
Notes:
svn path=/head/; revision=148249
|
|
|
|
| |
Notes:
svn path=/head/; revision=148248
|