-
Notifications
You must be signed in to change notification settings - Fork 710
generate-accessors: add lifecycle, defaults, and annotation redesign #3283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,8 +24,7 @@ LIBNVMF_3 { | |
| libnvmf_ctrl_get_fabrics_config; | ||
| libnvmf_disconnect_ctrl; | ||
| libnvmf_discovery; | ||
| libnvmf_discovery_args_create; | ||
| libnvmf_discovery_args_free; | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like an unnecessary empty line
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok |
||
| libnvmf_discovery_config_file; | ||
| libnvmf_discovery_config_json; | ||
| libnvmf_discovery_nbft; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| /* | ||
| * NVMe-oF private struct definitions. | ||
| * | ||
| * This file is part of libnvme. | ||
| * Copyright (c) 2026, Dell Technologies Inc. or its subsidiaries. | ||
| * | ||
| * Authors: Martin Belanger <[email protected]> | ||
| * | ||
| * Structs in this file are NVMe-oF-specific (fabrics layer). They are kept | ||
| * separate from private.h so that PCIe-only builds can exclude this entire | ||
| * file and its generated accessors (accessors-fabrics.{h,c}) along with the | ||
| * rest of the fabrics layer. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <nvme/fabrics.h> | ||
|
|
@@ -69,18 +77,9 @@ struct libnvmf_context { | |
| }; | ||
|
|
||
|
|
||
| /** | ||
| * NVMe-oF private struct definitions. | ||
| * | ||
| * Structs in this file are NVMe-oF-specific (fabrics layer). They are kept | ||
| * separate from private.h so that PCIe-only builds can exclude this entire | ||
| * file and its generated accessors (accessors-fabrics.{h,c}) along with the | ||
| * rest of the fabrics layer. | ||
| */ | ||
|
|
||
| struct libnvmf_discovery_args { /*!generate-accessors*/ | ||
| int max_retries; | ||
| __u8 lsp; | ||
| struct libnvmf_discovery_args { //!generate-accessors !generate-lifecycle | ||
| int max_retries; //!default:6 | ||
| __u8 lsp; //!default:NVMF_LOG_DISC_LSP_NONE | ||
| }; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,7 +167,7 @@ struct libnvme_transport_handle { | |
| struct libnvme_log *log; | ||
| }; | ||
|
|
||
| struct libnvme_path { /*!generate-accessors*/ | ||
| struct libnvme_path { //!generate-accessors | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move these changes into a separate patch? Thanks! And while at it an extra space wouldn't hurt
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. will do. |
||
| struct list_node entry; | ||
| struct list_node nentry; | ||
|
|
||
|
|
@@ -189,7 +189,7 @@ struct libnvme_ns_head { | |
| char *sysfs_dir; | ||
| }; | ||
|
|
||
| struct libnvme_ns { /*!generate-accessors*/ | ||
| struct libnvme_ns { //!generate-accessors | ||
| struct list_node entry; | ||
|
|
||
| struct libnvme_subsystem *s; | ||
|
|
@@ -215,7 +215,7 @@ struct libnvme_ns { /*!generate-accessors*/ | |
| enum nvme_csi csi; | ||
| }; | ||
|
|
||
| struct libnvme_ctrl { /*!generate-accessors*/ | ||
| struct libnvme_ctrl { //!generate-accessors | ||
| struct list_node entry; | ||
| struct list_head paths; | ||
| struct list_head namespaces; | ||
|
|
@@ -255,38 +255,38 @@ struct libnvme_ctrl { /*!generate-accessors*/ | |
| struct libnvme_fabrics_config cfg; | ||
| }; | ||
|
|
||
| struct libnvme_subsystem { /*!generate-accessors*/ | ||
| struct libnvme_subsystem { //!generate-accessors | ||
| struct list_node entry; | ||
| struct list_head ctrls; | ||
| struct list_head namespaces; | ||
| struct libnvme_host *h; | ||
|
|
||
| char *name; /*!accessors:readonly*/ | ||
| char *sysfs_dir; /*!accessors:readonly*/ | ||
| char *subsysnqn; /*!accessors:readonly*/ | ||
| char *model; /*!accessors:readonly*/ | ||
| char *serial; /*!accessors:readonly*/ | ||
| char *firmware; /*!accessors:readonly*/ | ||
| char *subsystype; /*!accessors:readonly*/ | ||
| char *name; //!accessors:readonly | ||
| char *sysfs_dir; //!accessors:readonly | ||
| char *subsysnqn; //!accessors:readonly | ||
| char *model; //!accessors:readonly | ||
| char *serial; //!accessors:readonly | ||
| char *firmware; //!accessors:readonly | ||
| char *subsystype; //!accessors:readonly | ||
| char *application; | ||
| char *iopolicy; | ||
| }; | ||
|
|
||
| struct libnvme_host { /*!generate-accessors*/ | ||
| struct libnvme_host { //!generate-accessors | ||
| struct list_node entry; | ||
| struct list_head subsystems; | ||
| struct libnvme_global_ctx *ctx; | ||
|
|
||
| char *hostnqn; /*!accessors:readonly*/ | ||
| char *hostid; /*!accessors:readonly*/ | ||
| char *hostnqn; //!accessors:readonly | ||
| char *hostid; //!accessors:readonly | ||
| char *dhchap_host_key; | ||
| char *hostsymname; | ||
| bool pdc_enabled; //!accessors:none | ||
| bool pdc_enabled_valid; /* set if pdc_enabled doesn't have an undefined | ||
| * value */ | ||
| }; | ||
|
|
||
| struct libnvme_fabric_options { /*!generate-accessors*/ | ||
| struct libnvme_fabric_options { //!generate-accessors | ||
| bool cntlid; | ||
| bool concat; | ||
| bool ctrl_loss_tmo; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we look into making this consistent through out the code base? Having two types of wording is not good IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per your text message. I will have a separate patch to change all
_createto_new.