- 03 Dec, 2021 19 commits
-
-
Peter Lei authored
The check to see if TCP port allocation should change from random to sequential port allocation mode may incorrectly cause a false positive due to negative wraparound. Example: V_ipport_tcpallocs = 2147483585 (0x7fffffc1) V_ipport_tcplastcount = 2147483553 (0x7fffffa1) V_ipport_randomcps = 100 The original code would compare (2147483585 <= -2147483643) and thus incorrectly move to sequential allocation mode. Compute the delta first before comparing against the desired limit to limit the wraparound effect (since tcplastcount is always a snapshot of a previous tcpallocs).
-
Michael Tuexen authored
When sending packets the stcb was used to access the inp and then access the endpoint specific IPv6 level options. This fails when there exists an inp, but no stcb yet. This is the case for sending an INIT-ACK in response to an INIT when no association already exists. Fix this by just providing the inp instead of the stcb. PR: 260120 MFC after: 1 week
-
Peter Lei authored
Fix logic error causing UDP(-Lite) local ephemeral port bindings to count against the TCP allocation counter, potentially causing TCP to go from random to sequential port allocation mode prematurely.
-
Eric Joyner authored
This should unbreak the kernel build when "options RSS" is defined in the kernel configuration, and make the feature work. Signed-off-by:
Eric Joyner <erj@FreeBSD.org> Reported by: adrian@ Sponsored by: Intel Corporation
-
Chuck Silvers authored
Some shared libraries specify mappings that leave a gap (actually a MAP_GUARD mapping) in between the file mappings (libcrypto.so was the one I found), and this would cause rd_loadobj_iter() to report the mapping info incorrectly, leaving out rdl_path and misreporting rdl_offset for file mappings after the gap. Fix rd_loadobj_iter() to handle this situation. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32950
-
Gleb Smirnoff authored
The previous commit to this node falsely stated that locked callouts are compatible with netgraph ng_callout KPI. They are not. An item can be queued instead of being applied to the node, which results in a mutex leak to the callout thread and later unlocked call into function that expects to be called locked. Potentially netgraph can be taught to handle locked callouts, but that would bring a lot of complexity in it. Instead lets question necessity of ng_callout() instead of callout_reset(). It protects against node going away while callout is scheduled. But a node that drains all callouts in the shutdown method (ng_l2tp does) is already protected. Fixes: 89042ff7
-
Fabian Keil authored
PR: 260189 MFC after: 2 weeks
-
Arnaud Ysmal authored
-
Konstantin Belousov authored
Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33167
-
Cy Schubert authored
This vendor import was requested by glebius@ as it should fix unbound crashes. Reported by: glebius MFC after: 1 week
-
Cy Schubert authored
This vendor import was requested by glebius@ as it should fix unbound crashes. Reported by: glebius
-
Gleb Smirnoff authored
Reported by: cy Pointy hat to: glebius Fixes: de2d4784
-
Gleb Smirnoff authored
-
Gleb Smirnoff authored
Reported by: kib Fixes: de2d4784
-
Gleb Smirnoff authored
-
Alan Somers authored
MFC after: 2 weeks
-
John Baldwin authored
Use OLD_FILES for a few symbolic links and static libraries previously included in OLD_LIBS. Add a missing shared library major number to an old libroken entry.
-
Mateusz Piotrowski authored
The Li macros has been deprecated by mdoc some time ago. Recommend the use of Ql instead. Reviewed by: debdrup MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33232
-
Herbert J. Skuhra authored
While here, sort the etc/rc.d entries. PR: 256483 Reviewed by: allanjude Approved by: allanjude (src) MFC after: 3 days Sponsored by: Modirum MDPay Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33238
-
- 02 Dec, 2021 21 commits
-
-
Cy Schubert authored
This is the November update to vendor/wpa committed upstream 2021-11-26. MFC after: 1 month
-
Alexander Motin authored
Some AMD systems I have report 8 NMI and 3591 polled error sources. Previous code could handle only one NMI source and used separate callout for each polled source. New code can handle multiple NMIs and groups polled sources by power of 2 of the polling period. MFC after: 2 weeks
-
Konstantin Belousov authored
ki_fd is legitimately NULL when 32bit process requests process data from 64bit host kernel. The field is not used by the code for sysctl case; procstat_getfiles_kvm() checks ki_fd. PR: 260174 Reported by: Damjan Jovanovic <damjan.jov@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week
-
Konstantin Belousov authored
Sponsored by: The FreeBSD Foundation MFC after: 1 week
-
Cy Schubert authored
This reverts commit 266f97b5, reversing changes made to a10253cf. A mismerge of a merge to catch up to main resulted in files being committed which should not have been.
-
Cy Schubert authored
This is the November update to vendor/wpa committed upstream 2021-11-26. MFC after: 1 month
-
Warner Losh authored
Port 9781c28c and a8837c77 to the mps driver. Before this change devq was frozen only if some command was sent to the target after reset started, but release was called always. This change freezes the devq immediately, leaving mprsas_action_scsiio() check only to cover race condition due to different lock devq use. This should also avoid unnecessary requeue of the commands, creating additional log noise and confusing some broken apps. It also avoids a 'busy' requeue of I/Os failing when we're doing recovery that takes longer than the normal busy timeout. These I/Os failing can lead to filesystems being unmounted in the force unmount case for I/O errors. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D33228
-
Gleb Smirnoff authored
An mbuf rcvif pointer is supposed to be valid and doesn't need extra checks. The code appeared in d314ad7b.
-
Mateusz Piotrowski authored
Reviewed by: allanjude Approved by: allanjude (src) MFC after: 3 days Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D33230
-
Gleb Smirnoff authored
which will report where the epoch was entered and also mark the tracker, so that exit will also be reported. Helps to understand epoch entrance/exit scenarios in complex cases, like network stack. As everything else under EPOCH_TRACE it is a developer only tool.
-
Gleb Smirnoff authored
Fixes: ce40632a
-
Gleb Smirnoff authored
Just trust the pcb database, that if we did in_pcbref(), no way an inpcb can go away. And if we never put a dropped inpcb on our queue, and tcp_discardcb() always removes an inpcb to be dropped from the queue, then any inpcb on the queue is valid. Now, to solve LOR between inpcb lock and HPTS queue lock do the following trick. When we are about to process a certain time slot, take the full queue of the head list into on stack list, drop the HPTS lock and work on our queue. This of course opens a race when an inpcb is being removed from the on stack queue, which was already mentioned in comments. To address this race introduce generation count into queues. If we want to remove an inpcb with generation count mismatch, we can't do that, we can only mark it with desired new time slot or -1 for remove. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33026
-
Gleb Smirnoff authored
The HPTS input queue is in reality used only for "delayed drops". When a TCP stack decides to drop a connection on the output path it can't do that due to locking protocol between main tcp_output() and stacks. So, rack/bbr utilize HPTS to drop the connection in a different context. In the past the queue could also process input packets in context of HPTS thread, but now no stack uses this, so remove this functionality. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33025
-
Gleb Smirnoff authored
Also, make some of the functions also private to the module. Remove unused functions discovered after that. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33024
-
Gleb Smirnoff authored
It will hide some internal HPTS knowledge from the consumers. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33023
-
Gleb Smirnoff authored
With introduction of epoch(9) synchronization to network stack the inpcb database became protected by the network epoch together with static network data (interfaces, addresses, etc). However, inpcb aren't static in nature, they are created and destroyed all the time, which creates some traffic on the epoch(9) garbage collector. Fairly new feature of uma(9) - Safe Memory Reclamation allows to safely free memory in page-sized batches, with virtually zero overhead compared to uma_zfree(). However, unlike epoch(9), it puts stricter requirement on the access to the protected memory, needing the critical(9) section to access it. Details: - The database is already build on CK lists, thanks to epoch(9). - For write access nothing is changed. - For a lookup in the database SMR section is now required. Once the desired inpcb is found we need to transition from SMR section to r/w lock on the inpcb itself, with a check that inpcb isn't yet freed. This requires some compexity, since SMR section itself is a critical(9) section. The complexity is hidden from KPI users in inp_smr_lock(). - For a inpcb list traversal (a pcblist sysctl, or broadcast notification) also a new KPI is provided, that hides internals of the database - inp_next(struct inp_iterator *). Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33022
-
Gleb Smirnoff authored
Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33021
-
Gleb Smirnoff authored
With upcoming changes to the inpcb synchronisation it is going to be broken. Even its current status after the move of PCB synchronization to the network epoch is very questionable. This experimental feature was sponsored by Juniper but ended never to be used in Juniper and doesn't exist in their source tree [sjg@, stevek@, jtl@]. In the past (AFAIK, pre-epoch times) it was tried out at Netflix [gallatin@, rrs@] with no positive result and at Yandex [ae@, melifaro@]. I'm up to resurrecting it back if there is any interest from anybody. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33020
-
Gleb Smirnoff authored
Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33019
-
Don Morris authored
Reviewed by: vangyzen, whu, bdrewery Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D30060
-
Ed Maste authored
-