All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] nvemt: demote high frequency err msg to debug
@ 2021-04-30  1:06 Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-30  1:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, kbusch, 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().

This is on the top of earlier posted req->sg_cnt series :-

http://lists.infradead.org/pipermail/linux-nvme/2021-April/024762.html

-ck

Chaitanya Kulkarni (3):
  nvmet: demote discovery cmd parse err msg to debug
  nvmet: demote admin cmd parse err msg to debug
  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] 7+ messages in thread

* [PATCH 1/3] nvmet: demote discovery cmd parse err msg to debug
  2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
@ 2021-04-30  1:06 ` Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 2/3] nvmet: demote admin " Chaitanya Kulkarni
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-30  1:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, kbusch, 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] 7+ messages in thread

* [PATCH 2/3] nvmet: demote admin cmd parse err msg to debug
  2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
@ 2021-04-30  1:06 ` Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 3/3] nvmet: demote fabrics " Chaitanya Kulkarni
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-30  1:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, kbusch, Chaitanya Kulkarni

Host can send invalid admin commands and flood the target with error
messages. Demote the error message from pr_err() to pr_debug() in
nvmet_parse_admin_cmd() by calling nvmet_report_invlid_opcode(). 

This also removes 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 d2a26ff3f7b3..f907ec6bd1ab 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_err("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] 7+ messages in thread

* [PATCH 3/3] nvmet: demote fabrics cmd parse err msg to debug
  2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
  2021-04-30  1:06 ` [PATCH 2/3] nvmet: demote admin " Chaitanya Kulkarni
@ 2021-04-30  1:06 ` Chaitanya Kulkarni
  2021-05-07  1:52 ` [PATCH 0/3] nvemt: demote high frequency " Chaitanya Kulkarni
  2021-05-10  6:59 ` Christoph Hellwig
  4 siblings, 0 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-30  1:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, kbusch, 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] 7+ messages in thread

* Re: [PATCH 0/3] nvemt: demote high frequency err msg to debug
  2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
                   ` (2 preceding siblings ...)
  2021-04-30  1:06 ` [PATCH 3/3] nvmet: demote fabrics " Chaitanya Kulkarni
@ 2021-05-07  1:52 ` Chaitanya Kulkarni
  2021-05-10  6:59 ` Christoph Hellwig
  4 siblings, 0 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-07  1:52 UTC (permalink / raw)
  To: hch, sagi, kbusch; +Cc: linux-nvme

On 4/29/21 18:07, Chaitanya Kulkarni wrote:
> 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().
>
> This is on the top of earlier posted req->sg_cnt series :-
>
> http://lists.infradead.org/pipermail/linux-nvme/2021-April/024762.html
>
> -ck

It would nice to get this in along with :-

4a20342572f6 ("nvmet: remove unsupported command noise")

Christoph/Sagi/Keith any comments ?



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] nvemt: demote high frequency err msg to debug
  2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
                   ` (3 preceding siblings ...)
  2021-05-07  1:52 ` [PATCH 0/3] nvemt: demote high frequency " Chaitanya Kulkarni
@ 2021-05-10  6:59 ` Christoph Hellwig
  2021-05-10 19:15   ` Chaitanya Kulkarni
  4 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2021-05-10  6:59 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: linux-nvme, hch, sagi, kbusch

I can't get this to apply.  Can you resend this to the latests nvme-5.13
I'm about to send out.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] nvemt: demote high frequency err msg to debug
  2021-05-10  6:59 ` Christoph Hellwig
@ 2021-05-10 19:15   ` Chaitanya Kulkarni
  0 siblings, 0 replies; 7+ messages in thread
From: Chaitanya Kulkarni @ 2021-05-10 19:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-nvme, sagi, kbusch

On 5/10/21 00:00, Christoph Hellwig wrote:
> I can't get this to apply.  Can you resend this to the latests nvme-5.13
> I'm about to send out.
>

Sent V2, hope its not too late.



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-10 19:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30  1:06 [PATCH 0/3] nvemt: demote high frequency err msg to debug Chaitanya Kulkarni
2021-04-30  1:06 ` [PATCH 1/3] nvmet: demote discovery cmd parse " Chaitanya Kulkarni
2021-04-30  1:06 ` [PATCH 2/3] nvmet: demote admin " Chaitanya Kulkarni
2021-04-30  1:06 ` [PATCH 3/3] nvmet: demote fabrics " Chaitanya Kulkarni
2021-05-07  1:52 ` [PATCH 0/3] nvemt: demote high frequency " Chaitanya Kulkarni
2021-05-10  6:59 ` Christoph Hellwig
2021-05-10 19:15   ` 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.