ixl(4): Fix NVM update API
Driver provides an interface for tools operating on adapters'
Non-Volatile Memory using SIOC(G|S)DRVSPEC ioctls. It allows
tools to issue Admin Queue commands to the firmware, which
may return an error code encoded as a negative integer.
The driver passed this negative integer as the return value
of the ioctl handler. This was causing issues because the FreeBSD
kernel reserves negative error codes in system calls for special
purposes such as restarting the handler or detecting incorrect
behavior in VFS operations. Simple remapping of negative values
to positive integers caused currently available tools to misbehave
and could break the NVM update process. Introduce a new API version,
which allows new versions of tools to detect the fixed driver.
Temporarily keep the old API, but issue a warning that tools need
to be updated.
Also refactor the code to use centralized cleanup and move the
debug message from the firmware earlier to make sure it is not masked
[10 lines not shown]
cxgbe(4): Fix netmap rx behavior with nm_split_rss
The driver should look for active queues and one potential default-queue
in both halves of the split instead of stopping at the first valid
default-queue.
Fixes: a9f476580eb0cxgbe(4): fixes for netmap operation with only some queues active
Sponsored by: Chelsio Communications
(cherry picked from commit 77d71f5f36cc01e7fc2ca0828af00a4478bbf53c)
em(4): fix capability bounds needed to access checksum context.
Ensure the offp capability bounds cover entire struct with checksum fields.
This is needed for CHERI systems to avoid bounds violation trap, as
otherwise offp allowed to dereference 4 bytes of csum_flags field only
so bzero failed.
Tested on ARM Morello.
Reviewed by: kbowling
Discussed with: jrtc27
Sponsored by: CHERI Research Centre
Differential Revision: https://reviews.freebsd.org/D53903
(cherry picked from commit 64ee9c166ce5e807e575d205ac2e15cc5cf6581b)
vtnet: remove M_HASHTYPE when there is only one pair of rx/tx queue
Summary:
Doing so will let the upper layer know how to deal with software hash,
with benefits like inp_flowid can be set and m_pkthdr.flowid can be set
in output path.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D54929
(cherry picked from commit 20285cad7a55ecd0020f51f3daee74db8b1ea5a0)
science/py-galore: New port: Broadening and weighting for simulated spectra
Dependency of science/py-pymatgen.
Approved by: no need for approval according to bapt@
science/py-jarvis-tools: New port: Joint Automated Repository for Various Integrated Simulations
Dependency of science/py-pymatgen.
Approved by: no need for approval according to bapt@
devel/py-f90nml: New port: Fortran 90 namelist parser
Dependency of math/py-yt and science/py-pymatgen.
Approved by: no need for approval according to bapt@
[libc] Fix WIFSIGNALED and WIFSTOPPED for stopped and continued children (#235759)
WIFSIGNALED treated any non-zero termination signal as a signal, so it
was also true for a stopped child, whose low byte is 0x7f, and for a
continued one (0xffff). WIFSTOPPED masked with 0x7f instead of 0xff, so
it was also true for a continued child.
Make each macro true for exactly one kind of status, as glibc and musl
do, and add tests for exited, signalled, stopped and continued statuses.
AI disclosure: this patch was written with Claude Code. I reviewed the
change and ran the new test; it fails without the fix and passes with
it.
Assisted-by: Claude
[NVPTX] Add patterns for mixed-precision mul (#232614)
This change adds support for mixed precision multiplication of `f32x2`
with a downconverted `f16x2` or `bf16x2` result, where the following
downconverting pattern:
```
%prod = llvm.nvvm.fmul{.ftz}.v2f32(%a, %b, rz)
%lo = extractelement <2 x float> %prod, i32 0
%hi = extractelement <2 x float> %prod, i32 1
%res = llvm.nvvm.ff2{f16x2/bf16x2}.rz(%hi, %lo, false)
```
is lowered to `mul{.ftz}.rz.{f16x2/bf16x2}.f32x2.f32x2`. These
instructions combine the conversion and the multiplication into one
instruction from `sm_107f` onwards.
The downconverting pattern is folded only when the `f32x2` result is
used solely by the conversion, avoiding generating an unnecessary
additional `mul` instruction.
[4 lines not shown]
[libc] Add TCP socket options to <netinet/tcp.h> (#236121)
This patch adds SOL_TCP and the TCP level socket option macros
(TCP_MAXSEG, TCP_CORK, TCP_KEEPIDLE, etc.), as well as the constants
used as values for TCP_REPAIR and TCP_REPAIR_QUEUE.
The values are Linux-specific, so I've moved them (along with the
existing TCP_NODELAY definition) out of the yaml file into a new
llvm-libc-macros header with an OS-specific subheader.
I've left out the options which need a struct to be useful (TCP_INFO,
TCP_MD5SIG, TCP_REPAIR_WINDOW, TCP_ZEROCOPY_RECEIVE, TCP_AO_*, etc.).
I'm leaving those for separate patch(es).
glibc and linux define the TCP_*_QUEUE constants as an enum. I've made
them macros instead, since they live in a macro header. This means our
header will not play nicely with <linux/tcp.h>, but that's true of
glibc's header as well.
[2 lines not shown]
tcp: Unifidef use of rss software hash in syncache
Ever since "d9c55b2e8cd6 rss: Enable portions of RSS globally.."
exposed the RSS software hashing functions, it has been possible
to use them without "ifdef RSS". Do so now in the syncache
so as to get flowids recorded.
Note that the use of the rss hash functions is conditional on IP versions,
so we must ifdef INET to ensure rss_proto_software_hash_v4() is available.
Fixes 73fe85e486d2
Sponsored by: Netflix
Reviewed by: glebius, p.mousavizadeh_protonmail.com, nickbanks_netflix.com, tuexen
Differential Revision: https://reviews.freebsd.org/D54534
(cherry picked from commit 21865c970888ad0e2cde06db843ae2a05af550e7)