smc: clean up empty lines in .c and .h files
Add an ACPI attachment for if_smcThis is needed by some of the Arm simulators as they implement a smc basednetwork interface, but use ACPI rather than FDT.Sponsored by: Innovate UK
Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that processincoming packets in taskqueue context.Reviewed by: hselaskyDifferential Revision: https://reviews.freebsd.org/D23518
Use callout_func_t instead of the deprecated timeout_t.Reviewed by: kib, impDifferential Revision: https://reviews.freebsd.org/D22752
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial)Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c)Differential Revision: https://reviews.freebsd.org/D10385
show more ...
Garbage collect IFCAP_POLLING_NOCOUNT. It wasn't used since verybeginning of polling(4). The module always ignored return valuefrom driver polling handler.
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.
Make this compile with DEVICE_POLLING set.smc_poll had the wrong prototype. It returns 0 as it does not checkanything but submits a taskqueue.Reviewed by: bennoMFC after: 2 weeks
Remove taskqueue_enqueue_fast().taskqueue_enqueue() was changed to support both fast and non-fasttaskqueues 10 years ago in r154167. It has been a compat shim eversince. It's time for the compa
Remove taskqueue_enqueue_fast().taskqueue_enqueue() was changed to support both fast and non-fasttaskqueues 10 years ago in r154167. It has been a compat shim eversince. It's time for the compat shim to go.Submitted by: Howard Su <[email protected]>Reviewed by: sepheDifferential Revision: https://reviews.freebsd.org/D5131
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Most calls to bus_alloc_resource() use "anywhere" as the range, with a givencount. Migrate these to use the new bus_alloc_
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Most calls to bus_alloc_resource() use "anywhere" as the range, with a givencount. Migrate these to use the new bus_alloc_resource_anywhere() API.Reviewed by: jhbDifferential Revision: https://reviews.freebsd.org/D5370
o Correct the calculation how many pages we needo Ensure we use correct bank for MSK registero Save and restore current bank in interrupt handlero Stop TX watchdog on fatal errorso Use right regi
o Correct the calculation how many pages we needo Ensure we use correct bank for MSK registero Save and restore current bank in interrupt handlero Stop TX watchdog on fatal errorso Use right register for EPH statusThis fixes operation on ARMv8 Foundation ModelReviewed by: benno@
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
Fx a type from r271817; it's IFCOUNTER_* not IFNET_*.
Mechanically convert to if_inc_counter().
Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARMVersatile hardware.
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.
Disable interrupts in filter in order to avoid interrupt storm and CPU starvation
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
- Do not reinitialize the card if it is already running. This fixes bootp on if_smc, as bootp code perform SIOCSIFADDR ioctl call immediately after sending the request (which causes if_init bei
- Do not reinitialize the card if it is already running. This fixes bootp on if_smc, as bootp code perform SIOCSIFADDR ioctl call immediately after sending the request (which causes if_init being called) which causes the adapter to drop all the packets received in the meantime.
- 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)
- Fix NULL pointer dereference when a packet of uneven size is being transmitted.Approved by: re (kib)MFC after: 3 days
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
Add new tunable 'net.link.ifqmaxlen' to set default send interfacequeue length. The default value for this parameter is 50, which isquite low for many of today's uses and the only way to modify thi
Add new tunable 'net.link.ifqmaxlen' to set default send interfacequeue length. The default value for this parameter is 50, which isquite low for many of today's uses and the only way to modify thisparameter right now is to edit if_var.h file. Also add read-onlysysctl with the same name, so that it's possible to retrieve thecurrent value.MFC after: 1 month
strict kobj signatures: fix assortment of miibus_writereg implsreturn type should be int, not voidReviewed by: imp, current@Approved by: jhb (mentor)
When user_frac in the polling subsystem is low it is going to busy theCPU for too long period than necessary. Additively, interfaces are keptpolled (in the tick) even if no more packets are availa
When user_frac in the polling subsystem is low it is going to busy theCPU for too long period than necessary. Additively, interfaces are keptpolled (in the tick) even if no more packets are available.In order to avoid such situations a new generic mechanism can beimplemented in proactive way, keeping track of the time spent on anypacket and fragmenting the time for any tick, stopping the processingas soon as possible.In order to implement such mechanism, the polling handler needs tochange, returning the number of packets processed.While the intended logic is not part of this patch, the polling KPI isbroken by this commit, adding an int return value and the new flagIFCAP_POLLING_NOCOUNT (which will signal that the return value ismeaningless for the installed handler and checking should be skipped).Bump __FreeBSD_version in order to signal such situation.Reviewed by: emasteSponsored by: Sandvine Incorporated
12