altq: Fix panics on rmc_restart()rmc_restart() is called from a timer, but can trigger traffic. Thismeans the curvnet context will not be set.Use the vnet associated with the interface we're curr
altq: Fix panics on rmc_restart()rmc_restart() is called from a timer, but can trigger traffic. Thismeans the curvnet context will not be set.Use the vnet associated with the interface we're currently processing toset it. We also have to enter net_epoch here, for the same reason.Reviewed by: mjgMFC after: 1 weekSponsored by: Rubicon Communications, LLC ("Netgate")Differential Revision: https://reviews.freebsd.org/D31642(cherry picked from commit 159258afb50ad57f7ed27fe86ded83a7b3a26f90)
show more ...
altq: Fix typo in features sysctl descriptionReported by: Jose Luis Duran(cherry picked from commit 35dabb7b9cff601045b623aeca59ccc68930d520)
Add FEATURE sysctls for ALTQ disciplinesThis will allow userspace to more easily figure out if ALTQ is builtinto the kernel and what disciplines are supported.Reviewed by: donner@Differential
Add FEATURE sysctls for ALTQ disciplinesThis will allow userspace to more easily figure out if ALTQ is builtinto the kernel and what disciplines are supported.Reviewed by: donner@Differential Revision: https://reviews.freebsd.org/D28302(cherry picked from commit e111d79806fe3652bc85593ca77ee1b4ff85498d)
net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macrosIntroduce convenience macros to retrieve the DSCP, ECN or traffic classbits from an IPv6 header.Use them where appropriate.
net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macrosIntroduce convenience macros to retrieve the DSCP, ECN or traffic classbits from an IPv6 header.Use them where appropriate.Reviewed by: ae (previous version), rscheff, tuexen, rgrimesSponsored by: Rubicon Communications, LLC ("Netgate")Differential Revision: https://reviews.freebsd.org/D29056(cherry picked from commit bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e)
altq: Increase maximum number of CBQ and HFSC classesIn some configurations we need more classes than ALTQ supports bydefault. Increase the maximum number of classes we allow.This will only cost
altq: Increase maximum number of CBQ and HFSC classesIn some configurations we need more classes than ALTQ supports bydefault. Increase the maximum number of classes we allow.This will only cost us a comparatively trivial amount of memory, sothere's little reason not to do so.If ever we find we want even more we may want to consider turning thesedefines into a tunable, but for now do the easy thing.Reviewed by: donner@MFC after: 2 weeksSponsored by: Rubicon Communications, LLC ("Netgate")Differential Revision: https://reviews.freebsd.org/D29034(cherry picked from commit 448732b8e2d9bf4e2656a2e5a9e88cc58b88d4f4)
net: clean up empty lines in .c and .h files
Use a void * argument to callout handlers instead of timeout_t casts.Reviewed by: kibDifferential Revision: https://reviews.freebsd.org/D22684
Reduce the time it takes the kernel to install a new PF config containing a large number of queuesIn general, the time savings come from separating the active andinactive queues lists into separat
Reduce the time it takes the kernel to install a new PF config containing a large number of queuesIn general, the time savings come from separating the active andinactive queues lists into separate interface and non-interface queuelists, and changing the rule and queue tag management from list-basedto hash-bashed.In HFSC, a linear scan of the class table during each queue destroywas also eliminated.There are now two new tunables to control the hash size used for eachtag set (default for each is 128):net.pf.queue_tag_hashsizenet.pf.rule_tag_hashsizeReviewed by: kpMFC after: 1 weekSponsored by: RG NetsDifferential Revision: https://reviews.freebsd.org/D19131
Mechanical cleanup of epoch(9) usage in network stack.- Remove macros that covertly create epoch_tracker on thread stack. Such macros a quite unsafe, e.g. will produce a buggy code if same macro
Mechanical cleanup of epoch(9) usage in network stack.- Remove macros that covertly create epoch_tracker on thread stack. Such macros a quite unsafe, e.g. will produce a buggy code if same macro is used in embedded scopes. Explicitly declare epoch_tracker always.- Unmask interface list IFNET_RLOCK_NOSLEEP(), interface address list IF_ADDR_RLOCK() and interface AF specific data IF_AFDATA_RLOCK() read locking macros to what they actually are - the net_epoch. Keeping them as is is very misleading. They all are named FOO_RLOCK(), while they no longer have lock semantics. Now they allow recursion and what's more important they now no longer guarantee protection against their companion WLOCK macros. Note: INP_HASH_RLOCK() has same problems, but not touched by this commit.This is non functional mechanical change. The only functionally changedfunctions are ni6_addrs() and ni6_store_addrs(), where we no longer enterepoch recursively.Discussed with: jtl, gallatin
altq: manual cleanup after r341507Remove a file that became practically empty.Fix indentation.Like r341507, I do not plan to MFC, but anyone else can.
altq: remove ALTQ3_COMPAT codeThis code has apparently never compiled on FreeBSD since itsintroduction in 2004 (r130365). It has certainly not compiledsince 2006, when r164033 added #elsif [sic]
altq: remove ALTQ3_COMPAT codeThis code has apparently never compiled on FreeBSD since itsintroduction in 2004 (r130365). It has certainly not compiledsince 2006, when r164033 added #elsif [sic] preprocessor directives.The code was left in the tree to reduce the diff from upstream (KAME).Since that upstream is no longer relevant, remove the long-dead code.This commit is the direct result of: unifdef -m -UALTQ3_COMPAT sys/net/altq/*A later commit will do some manual cleanup.I do not plan to MFC this. If that would help you, go for it.
Fix flags collision causing inability to enable CBQ in ALTQThe CBQ BORROW flag conflicts with the RMCF_CODEL flag; thetwo sets of definitions actually define the same things. The symptomis that a
Fix flags collision causing inability to enable CBQ in ALTQThe CBQ BORROW flag conflicts with the RMCF_CODEL flag; thetwo sets of definitions actually define the same things. The symptomis that a kernel with CBQ support and not CODEL fails to load a QoSpolicy with the obscure error "pfctl: DIOCADDALTQ: Cannot allocate memory."If ALTQ_DEBUG is enabled, the error becomes a little clearer:"rmc_newclass: CODEL not configured for CBQ!" is printed by the kernel.There really shouldn't be two sets of macros that have to be definedconsistently, but the include structure isn't right for exportingCBQ flags to altq_rmclass.h. Re-align the definitions, and addCTASSERTs in the kernel to ensure that the definitions are consistent.PR: 215716Reviewed by: pkelseyMFC after: 2 weeksSponsored by: Forcepoint LLCDifferential Revision: https://reviews.freebsd.org/D17758
Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of2^32 bps or greater to be used. Prior to this, bandwidth parameterswould simply wrap at the 2^32 boundary. The computations in th
Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of2^32 bps or greater to be used. Prior to this, bandwidth parameterswould simply wrap at the 2^32 boundary. The computations in the HFSCscheduler and token bucket regulator have been modified to operatecorrectly up to at least 100 Gbps. No other algorithms have beenexamined or modified for correct operation above 2^32 bps (some mayhave existing computation resolution or overflow issues at rates belowthat threshold). pfctl(8) will now limit non-HFSC bandwidthparameters to 2^32 - 1 before passing them to the kernel.The extensions to the pf(4) ioctl interface have been made in abackwards-compatible way by versioning affected data structures,supporting all versions in the kernel, and implementing macros thatwill cause existing code that consumes that interface to use version 0without source modifications. If version 0 consumers of the interfaceare used against a new kernel that has had bandwidth parameters of2^32 or greater configured by updated tools, such bandwidth parameterswill be reported as 2^32 - 1 bps by those old consumers.All in-tree consumers of the pf(4) interface have been updated. Toupdate out-of-tree consumers to the latest version of the interface,define PFIOC_USE_LATEST ahead of any includes and use the code ofpfctl(8) as a guide for the ioctls of interest.PR: 211730Reviewed by: jmallett, kp, loosMFC after: 2 weeksRelnotes: yesSponsored by: RG NetsDifferential Revision: https://reviews.freebsd.org/D16782
ALTQ support for iflib.Reviewed by: jmallett, mmacyDifferential Revision: https://reviews.freebsd.org/D16433
UDP: further performance improvements on txCumulative throughput while running 64 netperf -H $DUT -t UDP_STREAM -- -m 1on a 2x8x2 SKL went from 1.1Mpps to 2.5MppsSingle stream throughput incre
UDP: further performance improvements on txCumulative throughput while running 64 netperf -H $DUT -t UDP_STREAM -- -m 1on a 2x8x2 SKL went from 1.1Mpps to 2.5MppsSingle stream throughput increases from 910kpps to 1.18MppsBaseline:https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg- Protect read access to global ifnet list with epochhttps://people.freebsd.org/~mmacy/2018.05.11/udpsender3.svg- Protect short lived ifaddr references with epochhttps://people.freebsd.org/~mmacy/2018.05.11/udpsender4.svg- Convert if_afdata read lock path to epochhttps://people.freebsd.org/~mmacy/2018.05.11/udpsender5.svgA fix for the inpcbhash contention is pending sufficient timeon a canary at LLNW.Reviewed by: gallatinSponsored by: Limelight NetworksDifferential Revision: https://reviews.freebsd.org/D15409
kernel: Fix several typos and minor errors- duplicate words- typos- references to old versions of FreeBSDReviewed by: imp, benno
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
Remove an alias if_list, use if_link consistently.Reviewed by: tuexenDifferential Revision: https://reviews.freebsd.org/D8075
Hide the boottime and bootimebin globals, provide the getboottime(9)and getboottimebin(9) KPI. Change consumers of boottime to use theKPI. The variables were renamed to avoid shadowing issues with
Hide the boottime and bootimebin globals, provide the getboottime(9)and getboottimebin(9) KPI. Change consumers of boottime to use theKPI. The variables were renamed to avoid shadowing issues with localvariables of the same name.Issue is that boottime* should be adjusted from tc_windup(), whichrequires them to be members of the timehands structure. As apreparation, this commit only introduces the interface.Some uses of boottime were found doubtful, e.g. NLM uses boottime toidentify the system boot instance. Arguably the identity should notchange on the leap second adjustment, but the commit is about thetimekeeping code and the consumers were kept bug-to-bug compatible.Tested by: pho (as part of the bigger patch)Reviewed by: jhb (same)Discussed with: bdeSponsored by: The FreeBSD FoundationMFC after: 1 monthX-Differential revision: https://reviews.freebsd.org/D7302
Don't repeat the the word 'the'(one manual change to fix grammar)Confirmed With: dbApproved by: secteam (not really, but this is a comment typo fix)
sys/net*: minor spelling fixes.No functional change.
Fix the spelling of eri's name.Pointy hat to: loosMFC with: r287009
Add ALTQ(9) support for the CoDel algorithm.CoDel is a parameterless queue discipline that handles variable bandwidthand RTT.It can be used as the single queue discipline on an interface or as a
Add ALTQ(9) support for the CoDel algorithm.CoDel is a parameterless queue discipline that handles variable bandwidthand RTT.It can be used as the single queue discipline on an interface or as a subdiscipline of existing queue disciplines such as PRIQ, CBQ, HFSC, FAIRQ.Differential Revision: https://reviews.freebsd.org/D3272Reviewd by: rpaulo, gnn (previous version)Obtained from: pfSenseSponsored by: Rubicon Communications (Netgate)
Another attempt to make this compile on more architectures after r284777.
Correct r284777 to use proper includes and remove dead code to unbreak kernel builds.Differential Revision: https://reviews.freebsd.org/D2847
12