linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvmet-auth: print an error message if the auth timeout expires
@ 2024-04-24 10:24 Maurizio Lombardi
  2024-04-24 12:15 ` Maurizio Lombardi
  2024-04-24 13:11 ` Hannes Reinecke
  0 siblings, 2 replies; 3+ messages in thread
From: Maurizio Lombardi @ 2024-04-24 10:24 UTC (permalink / raw)
  To: kbusch; +Cc: sagi, hare, dwagner, linux-nvme

When the auth_expired_work fires, an error message should be printed
to inform the user that the authentication is failing because of
a timeout, so he doesn't get misleaded into thinking there is a bug
in the auth code when seeing messages like the following:

nvmet: nvmet_execute_auth_send: ctrl 1 qid 2 step mismatch (2 != 0)
nvmet: nvmet_execute_auth_send: failure incorrect message.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
 drivers/nvme/target/fabrics-cmd-auth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
index eb7785be0ca7..7436ebda9f70 100644
--- a/drivers/nvme/target/fabrics-cmd-auth.c
+++ b/drivers/nvme/target/fabrics-cmd-auth.c
@@ -17,8 +17,8 @@ static void nvmet_auth_expired_work(struct work_struct *work)
 	struct nvmet_sq *sq = container_of(to_delayed_work(work),
 			struct nvmet_sq, auth_expired_work);
 
-	pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n",
-		 __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
+	pr_err("%s: ctrl %d qid %d transaction %u expired, resetting\n",
+		__func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
 	sq->dhchap_step = NVME_AUTH_DHCHAP_MESSAGE_NEGOTIATE;
 	sq->dhchap_tid = -1;
 }
-- 
2.39.3



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

* Re: [PATCH] nvmet-auth: print an error message if the auth timeout expires
  2024-04-24 10:24 [PATCH] nvmet-auth: print an error message if the auth timeout expires Maurizio Lombardi
@ 2024-04-24 12:15 ` Maurizio Lombardi
  2024-04-24 13:11 ` Hannes Reinecke
  1 sibling, 0 replies; 3+ messages in thread
From: Maurizio Lombardi @ 2024-04-24 12:15 UTC (permalink / raw)
  To: kbusch; +Cc: sagi, hare, dwagner, linux-nvme

Sorry, ignore this patch, this was a mistake.

This should stay as a debug message.

st 24. 4. 2024 v 12:25 odesílatel Maurizio Lombardi
<mlombard@redhat.com> napsal:
>
> When the auth_expired_work fires, an error message should be printed
> to inform the user that the authentication is failing because of
> a timeout, so he doesn't get misleaded into thinking there is a bug
> in the auth code when seeing messages like the following:
>
> nvmet: nvmet_execute_auth_send: ctrl 1 qid 2 step mismatch (2 != 0)
> nvmet: nvmet_execute_auth_send: failure incorrect message.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
>  drivers/nvme/target/fabrics-cmd-auth.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
> index eb7785be0ca7..7436ebda9f70 100644
> --- a/drivers/nvme/target/fabrics-cmd-auth.c
> +++ b/drivers/nvme/target/fabrics-cmd-auth.c
> @@ -17,8 +17,8 @@ static void nvmet_auth_expired_work(struct work_struct *work)
>         struct nvmet_sq *sq = container_of(to_delayed_work(work),
>                         struct nvmet_sq, auth_expired_work);
>
> -       pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> -                __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
> +       pr_err("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> +               __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
>         sq->dhchap_step = NVME_AUTH_DHCHAP_MESSAGE_NEGOTIATE;
>         sq->dhchap_tid = -1;
>  }
> --
> 2.39.3
>
>



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

* Re: [PATCH] nvmet-auth: print an error message if the auth timeout expires
  2024-04-24 10:24 [PATCH] nvmet-auth: print an error message if the auth timeout expires Maurizio Lombardi
  2024-04-24 12:15 ` Maurizio Lombardi
@ 2024-04-24 13:11 ` Hannes Reinecke
  1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2024-04-24 13:11 UTC (permalink / raw)
  To: Maurizio Lombardi, kbusch; +Cc: sagi, dwagner, linux-nvme

On 4/24/24 12:24, Maurizio Lombardi wrote:
> When the auth_expired_work fires, an error message should be printed
> to inform the user that the authentication is failing because of
> a timeout, so he doesn't get misleaded into thinking there is a bug
> in the auth code when seeing messages like the following:
> 
> nvmet: nvmet_execute_auth_send: ctrl 1 qid 2 step mismatch (2 != 0)
> nvmet: nvmet_execute_auth_send: failure incorrect message.
> 
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
>   drivers/nvme/target/fabrics-cmd-auth.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
> index eb7785be0ca7..7436ebda9f70 100644
> --- a/drivers/nvme/target/fabrics-cmd-auth.c
> +++ b/drivers/nvme/target/fabrics-cmd-auth.c
> @@ -17,8 +17,8 @@ static void nvmet_auth_expired_work(struct work_struct *work)
>   	struct nvmet_sq *sq = container_of(to_delayed_work(work),
>   			struct nvmet_sq, auth_expired_work);
>   
> -	pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> -		 __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
> +	pr_err("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> +		__func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
>   	sq->dhchap_step = NVME_AUTH_DHCHAP_MESSAGE_NEGOTIATE;
>   	sq->dhchap_tid = -1;
>   }
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



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

end of thread, other threads:[~2024-04-24 13:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 10:24 [PATCH] nvmet-auth: print an error message if the auth timeout expires Maurizio Lombardi
2024-04-24 12:15 ` Maurizio Lombardi
2024-04-24 13:11 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).