divert: Use a jenkins hash to select the target socket
Using the pf state ID turned out to be a bad choice: we store the
big-endian representation of a global counter, so low bits are typically
zero.
divert: Define semantics for SO_REUSEPORT_LB on divert sockets
Allow SO_REUSEPORT_LB to be set on divert sockets. If set, then bind()
will add the socket to a "load-balancing group". When a divert-to rule
matches a port with an associated group, the corresponding state ID is
used to select a specific socket from the group. Packets without an
associated state are simply forwarded to the first socket in the group.
This implementation is simple but has some caveats, the main one being
that if sockets are added to the group while flows are being processed,
the size of the group will change and this changes the mapping of state
IDs to sockets. So, to get a consistent mapping, the divert socket
application must bind all of its sockets before any traffic is processed
by pf.
pf: Rationalize the ip_divert_ptr test
If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.
Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.
No functional change intended.
ipdivert: Use CK_SLISTs for the divcb hash table
The hash table is accessed in ip_divert_packet(), and there the accesses
are synchronized only by the net epoch, so plain SLIST is not safe.
[flang] change yielded iv value to be `iv + step` (#174124)
In cases where induction variables are used after the loop, like
```
write(*,*) (a(j),j=1,10)
print *, j
```
the incremented value should be used. Updating the FIRToSCF pass to
support this.
Start adding an exercise mode for programs under test.
In exercise mode we collect data for every available counter on a
program and keep all of that in a directory in /tmp.
[ThinLTO][COFF] Pass loop and slp vectorize options to LTO backend (#173041)
Commit 21a4710c67 added this for ELF, this patch does the same for COFF.
The differences in codegen were noticed whilst testing DTLTO for COFF.
[X86] combineConcatVectorOps - check for an existing operands concatenation (#174397)
If the requested operand concatenation already exists, then always use it.
This isn't always going to work as CONCAT_VECTORS() is usually lowered to an INSERT_SUBVECTOR() chain, but it still helps.
[X86] combineSelect - replace manual constant pow2 checks and ctlz constant fold with standard DAG methods (#174395)
Followup to #174167 - just let
isKnownToBeAPowerOfTwo/FoldConstantArithmetic handle the fold `vsel ((X
& C) == 0), LHS, RHS` --> `vsel ((shl X, ctlz C) < 0), RHS, LHS` iff C
is pow2
Revert "[AMDGPU] Fix excessive stack usage in SIInsertWaitcnts::run (#134835)" (#174215)
This reverts commit 008c875be85732f72c4df4671167f5be79f449eb.
PR #162077 / #171779 shrunk the WaitcntBrackets class by using DenseMaps
instead of large arrays, so the size of a temporary WaitcntBrackets
allocated on the stack is no longer a concern.
With this patch on Linux I measured the stack size of
SIInsertWaitcnts::run increasing from 456 bytes to 632 bytes.
interface: POC for multi-dhcp6c support
I'm not entirely sure why we settled for a single deamon of
dhcp6c back in the day, but there are certianly downsides to
it and I don't see something that wasn't fixed in the meantime
that makes this not work.
At the moment this splits off dhcp6c only but we need to
change the daemon's print a bit to avoid complaining about
"other" devices since the situation to ignore a non-listening
interface is normal and not "ignoring" something obvious as
the INFO log message suggests.
rtsold still needs to be split to allow for HUP reload of
a single interface instead of forcing a restart of all
DHCPv6 WAN clients at the same time.
NAS-139144 / 26.04 / remove python3-setproctitle dependency (#17937)
Replace python3-setproctitle with pure Python procfs implementation. The
previous library overwrote both the comm name (/proc/self/comm) and the
cmdline buffer (/proc/self/cmdline), but these could differ in length
due to the 15-character comm limit. This produced inconsistent output
between tools: ps -e and top/htop showed the truncated comm name while
ps aux showed the full cmdline.
The new implementation:
- Sets both comm and cmdline to the same short name for consistent
output across all process listing tools
- Uses /proc/self/task/comm to set thread-specific names, preventing
worker threads from overwriting the main process name
- Reads arg_start/arg_end from /proc/self/stat to safely overwrite the
cmdline buffer without overflow
Process names are now:
- middlewared (main process) <--- this was a bug because we were
[2 lines not shown]
update ieee80211_classify to RFC8325 and rate-limit high-prio QoS packets
The previous implementation based on RFC2474 did not rate-limit high-prio
packets and had no high-prio mapping for DSCP_EF, which is used by ssh(1).
The goal of this change is to send DSCP_EF with high QoS priority at the
wifi layer, without allowing misbehaving applications to send too many
such packets at once.
Access points usually send a beacon every 100ms, and everything else must
happen in-between beacons. Which means, with 2ms per Tx op, a channel will
start becoming completely blocked if an application can grab about 50 VO Tx
opportunities per beacon.
To balance this with typing latency, we need to consider that users are
typing comfortably at a latency between 20-200ms.
Based on this, let's aim for roughly 50ms typing latency. Which means we
want to allow up to 2 VO Tx OPs per 100ms. Beyond this threshold we mark
[3 lines not shown]
NAS-139162 / 26.04 / call service.started in truesearch.py (#17950)
This is, literally, the single place that `service.get_state` is called
in a plugin. Let's follow paradigm and use `service.started`.
net/frr: Prevent errors in diagnostics view when a frr daemon is not started (#5119)
* net/frr: Prevent errors in diagnostics view when a frr daemon is not started
* Add revision
Stop doing `if_timer' modifications. We don't set `if_watchdog' handler
so the watchdog timeout is not used. However, `if_timer' is prtected with
kernel lock and this makes upcoming genet_start() unlocking useless.
If someone want to implement watchdog for bse(4), it should be done in
mp-safe way, may be with preceding if_slowtimo reworking.
No objections from kettenis.
Do not check ifp->if_flags and ifq_is_oactive() within genet_start().
Our caller, the interface queues layer, already did this.
No objections from kettenis.