* [PATCH V2 0/3] nvemt: demote high frequency err msg to debug
@ 2021-05-10 19:15 Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-10 19:15 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, sagi, Chaitanya Kulkarni
Hi,
Based on the earlier report for the unhandaled error messages for
command parsing, this is a small patch-series demotes the error messages
for various parse functions from pr_err() to pr_debug().
-ck
* Changes from V1 :-
1. Rebase on the top of :-
commit 2869ad623d7df02dbc280744b879ca6e23ad1fe4 (origin/nvme-5.13)
nvme-multipath: fix double initialization of ANA state
Chaitanya Kulkarni (3):
nvmet: demote discovery cmd parse err msg to debug
nvmet: use helper to remove the duplicate code
nvmet: demote fabrics cmd parse err msg to debug
drivers/nvme/target/admin-cmd.c | 7 ++-----
drivers/nvme/target/discovery.c | 2 +-
drivers/nvme/target/fabrics-cmd.c | 6 +++---
3 files changed, 6 insertions(+), 9 deletions(-)
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH V2 1/3] nvmet: demote discovery cmd parse err msg to debug
2021-05-10 19:15 [PATCH V2 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
@ 2021-05-10 19:15 ` Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 2/3] nvmet: use helper to remove the duplicate code Chaitanya Kulkarni
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-10 19:15 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, sagi, Chaitanya Kulkarni
Host can send invalid commands and flood the target with error messages
for the discovery controller. Demote the error message from pr_err() to
pr_debug( in nvmet_parse_discovery_cmd().
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
drivers/nvme/target/discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index 4845d12e374a..fc3645fc2c24 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -379,7 +379,7 @@ u16 nvmet_parse_discovery_cmd(struct nvmet_req *req)
req->execute = nvmet_execute_disc_identify;
return 0;
default:
- pr_err("unhandled cmd %d\n", cmd->common.opcode);
+ pr_debug("unhandled cmd %d\n", cmd->common.opcode);
req->error_loc = offsetof(struct nvme_common_command, opcode);
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
}
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V2 2/3] nvmet: use helper to remove the duplicate code
2021-05-10 19:15 [PATCH V2 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
@ 2021-05-10 19:15 ` Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 3/3] nvmet: demote fabrics cmd parse err msg to debug Chaitanya Kulkarni
2021-05-11 16:34 ` [PATCH V2 0/3] nvemt: demote high frequency " Christoph Hellwig
3 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-10 19:15 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, sagi, Chaitanya Kulkarni
Use the helper nvmet_report_invalid_opcode() to report invalid opcode
so we can remove the duplicate code.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
drivers/nvme/target/admin-cmd.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index e7a367cf6d36..dcd49a72f2f3 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -975,10 +975,7 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
case nvme_admin_keep_alive:
req->execute = nvmet_execute_keep_alive;
return 0;
+ default:
+ return nvmet_report_invalid_opcode(req);
}
-
- pr_debug("unhandled cmd %d on qid %d\n", cmd->common.opcode,
- req->sq->qid);
- req->error_loc = offsetof(struct nvme_common_command, opcode);
- return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
}
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V2 3/3] nvmet: demote fabrics cmd parse err msg to debug
2021-05-10 19:15 [PATCH V2 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 2/3] nvmet: use helper to remove the duplicate code Chaitanya Kulkarni
@ 2021-05-10 19:15 ` Chaitanya Kulkarni
2021-05-11 16:34 ` [PATCH V2 0/3] nvemt: demote high frequency " Christoph Hellwig
3 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-10 19:15 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, sagi, Chaitanya Kulkarni
Host can send invalid commands and flood the target with error messages.
Demote the error message from pr_err() to pr_debug() in
nvmet_parse_fabrics_cmd() and nvmet_parse_connect_cmd().
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
drivers/nvme/target/fabrics-cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 1420a8e3e0b1..7d0f3523fdab 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -94,7 +94,7 @@ u16 nvmet_parse_fabrics_cmd(struct nvmet_req *req)
req->execute = nvmet_execute_prop_get;
break;
default:
- pr_err("received unknown capsule type 0x%x\n",
+ pr_debug("received unknown capsule type 0x%x\n",
cmd->fabrics.fctype);
req->error_loc = offsetof(struct nvmf_common_command, fctype);
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
@@ -284,13 +284,13 @@ u16 nvmet_parse_connect_cmd(struct nvmet_req *req)
struct nvme_command *cmd = req->cmd;
if (!nvme_is_fabrics(cmd)) {
- pr_err("invalid command 0x%x on unconnected queue.\n",
+ pr_debug("invalid command 0x%x on unconnected queue.\n",
cmd->fabrics.opcode);
req->error_loc = offsetof(struct nvme_common_command, opcode);
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
}
if (cmd->fabrics.fctype != nvme_fabrics_type_connect) {
- pr_err("invalid capsule type 0x%x on unconnected queue.\n",
+ pr_debug("invalid capsule type 0x%x on unconnected queue.\n",
cmd->fabrics.fctype);
req->error_loc = offsetof(struct nvmf_common_command, fctype);
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V2 0/3] nvemt: demote high frequency err msg to debug
2021-05-10 19:15 [PATCH V2 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
` (2 preceding siblings ...)
2021-05-10 19:15 ` [PATCH V2 3/3] nvmet: demote fabrics cmd parse err msg to debug Chaitanya Kulkarni
@ 2021-05-11 16:34 ` Christoph Hellwig
2021-05-11 21:32 ` Chaitanya Kulkarni
3 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2021-05-11 16:34 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: linux-nvme, hch, sagi
Thanks,
applied to nvme-5.13.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2 0/3] nvemt: demote high frequency err msg to debug
2021-05-11 16:34 ` [PATCH V2 0/3] nvemt: demote high frequency " Christoph Hellwig
@ 2021-05-11 21:32 ` Chaitanya Kulkarni
0 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-11 21:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme, sagi
On 5/11/21 09:34, Christoph Hellwig wrote:
> Thanks,
>
> applied to nvme-5.13.
>
Latest pull for the nvme-5.13 missing this one, perhaps something
is wrong with my pull ?
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-11 21:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 19:15 [PATCH V2 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 2/3] nvmet: use helper to remove the duplicate code Chaitanya Kulkarni
2021-05-10 19:15 ` [PATCH V2 3/3] nvmet: demote fabrics cmd parse err msg to debug Chaitanya Kulkarni
2021-05-11 16:34 ` [PATCH V2 0/3] nvemt: demote high frequency " Christoph Hellwig
2021-05-11 21:32 ` Chaitanya Kulkarni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.