dev/ce: double assignment.The code is not operational right now so just comment away an obviouslyuseless assignment. Fix some typos while here.Found with: coccinelle (da.cocci)
sys/dev: Replace zero with NULL for pointers.Makes things easier to read, plus architectures may set NULL to somethingdifferent than zero.Found with: devel/coccinelleMFC after: 3 weeks
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd.org/D5373
show more ...
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and cle
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and clean up callout_init() callsto make them more consistent.Differential Revision: https://reviews.freebsd.org/D2613Reviewed by: jhbMFC after: 2 weeks
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
Convert most BPF_TAP users to BPF_MTAP.MFC after: 2 weeks
Remove ifq_drops from struct ifqueue. Now queue drops are accounted instruct ifnet if_oqdrops.Some netgraph modules used ifqueue w/o ifnet. Accounting of queue dropsis simply removed from them. T
Remove ifq_drops from struct ifqueue. Now queue drops are accounted instruct ifnet if_oqdrops.Some netgraph modules used ifqueue w/o ifnet. Accounting of queue dropsis simply removed from them. There were no API to read this statistic.Sponsored by: NetflixSponsored by: Nginx, Inc.
Mechanically convert to if_inc_counter().
Replace local copy-and-paste implementations of printmbuf() in severaldevice drivers with calls to the centralised m_print() implementation.While the formatting and output details differ a little,
Replace local copy-and-paste implementations of printmbuf() in severaldevice drivers with calls to the centralised m_print() implementation.While the formatting and output details differ a little, the contentis essentially the same, and it is unlikely anyone has used thisdebugging output in some time.This change reduces awareness of mbuf cluster allocation (and,especially, the M_EXT flag) outside of the mbuf allocator, which willmake it easier to refine the external storage mechanism withoutdisrupting drivers in the future.Style bugs are preserved.Reviewed by: bz, glebiusMFC after: 3 daysSponsored by: EMC / Isilon Storage Division
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.
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arraysReviewed by: cognetApproved by: cognet
Mechanically substitute flags from historic mbuf allocator withmalloc(9) flags in sys/dev.
Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c,using jkim's last patch (reviewed by bde) from here:http://docs.freebsd.org/cgi/mid.cgi?201010141558.03154.jkimMFC after: 1 week
Revert r213793.
Don't do a logical AND of the result of strcmp() with a constant.Found with: clang
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
Always use a private timer instead of if_watchdog and if_timer to drivethe transmit watchdog. These drivers already used a private timer whencompiled to use Netgraph. This change just makes them
Always use a private timer instead of if_watchdog and if_timer to drivethe transmit watchdog. These drivers already used a private timer whencompiled to use Netgraph. This change just makes them always use theprivate timer. Note that these drivers do not compile and are disconnectedfrom the build due to TTY changes.
Use new spelling of the NG_*LEN constants.
Remove debug.ce.mpsafenet: we no longer support running the networkstack with conditional Giant acquisition, and IFF_NEEDSGIANT willbe removed in the near future.
Retire the MALLOC and FREE macros. They are an abomination unto style(9).MFC after: 3 months
Replace all calls to minor() with dev2unit().After I removed all the unit2minor()/minor2unit() calls from the kernelyesterday, I realised calling minor() everywhere is quite confusing.Character d
Replace all calls to minor() with dev2unit().After I removed all the unit2minor()/minor2unit() calls from the kernelyesterday, I realised calling minor() everywhere is quite confusing.Character devices now only have the ability to store a unit number, nota minor number. Remove the confusion by using dev2unit() everywhere.This commit could also be considered as a bug fix. A lot of drivers callminor(), while they should actually be calling dev2unit(). In -CURRENTthis isn't a problem, but it turns out we never had any problem reportsrelated to that issue in the past. I suspect not many people connectmore than 256 pieces of the same hardware.Reviewed by: kib
Fix instances of bogus #elsif directive.Found by: CScoutMFC after: 2 weeks
Do not set IFF_DEBUG directly from the driver.MFC after: 1 month.
First in a series of changes to remove the now-unused Giant compatibilityframework for non-MPSAFE network protocols:- Remove debug_mpsafenet variable, sysctl, and tunable.- Remove NET_NEEDS_GIANT
First in a series of changes to remove the now-unused Giant compatibilityframework for non-MPSAFE network protocols:- Remove debug_mpsafenet variable, sysctl, and tunable.- Remove NET_NEEDS_GIANT() and associate SYSINITSs used by it to force debug.mpsafenet=0 if non-MPSAFE protocols are compiled into the kernel.- Remove logic to automatically flag interrupt handlers as non-MPSAFE if debug.mpsafenet is set for an INTR_TYPE_NET handler.- Remove logic to automatically flag netisr handlers as non-MPSAFE if debug.mpsafenet is set.- Remove references in a few subsystems, including NFS and Cronyx drivers, which keyed off debug_mpsafenet to determine various aspects of their own locking behavior.- Convert NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), and NET_ASSERT_GIANT into no-op's, as their entire behavior was determined by the value in debug_mpsafenet.- Alias NET_CALLOUT_MPSAFE to CALLOUT_MPSAFE.Many remaining references to NET_.*_GIANT() and NET_CALLOUT_MPSAFE are stillpresent in subsystems, and will be removed in followup commits.Reviewed by: bz, jhbApproved by: re (kensmith)
12