Skip to content

[pull] master from linux-nvme:master#204

Merged
pull[bot] merged 2 commits into
zengqingfu1442:masterfrom
linux-nvme:master
Apr 30, 2026
Merged

[pull] master from linux-nvme:master#204
pull[bot] merged 2 commits into
zengqingfu1442:masterfrom
linux-nvme:master

Conversation

@pull

@pull pull Bot commented Apr 30, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Martin Belanger added 2 commits April 30, 2026 18:37
Extend generate-accessors.py to emit three new SWIG fragment files from
the existing !generate-accessors annotations in private.h and
private-fabrics.h:

  accessors.i          — kernel-object structs (Ctrl, Host, Subsystem,
                         Namespace, GlobalCtx)
  accessors-fabrics.i  — fabrics-specific structs
  nvme-manual-bridges.i — residual hand-written %rename bridges

A new struct-level annotation !generate-python[:alias=NAME] gates
emission for Python and carries the PascalCase class alias. Remove the
hand-written %rename(ctrl) / %rename(host) / ... lines from nvme.i;
they are now generator-emitted.

Restructure nvme.i so all %typemap directives precede the generated
%include "accessors.i". SWIG freezes type-to-typemap associations when
it first processes a struct body; struct bodies now arrive via the
generated include so typemaps must come first.

A generator-emitted _nvme_guarded_setattr is installed on each class at
import to catch typos and writes to read-only (%immutable) properties.
C-internal iteration helpers are renamed with a leading underscore via
%rename to keep them out of the public API surface.

Update nvme.i docstrings to Pythonic style (Args:/Returns: conventions,
PascalCase class names, module-level usage examples). Update tests and
examples to use the new API.

Verified: meson test -C .build passes (64 OK, 2 expected failures).

Signed-off-by: Martin Belanger <Martin.Belanger@dell.com>
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Convert connected() and is_registration_supported() to read-only
  Python properties (connected, registration_supported)
- Delete set_symname(); host.hostsymname is already writable via the
  generated SWIG field descriptor
- Rename registration_ctrl() to registration_control() to reflect that
  the method is a multi-action control interface (register, deregister,
  update via NVMF_DIM_TAS_*), not a single register operation
- Update test-objects.py to match the new API

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Assisted-by: Claude Sonnet <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Apr 30, 2026
@pull pull Bot added the ⤵️ pull label Apr 30, 2026
@pull pull Bot merged commit ccd5d5a into zengqingfu1442:master Apr 30, 2026
27 of 28 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants