ixgbe: check negotiated API for VF queue query
The GET_QUEUES handler switches on msg[0], which contains the mailbox
command rather than the negotiated API version. It therefore cannot
reject API 1.0 or an unnegotiated VF as intended.
Switch on the API version stored for the VF.
MFC after: 1 week
ixgbe: reject VF requests before CTS
A VF that sends a non-reset request before completing reset negotiation
has not received CTS. The PF ignores the request but currently reports
success, leaving the VF with a false view of the programmed state.
Return failure for the ignored request. This restores the behavior lost
when the mailbox helpers were renamed.
Fixes: 36c516b31136 ("ixgbe: update if_sriov to use the new mailbox apis")
MFC after: 1 week
ixgbe: avoid signed overflow in pause time calculation
pause_time is promoted to signed int before multiplication. Its default
value of 65535 multiplied by 65537 exceeds INT_MAX and triggers UBSAN,
even though the result is assigned to a u32.
Make the multiplier unsigned so the calculation has the intended u32
semantics. Linux commit 3b70683fc4d6 reported the failure in the generic
path and used the same mechanical correction. The 82598-specific flow
control operation contains the identical expression, so correct it as well.
MFC after: 1 week
[libc++abi] Add a clang-tidy config and test (#207324)
This essentially copies the `.clang-tidy` file from libc++ into
libc++abi, except that the naming conventions are updated to not add
underscores and some checks are disabled that don't pass currently. They
will be fixed in follow-ups.
[libc++] Make __has_array_cookie a variable template (#212767)
Using variable templates is slightly faster to compile and more
readable, so we might as well use them.
ixgbe: fix unaligned access in ixgbe_update_flash_X550()
ixgbe_host_interface_command() treats its buffer as a u32 array. The
local union contained only byte-sized fields, giving it one-byte stack
alignment and allowing unaligned accesses on strict-align systems.
Add a u32 member to the union to provide the required alignment and
pass that member to ixgbe_host_interface_command().
No functional change is expected on x86.
Obtained from: Intel ix 3.4.39
MFC after: 1 week
ixgbe: retry incoherent SFP identifier reads
FreeBSD's I2C helper already retries failed transactions. Limit this
new outer loop to successful reads with an invalid identifier so that
retry budget is not multiplied.
DPDK commit message
net/ixgbe: retry misbehaving SFP read
Some XGS-PON SFPs ACK I2C reads and return uninitialized data while
their microcontroller boots. A bogus identifier can cause an otherwise
working module to be marked unsupported.
Retry the identifier read several times, checking for both successful
I2C completion and a valid SFP identifier.
Signed-off-by: Stephen Douthit <stephend at silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd at silicom-usa.com>
[4 lines not shown]
java/openjdk21: Update to version 21.0.12
Includes the following FreeBSD specific fixes:
- Set wxneeded flag on executables on FreeBSD.
- Fix build with clang 22.
Sponsored by: The FreeBSD Foundation
AMDGPU: Do not give gfx12.5 bvh-ray-tracing-insts
bvh-ray-tracing-insts was listed in the FeatureGFX12 generation, so
gfx1250/gfx1251/gfx12-5-generic inherited it even though they have no BVH.
Move the feature out of the common base and into FeatureISAVersion12, which
This stops clang from wrongly accepting __builtin_amdgcn_image_bvh_intersect_ray*
on gfx1250.
Co-authored-by: Claude (Claude-Opus-4.8)
ixgbe: check EEPROM read in 82599 D3 path
DPDK commit message
net/ixgbe/base: fix unchecked return value
Check the return value from ixgbe_read_eeprom() before using the
control word to configure link disable during D3.
Fixes: b7ad3713b958 ("ixgbe/base: allow to disable link on D3")
Cc: stable at dpdk.org
Signed-off-by: Barbara Skobiej <barbara.skobiej at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Obtained from: DPDK (eb3684b191)
MFC after: 1 week
[ORC] Add VoidVoid and IntVoid Callers, with tests. (#213211)
Add rt::VoidVoidCaller (void()) and rt::IntVoidCaller (int64_t())
runtime-agnostic interfaces and their rt::sps implementations, targeting
the orc_rt_ci_sps_call_void_void and orc_rt_ci_sps_call_int_void
controller-interface wrappers. Both are experimental and may be removed.
Extend SPSCallersTest to cover the new callers. VoidVoidCaller is the
first caller instantiated with a void result type, which exposed a
latent bug in sps::Caller::callAsync: its result handler declared a
CalleeRetT parameter, ill-formed when CalleeRetT is void. It now
special-cases void via `if constexpr`.
ixgbe: avoid flow control counter overflow
DPDK commit message
net/ixgbe: fix flow control frame byte adjustment
LXONTXC and LXOFFTXC are 32-bit counters for transmitted XON and XOFF
packets. Their deltas are summed and used to adjust the transmitted
packet and byte counters.
Perform the addition in 64 bits so it cannot wrap before the result is
used for the byte adjustment.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org
Signed-off-by: Daniil Iskhakov <dish at amicon.ru>
[4 lines not shown]
ixgbe: copy ACI buffer before command retry
DPDK commit message
net/ixgbe/base: add missing buffer copy for ACI
Add the missing buffer copy in ixgbe_aci_send_cmd().
The retry path saves the original descriptor and allocates storage for
the command buffer so both can be restored before another attempt. It
did not copy the original command buffer into that storage.
Fixes: 25b48e569f2f
Cc: stable at dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin at intel.com>
Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
[2 lines not shown]
ixv: fix multicast address enumeration
if_foreach_llmaddr() adds each callback return value to its running
count. Returning the incremented count made the address indices grow
as 0, 1, 3, 7, and so on, eventually writing beyond the multicast
address array.
Return one address per callback and stop copying when the array is
full, matching the ixv-1.6.12 driver.
Fixes: ff06a8dbb677 ("Mechanically convert ixgbe(4) to IfAPI")
MFC after: 1 week
[VPlan] Remove redundant x && (y && x) -> x && y combine (#213219)
It can be subsumed by making the combine above commutative. In theory
this isn't NFC as it changes the order, in practice it doesn't make a
difference.
ixgbe: fail fast on VF-held PF mailboxes
The active PF mailbox operations use the legacy helpers. The mailbox API
import changed check_for_msg into a read-only probe and added up to 2,000
500-microsecond lock retries. If a VF leaves VFU set, the PF cannot acquire
the lock, busy-waits for up to one second, and leaves VFREQ pending so the
delay can repeat.
Give the legacy checker its old consume-on-check behavior so a failed read
does not leave VFREQ asserted. If VFU is already set, fail immediately
instead of retrying, while preserving retries for PF-side contention. Do
not force RVFU, which would discard peer transaction state.
MFC after: 1 week
[TableGen] Speed up intrinsic lookups with DenseMap (NFC) (#213198)
Store in DenseMap, avoids linear lookups.
Speeds up NVPTX -gen-dag-isel and -gen-instr-info by 10%.
RISCV shows similar gains.
Neutral or marginally beneficial for other targets.
AMDGPU: Add missing msad-insts to gfx13 frontend feature map
fillAMDGCNFeatureMap omitted msad-insts for gfx1310/gfx13-generic, so
clang wrongly rejected __builtin_amdgcn_msad_u8 on those targets even
though the backend enables the feature (FeatureGFX9 generation, inherited
through FeatureGFX13). Add it to the gfx13 case.
Co-authored-by: Claude (Claude-Opus-4.8)
ixgbe: respect peer mailbox ownership
A VF currently treats an existing VFU bit as a successful acquisition,
while the PF checks its own PFU bit before claiming the mailbox. Check
both the local and peer ownership bits before setting local ownership.
This prevents same-side callers from sharing the mailbox and avoids an
acquisition attempt while the peer owns it.
VFLR does not clear VFMAILBOX.VFU. Clear stale VF ownership and cached
mailbox status after the reset indication settles and before sending the
reset request, so the ownership check cannot strand a reinitialized VF.
Adapt only the live ownership checks from Intel ix 3.4.39. Do not import
its upgraded-mailbox changes, which are not active in FreeBSD.
Obtained from: Intel ix 3.4.39
MFC after: 1 week
[MachineLICM] Use `RegisterClassInfo::getRegPressureSetLimit` (#211715)
This recommits #119826, which taught `MachineLICM` to use
`RegisterClassInfo` when computing register pressure limits so
reserved registers are accounted for (#118787).
The original change was reverted by eeac0ff because it increased
compile time by causing repeated `RegisterClassInfo` computations.
This PR is based on #210826, in which `MachineRegisterClassInfo`
analysis pass was added. `MachineRegisterClassInfo` is required
by `MachineLICM` now, but the intervening machine passes that do
not affect `RegisterClassInfo` now preserve it, so the analysis
is reused instead of recomputed.
Assisted-by: TRAE CLI (GPT-5.5)
[Mips] Fix $gp was restored when used as global register variable (#201778)
The function `eliminateDeadMI` would check `if (MRI.isReserved(Reg))`,
now we only set GP to reserved when `!Subtarget.isABICalls()`. So
`eliminateDeadMI` delete the `move $gp, $4`. And we would restore $gp
after instr selection through `$gp_64 = LD $sp_64, 8`.
Check the module metadata `llvm.named.register.$28` to detect if $28 is
used as global register. Then append new conditon when set $gp to
reserverd status and return CalleeSavedRegs without $gp.
Fix #176546.