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
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 register keyword from sys/ and ANSIfy prototypesA long long time ago the register keyword told the compiler to storethe corresponding variable in a CPU register, but it is not relevantfor
Remove register keyword from sys/ and ANSIfy prototypesA long long time ago the register keyword told the compiler to storethe corresponding variable in a CPU register, but it is not relevantfor any compiler used in the FreeBSD world today.ANSIfy related prototypes while here.Reviewed by: cem, jhbSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D10193
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
In order to reduce use of M_EXT outside of the mbuf allocator andsocket-buffer implementations, introduce a return value for MCLGET()(and m_cljget() that underlies it) to allow the caller to avoid
In order to reduce use of M_EXT outside of the mbuf allocator andsocket-buffer implementations, introduce a return value for MCLGET()(and m_cljget() that underlies it) to allow the caller to avoid testingM_EXT itself. Update all callers to use the return value.With this change, very few network device drivers remain aware ofM_EXT; the primary exceptions lie in mbuf-chain pretty printers fordebugging, and in a few cases, custom mbuf and cluster allocationimplementations.NB: This is a difficult-to-test change as it touches many drivers forwhich I don't have physical devices. Instead we've gone for intensivereview, but further post-commit review would definitely be appreciatedto spot errors where changes could not easily be made mechanically,but were largely mechanical in nature.Differential Revision: https://reviews.freebsd.org/D1440Reviewed by: adrian, bz, gnnSponsored by: EMC / Isilon Storage Division
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.
Remove duplicate const specifiers in many drivers (I hope I got all ofthem, please let me know if not). Most of these are of the form:static const struct bzzt_type { [...list of members...]} co
Remove duplicate const specifiers in many drivers (I hope I got all ofthem, please let me know if not). Most of these are of the form:static const struct bzzt_type { [...list of members...]} const bzzt_devs[] = { [...list of initializers...]};The second const is unnecessary, as arrays cannot be modified anyway,and if the elements are const, the whole thing is const automatically(e.g. it is placed in .rodata).I have verified this does not change the binary output of a full kernelbuild (except for build timestamps embedded in the object files).Reviewed by: yongari, mariusMFC after: 1 week
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.
Remove variable initialized but no longer actually used since r226995.Found with: Coverity Prevent(tm)CID: 10044
- 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)
- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective interface also has such connectors.- In tl_attach() unify three different ways of obtaining the device and vendor IDs a
- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective interface also has such connectors.- In tl_attach() unify three different ways of obtaining the device and vendor IDs and remove the now obsolete tl_dinfo from tl_softc.- Given that tlphy(4) only handles the integrated PHYs of NICs driven by tl(4) make it only probe on the latter.- Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia().- Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4) by ignoring the native one by just comparing the device_t's directly rather than the device name.
Converted the remainder of the NIC drivers to use the mii_attach()introduced in r213878 instead of mii_phy_probe(). Unlike r213893 theseare only straight forward conversions though.Reviewed by: y
Converted the remainder of the NIC drivers to use the mii_attach()introduced in r213878 instead of mii_phy_probe(). Unlike r213893 theseare only straight forward conversions though.Reviewed by: yongari
- Hook into the existing stat timer to drive the transmit watchdog instead of using if_watchdog and if_timer.- Reorder detach to call ether_ifdetach() before anything else in tl(4) and wb(4).
Use the bus_*() routines rather than bus_space_*() for register operations.
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 shutdown prototypes.
Move the tl driver form sys/pci to sys/dev/tl.