#
95ee2897 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
8ef7beb2 |
|
26-Jan-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
dummynet: use m_rcvif_serialize/restore when queueing packets This fixed panic with interface being removed while packet was sitting on a queue. This allows to pass all dummynet tests including forthcoming dummynet:ipfw_interface_removal and dummynet:pf_interface_removal and demonstrates use of m_rcvif_serialize() and m_rcvif_restore(). Reviewed by: kp Differential revision: https://reviews.freebsd.org/D33267 (cherry picked from commit 165746f4e4bf54c5902a103c2d4a3455e651c58f)
|
#
894c574e |
|
03-May-2022 |
Marko Zec <zec@FreeBSD.org> |
Revert "dummynet: use m_rcvif_serialize/restore when queueing packets" This reverts commit 165746f4e4bf54c5902a103c2d4a3455e651c58f. Obtained from: github.com/glebius/FreeBSD/commits/backout-ifindex
|
#
f70fc437 |
|
02-Apr-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
netpfil: Fix two typo in source code comments - s/measurment/measurement/ While here, also fix some whitespace issues. MFC after: 3 days
|
#
3f3e4f3c |
|
27-Jan-2022 |
Kristof Provost <kp@FreeBSD.org> |
dummynet: don't use per-vnet locks to protect global data. The ref_count counter is global (i.e. not per-vnet) so we can't use a per-vnet lock to protect it. Moreover, in callouts curvnet is not set, so we'd end up panicing when trying to use DN_BH_WLOCK(). Instead we use the global sched_lock, which is already used when evaluating ref_count (in unload_dn_aqm()). Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34059
|
#
165746f4 |
|
26-Jan-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
dummynet: use m_rcvif_serialize/restore when queueing packets This fixed panic with interface being removed while packet was sitting on a queue. This allows to pass all dummynet tests including forthcoming dummynet:ipfw_interface_removal and dummynet:pf_interface_removal and demonstrates use of m_rcvif_serialize() and m_rcvif_restore(). Reviewed by: kp Differential revision: https://reviews.freebsd.org/D33267
|
#
1de20ebc |
|
14-Dec-2021 |
Franco Fichtner <franco@opnsense.org> |
dummynet: drop unused definitions Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D33429
|
#
fe3bcfbd |
|
15-May-2021 |
Tom Jones <thj@FreeBSD.org> |
VNETify dummynet This moves dn_cfg and other parameters into per VNET variables. The taskqueue and control state remains global. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D29274
|
#
c4a6258d |
|
18-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
dummynet: Fix mbuf tag allocation failure handling PR: 255875, 255878, 255879, 255880 Reviewed by: donner, kp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30318
|
#
662c1305 |
|
01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
#
7029da5c |
|
26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
|
#
d196c9ee |
|
19-May-2017 |
Don Lewis <truckman@FreeBSD.org> |
Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au> MFC after: 1 week
|
#
36fb8be6 |
|
18-May-2017 |
Don Lewis <truckman@FreeBSD.org> |
The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi <ralsaadi@swin.edu.au> MFC after: 1 week
|
#
bcd8d3b8 |
|
13-Apr-2017 |
Conrad Meyer <cem@FreeBSD.org> |
dummynet: Use strlcpy to appease static checkers Some dummynet modules used strcpy() to copy from a larger buffer (dn_aqm->name) to a smaller buffer (dn_extra_parms->name). It happens that the lengths of the strings in the dn_aqm buffers were always hardcoded to be smaller than the dn_extra_parms buffer ("CODEL", "PIE"). Use strlcpy() instead, to appease static checkers. No functional change. Reported by: Coverity CIDs: 1356163, 1356165 Sponsored by: Dell EMC Isilon
|
#
12be18c7 |
|
04-Jul-2016 |
Don Lewis <truckman@FreeBSD.org> |
Fix a race condition between the main thread in aqm_pie_cleanup() and the callout thread that can cause a kernel panic. Always do the final cleanup in the callout thread by passing a separate callout function for that task to callout_reset_sbt(). Protect the ref_count decrement in the callout with DN_BH_WLOCK(). All other ref_count manipulation is protected with this lock. There is still a tiny window between ref_count reaching zero and the end of the callout function where it is unsafe to unload the module. Fixing this would require the use of callout_drain(), but this can't be done because dummynet holds a mutex and callout_drain() might sleep. Remove the callout_pending(), callout_active(), and callout_deactivate() calls from calculate_drop_prob(). They are not needed because this callout uses callout_init_mtx(). Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au> Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D6928
|
#
d6736547 |
|
01-Jun-2016 |
Don Lewis <truckman@FreeBSD.org> |
Replace constant expressions that contain multiplications by fractional floating point values with integer divides. This will eliminate any chance that the compiler will generate code to evaluate the expression using floating point at runtime. Suggested by: bde Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au> MFC after: 8 days (with r300779 and r300949)
|
#
fe4b5f66 |
|
29-May-2016 |
Don Lewis <truckman@FreeBSD.org> |
Cast some expressions that multiply a long long constant by a floating point constant to int64_t. This avoids the runtime conversion of the the other operand in a set of comparisons from int64_t to floating point and doing the comparisions in floating point. Suggested by: lidl Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au> MFC after: 2 weeks (with r300779)
|
#
91336b40 |
|
26-May-2016 |
Don Lewis <truckman@FreeBSD.org> |
Import Dummynet AQM version 0.2.1 (CoDel, FQ-CoDel, PIE and FQ-PIE). Centre for Advanced Internet Architectures Implementing AQM in FreeBSD * Overview <http://caia.swin.edu.au/freebsd/aqm/index.html> * Articles, Papers and Presentations <http://caia.swin.edu.au/freebsd/aqm/papers.html> * Patches and Tools <http://caia.swin.edu.au/freebsd/aqm/downloads.html> Overview Recent years have seen a resurgence of interest in better managing the depth of bottleneck queues in routers, switches and other places that get congested. Solutions include transport protocol enhancements at the end-hosts (such as delay-based or hybrid congestion control schemes) and active queue management (AQM) schemes applied within bottleneck queues. The notion of AQM has been around since at least the late 1990s (e.g. RFC 2309). In recent years the proliferation of oversized buffers in all sorts of network devices (aka bufferbloat) has stimulated keen community interest in four new AQM schemes -- CoDel, FQ-CoDel, PIE and FQ-PIE. The IETF AQM working group is looking to document these schemes, and independent implementations are a corner-stone of the IETF's process for confirming the clarity of publicly available protocol descriptions. While significant development work on all three schemes has occured in the Linux kernel, there is very little in FreeBSD. Project Goals This project began in late 2015, and aims to design and implement functionally-correct versions of CoDel, FQ-CoDel, PIE and FQ_PIE in FreeBSD (with code BSD-licensed as much as practical). We have chosen to do this as extensions to FreeBSD's ipfw/dummynet firewall and traffic shaper. Implementation of these AQM schemes in FreeBSD will: * Demonstrate whether the publicly available documentation is sufficient to enable independent, functionally equivalent implementations * Provide a broader suite of AQM options for sections the networking community that rely on FreeBSD platforms Program Members: * Rasool Al Saadi (developer) * Grenville Armitage (project lead) Acknowledgements: This project has been made possible in part by a gift from the Comcast Innovation Fund. Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au> X-No objection: core MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6388
|