devel/qbe: upgrade to version 1.3
This updated version generates significantly faster code and improved
support for the generation of position-independent code.
[libc] Move INET_ADDRSTRLEN and INET6_ADDRSTRLEN to a common header (#201083)
INET_ADDRSTRLEN and INET6_ADDRSTRLEN are needed by both <netinet/in.h>
and <arpa/inet.h>. Previously we had them defined directly inside
netinet-in-macros.h, which meant arpa/inet.h did not have access to
them.
I've moved them to a new inet-address-macros.h header and configured
both YAML header targets to depend on it so they get included in both
generated headers.
I'm also updating the docgen YAML file for arpa/inet.h to document these
macros.
Note that other libc implementations simply have arpa/inet.h include
netinet/in.h (which is permitted by POSIX). This implementation takes a
stricter stance and only exposes the symbols which are specified by
POSIX.
Assisted by Gemini.
[SLP] Schedule copyable operands modeled on non-scheduled parent nodes
A node that does not need scheduling (all values used outside the block)
has no schedule bundle, yet it can still model one of its operands as a
copyable element, registering the ScheduleCopyableData on that parent
edge. If the instruction carrying that dependency is scheduled through a
different (duplicate) bundle, the copyable dependency on the non-scheduled
edge was never decremented.
When scheduling a bundle member, also process the instruction's tree
entries that have no registered bundle via pseudo-bundles, so their
copyable operand dependencies are decremented. Real operand dependencies
are guarded against double counting by the per-operand use counter.
Fixes #200831.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/201182
NAS-135885 / 27.0.0-BETA.1 / Don't pass order_by along to `datastore.query` from crud query methods (#19033)
We are doing unnecessary work by applying "order_by" in both
`datastore.query` and `CRUDService.query`. `POST_EXTEND_OPTS` now
represents the full set of options that `filter_list` consumes.
This fixes the bug where specifying fields in "order_by" that are
extended from the DB table raises a `KeyError` (see ticket).
[AMDGPU][docs][NFC] Update gfx12 documentation (#200976)
Following what we did with the GFX950 documentation, this patch replaces
the multitude of rst files for GFX12 operands with a single file. Some
problems are fixed as well, e.g., different opcodes in the same encoding
(e.g., VDS) may have different modifiers.
[NVPTX] PerformSELECTShiftCombine drops high bits of a wide guarded shift amount (#201165)
LLVM shifts produce poison if you shift greater than the width of the
operand. But PTX shifts clamp the shift amount:
> shl/shr: Shift amounts greater than the register width N are clamped
> to N.
NVPTXISelLowering looks for shl/shr which guard against an out-of-range
shift and lower these to an unguarded PTX shift:
define i64 @f(i64 %x, i64 %shift) {
%cmp = icmp ult i64 %shift, 64
%shl = shl i64 %x, %shift
%sel = select i1 %cmp, i64 %shl, i64 0
ret i64 %sel
}
In PTX shifts the shift amount is always i32, whereas in LLVM the shift
[2 lines not shown]
NAS-141232 / 27.0.0-BETA.1 / Fix mail.send NotRequired filter (#19052)
The filter introduced in NAS-141218/PR #19045 used v != NotRequired,
which falls back to identity comparison since _NotRequired defines no
__eq__. Pydantic's serializer can hand back a fresh _NotRequired
instance rather than the singleton, so the filter let those values
through and timedelta(seconds=interval) crashed with:
TypeError: unsupported type for timedelta seconds component: _NotRequired
Switch to isinstance(v, _NotRequired), matching the pattern already
used in api/base/handler/version.py.
unit/zap: test that cursors correctly release all dnode holds
Cursors defer taking holds until they're needed, so if a cursor is
created but not used, it may still hold resources that it would have
cleaned up along the way, but never got chance to.
(this really happened in the first version of
zap_cursor_init_by_dnode(), so not a contrived case!)
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18603
unit/zap: basic cursor tests
These add a bunch of entries to the ZAP, and then ensure that a cursor
walk over the ZAP sees them all once and once only, and no others.
The serialization test takes it a bit further, by serializing and
recreating the cursor half way through and confirming it correctly picks
up from the same spot, and then recreating the cursor from serialized
again and confirming that it also see only the second set of entries.
This ensures that the serialized cursor state is fully self contained
and not reliant on anything left over in the ZAP itself at serialization
time.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18603
unit/zap: check mock dnode refcount before destruction
It should be back at 1, where it started.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18603
unit/mock_dmu: track dnode refcount changes
The thing under test will be taking and releasing dnode refs/holds. By
counting them and exposing the current count, we can assert in test
cleanup that we haven't missed releasing any, especially in cases where
the hold is held across multiple test steps.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18603
zap: add zap_cursor_init_by_dnode() & rework cursor resource lifetime
This commit adds zap_cursor_init_by_dnode() (and
zap_cursor_init_serialized_by_dnode()), which allow the target ZAP to
provided via an existing dnode rather than the traditional objset+object
pair.
This requires some reorganisation of the way that zap_cursor_t is
initialised. Up until now, zap_cursor_init() has merely stored the
objset, object, serialized form and prefetch flag, and left it until
zap_cursor_retrieve() to actually call zap_lock(). This makes a
_by_dnode() form complicated, because it is a held resource that needs
to be released, but might not be used if zap_cursor_retrieve() is not
called. So there's a bunch of state tracking required.
However, all cursor users immediately follow zap_cursor_init() with
zap_cursor_retrieve(), so there's nothing gained by delaying holds. This
allows us to simplify things, by calling zap_lock() directly in
zap_cursor_init() and retaining it until zap_cursor_fini().
[22 lines not shown]
dsl_scan: close errorscrub cursor on pause
If the cursor were ever to actively hold resources, not finalising it
would mean leaking those resources whenever the scrub is paused.
The cursor is already reinitialized from the stored serialized form
if/when it is resumed, so there's nothing we need from the old one, just
to release it.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18603
Interfaces: Assignments - work in progress for https://github.com/opnsense/core/issues/9945
In order to migrate the interface assignments, we need to think of a way to use the differently named xml nodes for interfaces (wan, lan, ..) into something that closely resembles a standard model implementation.
Since we can't match these nodes in our statically defined model xmls, the main idea is to flush all via an in-memory model with a separate load [construct] and save hook [serializeToConfig].
The next challenge is to "stash" updates and wait for "apply" in certain cases, for this we add some temporary attributes to the configuration which are synced after the actual system change has happend (pending_action, pending_if). When succesfully applied, the apply function cleans up the final stage of the configuration to make everything consistent again.