plugin/ocp_get_feature_fid_c5h:Added the OCP Get Feature FID=C5h comm…#2768
Conversation
|
Maybe missing something here, could someone help me understand why we need NSID for this feature? For get feature, from OCP 2.5 Spec (similar in 2.6): For set feature, from OCP 2.5 Spec (similar in 2.6): The host should either clear this to zero or set this to |
|
Documentation/nvme-ocp-get-latency-monitor.html not necessary added since generated from Documentation/nvme-ocp-get-latency-monitor.txt. |
|
By the way will the set feature command be added separately? |
|
GETF-4 is General Get/Set Feature Requirement, and the keyword is "may": because some features can be NSID specific: LMSF-6 is specific to C5h, so correct, setting valid NSID would be useful only for testing, i.e. get error: This will help for FW validation but not to execute get/set feature from host software perspective. Being a host software, I think it is better to follow LMSF-6: But if the scope here is also to help FW validation, then yes, allowing NSID as command line option is right thing to do. |
ikegami-t
left a comment
There was a problem hiding this comment.
For this feature command is it not really needed to add the no-uuid option?
| static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd, | ||
| struct plugin *plugin) | ||
| { | ||
|
|
There was a problem hiding this comment.
No needed to add this blank line.
| if (err) | ||
| return err; | ||
|
|
||
|
|
There was a problem hiding this comment.
No needed to add 2 blank lines but only 1 blank line okay to added.
There was a problem hiding this comment.
@ikegami-t - incorporated the review comments
| OPTIONS | ||
| ------- | ||
|
|
||
| -n <nsid>:: |
There was a problem hiding this comment.
The --nsid not described and also no description for the options -n and --nsid.
There was a problem hiding this comment.
@ikegami-t incorporated the review comments
plugins/ocp/ocp-nvme.c
Outdated
| }; | ||
|
|
||
| OPT_ARGS(opts) = { | ||
| OPT_BYTE("sel", 'S', &cfg.sel, sel), |
There was a problem hiding this comment.
Is there any reason for the short option S but it is not s?
There was a problem hiding this comment.
@ikegami-t - Kept the capital S as per pervious implementation
There was a problem hiding this comment.
Understood. In my opition basically -s should be used at first but if for any other option already used -s then the short option -S should be used instead. But for the OCP commands already mixed to be used both -s and -S for the --sel option.
There was a problem hiding this comment.
Changed to small letter s
0ef6ec1 to
86a4144
Compare
plugins/ocp/ocp-nvme.h
Outdated
| ENTRY("set-enable-ieee1667-silo", "enable IEEE1667 silo", set_enable_ieee1667_silo) | ||
| ENTRY("hardware-component-log", "retrieve hardware component log", hwcomp_log) | ||
| ENTRY("get-latency-monitor", "Get Latency Monitor Feature" | ||
| , ocp_get_latency_monitor_feature) |
There was a problem hiding this comment.
- ENTRY("get-latency-monitor", "Get Latency Monitor Feature"
- , ocp_get_latency_monitor_feature)
+ ENTRY("get-latency-monitor", "Get Latency Monitor Feature",
+ ocp_get_latency_monitor_feature)There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
plugins/ocp/ocp-nvme.c
Outdated
| } | ||
|
|
||
| static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd, | ||
| struct plugin *plugin) |
There was a problem hiding this comment.
- static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd,
- struct plugin *plugin)
+ static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin)then indented as below.
static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd,
struct plugin *plugin)There was a problem hiding this comment.
@ikegami-t Incorporated the review comments
| --nsid=<nsid>:: | ||
| NSID: This field specifies Valid, Invalid and | ||
| Inactive NSID value: | ||
| -S <select>:: |
There was a problem hiding this comment.
Needed a blank line as below.
--nsid=<nsid>::
NSID: This field specifies Valid, Invalid and
Inactive NSID value:
+
-S <select>::
--sel=<select>::
Select (SEL): This field specifies which value of the attributes
to return in the provided data:There was a problem hiding this comment.
@ikegami-t Incorporated the review comments
b94ba9d to
ccd1d35
Compare
|
Looks good to me. Let's wait for @ikegami-t's review |
| SYNOPSIS | ||
| -------- | ||
| [verse] | ||
| 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>] [--nsid | -n] |
There was a problem hiding this comment.
- 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>] [--nsid | -n]
+ 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>] [--nsid=<nsid> | -n <nsid>]But as metioned by the comment #2768 (comment) looks the NSID parameter not necessary so can you delete the parameter?
Also as metioned by the comment #2768 (review) can you add the 'no-uuid' option as same with other OCP commands.
Also if the NSID paramter really needed could you please change the parameter name to namespace-id' from nsid` as same with other NVMe commands.
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
plugins/ocp/ocp-nvme.c
Outdated
| static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd, | ||
| struct plugin *plugin) | ||
| { | ||
| const char *desc = "Define Issue Get Feature command (FID : 0xC5) Latency Monitor"; |
There was a problem hiding this comment.
- const char *desc = "Define Issue Get Feature command (FID : 0xC5) Latency Monitor";
+ const char *desc = "Define Issue Get Feature command (FID: 0xC5) Latency Monitor";There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
plugins/ocp/ocp-nvme.c
Outdated
| { | ||
| const char *desc = "Define Issue Get Feature command (FID : 0xC5) Latency Monitor"; | ||
| const char *sel = "[0-3]: current/default/saved/supported/"; | ||
| const char *nsid = "Byte[04-07]:Namespace Identifier Valid/Invalid/Inactive"; |
There was a problem hiding this comment.
- const char *nsid = "Byte[04-07]:Namespace Identifier Valid/Invalid/Inactive";
+ const char *nsid = "Byte[04-07]: Namespace Identifier Valid/Invalid/Inactive";There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
| OPT_ARGS(opts) = { | ||
| OPT_BYTE("sel", 's', &cfg.sel, sel), | ||
| OPT_BYTE("nsid", 'n', &cfg.nsid, nsid), | ||
| OPT_FLAG("no-uuid", 'u', NULL, no_uuid), |
There was a problem hiding this comment.
Please update the documentation to add the `no-uuid' parameter.
Also the parameter is not used to check by the command actually so can you please use the option by the command as below for example?
static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd,
struct plugin *plugin)
{
...
err = eol_plp_failure_mode_get(dev, nsid, fid, cfg.sel,
!argconfig_parse_seen(opts, "no-uuid"));And also if the nsid value can be deleted then the no-uuid short option u looks better to change to n as same with other OCP commands.
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
| nvme_select_to_string(cfg.sel), result); | ||
|
|
||
| if (cfg.sel == NVME_GET_FEATURES_SEL_SUPPORTED) | ||
| nvme_show_select_result(0xC5, result); |
There was a problem hiding this comment.
- nvme_show_select_result(0xC5, result);
+ nvme_show_select_result(OCP_FID_LM, result);There was a problem hiding this comment.
@ikegami-t - We can't pass OCP_FID_LM for this nvme_show_select_result api. Because enum data type is different for that api parameter.
plugins/ocp/ocp-nvme.h
Outdated
| ENTRY("set-enable-ieee1667-silo", "enable IEEE1667 silo", set_enable_ieee1667_silo) | ||
| ENTRY("hardware-component-log", "retrieve hardware component log", hwcomp_log) | ||
| ENTRY("get-latency-monitor", "Get Latency Monitor Feature", | ||
| ocp_get_latency_monitor_feature) |
There was a problem hiding this comment.
ENTRY("get-latency-monitor", "Get Latency Monitor Feature",
- ocp_get_latency_monitor_feature)
+ ocp_get_latency_monitor_feature)There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
|
For the comment below mentioned by the comment #2768 (comment) is this command really required to support but it does not return useful information as described?
|
9e4eaeb to
66c1eaa
Compare
| SYNOPSIS | ||
| -------- | ||
| [verse] | ||
| 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>] [--namespace-id | -n] [--no-uuid | -u] |
There was a problem hiding this comment.
- 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>] [--namespace-id | -n] [--no-uuid | -u]
+ 'nvme ocp get-latency-monitor' <device> [--sel=<select> | -s <select>]
+ [--namespace-id <nsid> | -n <nsid>] [--no-uuid | -u]There was a problem hiding this comment.
@ikegami-t Incorporated the review comments
| DESCRIPTION | ||
| ----------- | ||
| Define get-latency-monitor. | ||
| No argument prints current mode. |
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
completions/_nvme
Outdated
| /dev/nvme':supply a device to use (required)' | ||
| --sel=':select from 0 - current, 1 - default, 2 - saved, 3 - supported' | ||
| -S':alias to --sel' | ||
| --nsid=':valid, invalid and inactive nsid' |
There was a problem hiding this comment.
- --nsid=':valid, invalid and inactive nsid'
+ --namespace-id=':valid, invalid and inactive nsid'Is this description valid, invalid and inactive nsid really proper explanation?
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
completions/_nvme
Outdated
| --sel=':select from 0 - current, 1 - default, 2 - saved, 3 - supported' | ||
| -S':alias to --sel' | ||
| --nsid=':valid, invalid and inactive nsid' | ||
| -n':alias to --nsid' |
There was a problem hiding this comment.
- -n':alias to --nsid'
+ -n':alias to --namespace-id'When change an implemetaion could you please fix all realted related implementaions since you change only the code part metioned but remain related code needed to change.
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
completions/bash-nvme-completion.sh
Outdated
| --output-format -o --timeout= -t" | ||
| ;; | ||
| "get-latency-monitor") | ||
| opts+=" --sel= -S \ |
There was a problem hiding this comment.
- opts+=" --sel= -S \
+ opts+=" --sel= -s \There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
completions/_nvme
Outdated
| _ocp_get_latency_monitor_feature=( | ||
| /dev/nvme':supply a device to use (required)' | ||
| --sel=':select from 0 - current, 1 - default, 2 - saved, 3 - supported' | ||
| -S':alias to --sel' |
There was a problem hiding this comment.
- -S':alias to --sel'
+ -s':alias to --sel'There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
|
|
||
| OPTIONS | ||
| ------- | ||
|
|
There was a problem hiding this comment.
Please delete this blank line.
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
completions/bash-nvme-completion.sh
Outdated
| ;; | ||
| "get-latency-monitor") | ||
| opts+=" --sel= -S \ | ||
| --nsid= -n" |
There was a problem hiding this comment.
- --nsid= -n"
+ --namespace-id= -n"There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
| "get-latency-monitor") | ||
| opts+=" --sel= -S \ | ||
| --nsid= -n" | ||
| ;; |
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
plugins/ocp/ocp-nvme.c
Outdated
| } | ||
|
|
||
| static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd, | ||
| struct plugin *plugin) |
There was a problem hiding this comment.
static int ocp_get_latency_monitor_feature(int argc, char **argv, struct command *cmd,
- struct plugin *plugin)
+ struct plugin *plugin)Seems repeated many times same comments for this part. Please add 5 tab spaces and only 3 white spaces before struct plugin *plugin.
There was a problem hiding this comment.
@ikegami-t - Incorporated the review comments
|
Could you please explain the reason to use the argument |
c9e0743 to
c4ffcc3
Compare
@ikegami-t - - Incorporated the review comments. Set feature FID=C5h command api already available(ocp_set_latency_monitor_feature). |
completions/bash-nvme-completion.sh
Outdated
| ;; | ||
| "get-latency-monitor") | ||
| opts+=" --sel= -s \ | ||
| --namespace-id= -n --no-uuid= -u" |
There was a problem hiding this comment.
- --namespace-id= -n --no-uuid= -u"
+ --namespace-id= -n --no-uuid -u"There was a problem hiding this comment.
@ikegami-t - Incorporated the review comment
plugins/ocp/ocp-nvme.c
Outdated
|
|
||
| OPT_ARGS(opts) = { | ||
| OPT_BYTE("sel", 's', &cfg.sel, sel), | ||
| OPT_BYTE("namespace-id", 'n', &cfg.nsid, nsid), |
There was a problem hiding this comment.
- OPT_BYTE("namespace-id", 'n', &cfg.nsid, nsid),
+ OPT_UINT("namespace-id", 'n', &cfg.nsid, nsid),There was a problem hiding this comment.
@ikegami-t - Incorporated the review comment
plugins/ocp/ocp-nvme.c
Outdated
| const char *desc = "Define Issue Get Feature command (FID: 0xC5) Latency Monitor"; | ||
| const char *sel = "[0-3]: current/default/saved/supported/"; | ||
| const char *nsid = "Byte[04-07]: Namespace Identifier Valid/Invalid/Inactive"; | ||
| struct nvme_dev *dev; |
There was a problem hiding this comment.
const char *nsid = "Byte[04-07]: Namespace Identifier Valid/Invalid/Inactive";
- struct nvme_dev *dev;
+
+ _cleanup_nvme_dev_ struct nvme_dev *dev = NULL;There was a problem hiding this comment.
@ikegami-t - Incorporated the review comment
|
Looks almost okay but still minor comments so please confirm the comments again. Also can you fix the commit message - Signed-off-by: Vigneshwaran Saravanan/Vigneshwaran Saravanan <s.vignesh@samsung.com>
+ Signed-off-by: Vigneshwaran Saravanan <s.vignesh@samsung.com> |
46d4c3b to
d162c23
Compare
@ikegami-t - I have updated the Signed-off-by: Vigneshwaran Saravanan s.vignesh@samsung.com using git commit --amend --signoff command. But I am facing below error. WARNING: From:/Signed-off-by: email name mismatch: 'From: "Vigneshwaran Saravanan/Vigneshwaran Saravanan" s.vignesh@samsung.com' != 'Signed-off-by: Vigneshwaran Saravanan s.vignesh@samsung.com' |
|
@VigneshwaranSaravana @igaw The changes look good. About the git commit error seems depended on the git config user.name setting but it is okay for me to remaing the current commit message |
d162c23 to
659a211
Compare
@igaw - Fixed the username issue also. Could you please check. |
Enabled the Get Feature command (FID=C5h) api with sel, namespace-id, no-uuid command line arguments. namespace-id added to the test the command with active, inactive and invalid nsid values. Reviewed-by: Karthik Balan <karthik.b82@samsung.com> Reviewed-by: Arunpandian J <arun.j@samsung.com> Signed-off-by: Vigneshwaran Saravanan <s.vignesh@samsung.com>
659a211 to
3808b9d
Compare
|
rebase and some commit message reformatting. |
|
Thanks! |


…and api
Enabled the Get Feature Command FID=C5h command api with nsid field Values
Reviewed-by: Karthik Balan karthik.b82@samsung.com
Reviewed-by: Arunpandian J arun.j@samsung.com