ifnet: Replace if_addr_lock rwlock with epoch + mutexRun on LLNW canaries and tested by pho@gallatin:Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5based ConnectX 4-LX NIC, I
ifnet: Replace if_addr_lock rwlock with epoch + mutexRun on LLNW canaries and tested by pho@gallatin:Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5based ConnectX 4-LX NIC, I see an almost 12% improvement in receivedpacket rate, and a larger improvement in bytes delivered all the wayto 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 GBfree4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.324.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.324.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.324.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.324.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.324.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.324.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32After the patchInMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.515.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.515.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.515.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.515.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.525.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patchReviewed by: gallatinSponsored by: Limelight NetworksDifferential Revision: https://reviews.freebsd.org/D15366
show more ...
spdx: initial adoption of licensing ID tags.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensou
spdx: initial adoption of licensing ID tags.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.Special thanks to Wind River for providing access to "The Duke ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.Initially, only tag files that use BSD 4-Clause "Original" license.RelNotes: yesDifferential Revision: https://reviews.freebsd.org/D13133
Remove unnecessary assignment.Found by: PVS-Studio
Remove NULL checks after M_WAITOK allocations from msk(4).MFC after: 1 month
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
ifnet lock was changed to use sx(9) long time ago.Don't hold a driver lock for if_free(9).
Fix variable assignment.Found by: PVS-Studio
Set DMA alignment constraint of status, TX and RX LEs(List Elementsin Marvell terms) to 32768. 32768 looks overkill but it willensure correct DMAed update. This change addresses occasionalwatchd
Set DMA alignment constraint of status, TX and RX LEs(List Elementsin Marvell terms) to 32768. 32768 looks overkill but it willensure correct DMAed update. This change addresses occasionalwatchdog timeouts reported on 10.2-RELEASE.Tested by: Johann Hugo <[email protected]>MFC after: 2 weeks
Eliminate unnecessary checking for M_EXT on mbufs returned by m_getjcl().Reviewed by: bz, glebius, yongariMFC after: 3 daysSponsored by: EMC / Isilon Storage DivisionDifferential Revision: https
Eliminate unnecessary checking for M_EXT on mbufs returned by m_getjcl().Reviewed by: bz, glebius, yongariMFC after: 3 daysSponsored by: EMC / Isilon Storage DivisionDifferential Revision: https://reviews.freebsd.org/D938
Mechanically convert to if_inc_counter().
Use define from if_var.h to access a field inside struct if_data,that resides in struct ifnet.Sponsored by: Nginx, Inc.
Fix various NIC drivers to properly cleanup static DMA resources.In particular, don't check the value of the bus_dma map against NULLto determine if either bus_dmamem_alloc() or bus_dmamap_load() s
Fix various NIC drivers to properly cleanup static DMA resources.In particular, don't check the value of the bus_dma map against NULLto determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded.Instead, assume that bus_dmamap_load() succeeeded (and thus thatbus_dmamap_unload() should be called) if the bus address for a resourceis non-zero, and assume that bus_dmamem_alloc() succeeded (and thusthat bus_dmamem_free() should be called) if the virtual address for aresource is not NULL.In many cases these bugs could result in leaks when a driver was detached.Reviewed by: yongariMFC after: 2 weeks
Increase the number of TX DMA segments from 32 to 35. It turnedout 32 is not enough to support a full sized TSO packet.While I'm here fix a long standing bug introduced in r169632 inbce(4) where
Increase the number of TX DMA segments from 32 to 35. It turnedout 32 is not enough to support a full sized TSO packet.While I'm here fix a long standing bug introduced in r169632 inbce(4) where it didn't include L2 header length of TSO packet inthe maximum DMA segment size calculation.In collaboration with: rmacklemMFC after: 2 weeks
Revert r234666. Clearing TWSI IRQ seems to cause watchdog timeouton old Yukon II controllers.Tested by: bsamMFC after: 2 weeks
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bi
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bit int, but does fix the issuefor most cases.A similar change was made in OpenBSD.Discussed with: -arch, rdivackyReviewed by: cperciva
Perform media change after setting IFF_DRV_RUNNING flag. Without it,driver would ignore the first link state update if controlleralready established a link.Reported by: bsamTested by: bsam
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit po
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareto this event, adding if_var.h to files that do need it. Also, includeall includes that now are included due to implicit pollution via if_var.hSponsored by: NetflixSponsored by: Nginx, Inc.
- Merge from r249476: Ensure that PCI bus BUS_GET_DMA_TAG() method sees the actual PCI device which makes the request for DMA tag, instead of some descendant of the PCI device, by creating a pass
- Merge from r249476: Ensure that PCI bus BUS_GET_DMA_TAG() method sees the actual PCI device which makes the request for DMA tag, instead of some descendant of the PCI device, by creating a pass-through trampoline.- Sprinkle const on tables.- Use NULL instead of 0 for pointers.- Take advantage of nitems().MFC after: 1 week
- Correct mispellings of the word occurrenceSubmitted by: Christoph Mallon <[email protected]> (via private mail)
RX checksum offloading on old Yukon controllers seem to cause moreproblems. Disable RX checksum offloading on controllers that don'tuse new descriptor format but give chance to enable it withifco
RX checksum offloading on old Yukon controllers seem to cause moreproblems. Disable RX checksum offloading on controllers that don'tuse new descriptor format but give chance to enable it withifconfig(8).
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
For Yukon II controllers that implement optional temperature sensorand voltage sensor, TWSI is used to get sensor data. msk(4) doesnot monitor these sensors and interrupt for TWSI completion isdi
For Yukon II controllers that implement optional temperature sensorand voltage sensor, TWSI is used to get sensor data. msk(4) doesnot monitor these sensors and interrupt for TWSI completion isdisabled by default.However, due to unknown reason, the TWSI completion interrupt firesand it resulted in interrupt storm. To fix it, acknowledges theTWSI completion interrupt if driver see the event. Given that notall Yukon II controllers show the issue it could be a silicon bugwhich does not honor interrupt masking.Probably the right way to address the issue is disabling automaticTWSI cycle initiation against these sensors. It would be evenbetter to implement reading voltage/temperature from the NIC but itrequires access to National LM80 through TWSI and documentation todo that is not available yet(probably will never happen).Reported by: jhbTested by: jhbMFC after: 2 weeks
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againReviewed by: yongari
Increase wait time for OP_TCPSTART command processing. It seems100us is not enough to ensure prefetch unit work.
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel- While at it, use DEVMETHOD_END. Discussed with: jhb- Also while at it, use __FBSDID.
123456