MFC r339703:Deprecate a number of less used 10 and 10/100 Ethernet devices.The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe,pcn, sf, sn, tl, tx, txp, vx, wb, xeThe list was
MFC r339703:Deprecate a number of less used 10 and 10/100 Ethernet devices.The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe,pcn, sf, sn, tl, tx, txp, vx, wb, xeThe list was defined as part of FCP-0101. Per the FCP, devices may beremoved from the deprecation list if enough users are found or they areconverted to iflib.FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.mdApproved by: re (gjb)Reviewed by: rgrimesDifferential Revision: https://reviews.freebsd.org/D17654
show more ...
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
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.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.
Mechanically convert to if_inc_counter().
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.
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againReviewed by: yongari
- 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.
- Import the common MII bitbang'ing code from NetBSD and convert drivers to take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 4k. The only
- Import the common MII bitbang'ing code from NetBSD and convert drivers to take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 4k. The only potential in-tree user left unconverted is xe(4), which generally should be changed to use miibus(4) instead of implementing PHY handling on its own, as otherwise it makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to xe(4) just for the MII bitbang'ing code. The common MII bitbang'ing code also is useful in the embedded space for using GPIO pins to implement MII access.- Based on lessons learnt with dc(4) (see r185750), add bus barriers to the MII bitbang read and write functions of the other drivers converted in order to ensure the intended ordering. Given that register access via an index register as well as register bank/window switching is subject to the same problem, also add bus barriers to the respective functions of smc(4), tl(4) and xl(4).- Sprinkle some const.Thanks to the following testers:Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4))Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).Reviewed by: yongari (subset of drivers)Obtained from: NetBSD (partially)
Remove some hacks to handle strange behavior of LXT 970 PHYs now betterhandled in miibus after r221812. Thanks to marius@ for piecing thistogether!
Do not use Open Firmware to open the device and instead program its starton our own. This prevents hangs at boot when using a bm(4) NIC where thecable is not plugged in at boot time.Obtained from
Do not use Open Firmware to open the device and instead program its starton our own. This prevents hangs at boot when using a bm(4) NIC where thecable is not plugged in at boot time.Obtained from: NetBSDMFC after: 1 week
Convert the PHY drivers to honor the mii_flags passed down and convertthe NIC drivers as well as the PHY drivers to take advantage of themii_attach() introduced in r213878 to get rid of certain hac
Convert the PHY drivers to honor the mii_flags passed down and convertthe NIC drivers as well as the PHY drivers to take advantage of themii_attach() introduced in r213878 to get rid of certain hacks. Forthe most part these were:- Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead.- PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags.While at it, I took the opportunity to change the NIC drivers to passup the error returned by mii_attach() (previously by mii_phy_probe())and unify the error message used in this case where and as appropriateas mii_attach() actually can fail for a number of reasons, not justbecause of no PHY(s) being present at the expected address(es).Reviewed by: jhb, yongari
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/IF_ADDR_UNLOCK() across network device drivers when accessing theper-interface multicast address list, if_multiaddrs. This willa
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/IF_ADDR_UNLOCK() across network device drivers when accessing theper-interface multicast address list, if_multiaddrs. This willallow us to change the locking strategy without affecting our driverprogramming interface or binary interface.For two wireless drivers, remove unnecessary locking, since theydon't actually access the multicast address list.Approved by: re (kib)MFC after: 6 weeks
Fix bm_shutdown() KOBJ method to correspond to return int, as it should.Found by: Andriy Gapon
Change the way we enable the BMAC cell in macio. Instead of calling themacio's enable-enet word, which apparently does nothing on some machines,open an OF instance of the ethernet controller. This
Change the way we enable the BMAC cell in macio. Instead of calling themacio's enable-enet word, which apparently does nothing on some machines,open an OF instance of the ethernet controller. This fixes cold bootingfrom disk on my Blue & White G3.MFC after: 3 days
Change the DBDMA API to allow DBDMA registers in a subregion of a resource. This is necessary to allow future support of DMA for the various Apple on-board ATA controllers.MFC after: 1 week
Fix a multiple locking bug in bm(4) that could cause panics on a WITNESS-enabled kernel.Approved by: marcel (mentor)MFC after: 1 day
Fix some locking and logic bugs pointed out by jhb. These fix driver detach and speed up data transfer by nearly a factor of 2.Approved by: marcel (mentor)
Add support for the Apple Big Mac (BMAC) Ethernet controller,found on various Apple G3 models.Submitted by: Nathan Whitehorn