RDMA/efa: Extend admin timeout error print
Subsystems (2)
Michael Margolin
maintainerPATCH v2 1/1 RDMA/efa: Extend admin timeout error print
Add command id to the printed message for additional debug information.
--- drivers/infiniband/hw/efa/efa_com.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/infiniband/hw/efa/efa_com.c +9 -5
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* -* Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. +* Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. */ #include "efa_com.h"
@@ -30,6 +30,7 @@ struct efa_comp_ctx {struct efa_admin_acq_entry *user_cqe;u32 comp_size;enum efa_cmd_status status; +u16 cmd_id;u8 cmd_opcode;u8 occupied; };
@@ -333,6 +334,7 @@ static struct efa_comp_ctx *__efa_com_submit_admin_cmd(struct efa_com_admin_queu comp_ctx->comp_size = comp_size_in_bytes; comp_ctx->user_cqe = comp; comp_ctx->cmd_opcode = cmd->aq_common_descriptor.opcode; + comp_ctx->cmd_id = cmd_id;reinit_completion (&comp_ctx->wait_event);
@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);clear_bit (EFA_AQ_STATE_RUNNING_BIT , &aq->state); err = -ETIME ;
Signature · 1 line
2.47.1
Quoted 7 lines · Michael Margolin
Add command id to the printed message for additional debug information.
Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>--- drivers/infiniband/hw/efa/efa_com.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Please don't forget to add changelogs.
Quoted 11 lines
drivers/infiniband/hw/efa/efa_com.c +1
-1@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* -* Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. +* Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. */
<...>
Quoted 13 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2reinit_completion (&comp_ctx->wait_event);@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);
drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);
I have very strong feeling that you don't really use these prints in real life.
For example, comp_ctx->cmd_id is printed with %d, while code and comment around cmd_id in __efa_com_submit_admin_cmd() suggests that it needs to be 0x%X.
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing comp_ctx->status, which is clear from if/else section.
So no, I don't buy this claim for "additional debug information", while existing is not used.
Thanks
Quoted 6 lines
drivers/infiniband/hw/efa/efa_com.c +0
-0clear_bit (EFA_AQ_STATE_RUNNING_BIT , &aq->state); err = -ETIME ;Signature · 1 line
2.47.1
Margolin, Michael
maintainerQuoted 33 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 13 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);drivers/infiniband/hw/efa/efa_com.c +3
-2@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.
Quoted 7 lines
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
I'm less bothered by the format as long as we have the info we need.
Michael
Quoted 3 lines
Thanks
Quoted 38 lines · Michael
Quoted 36 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 13 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);drivers/infiniband/hw/efa/efa_com.c +3
-2@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
Quoted 6 lines
Quoted 4 lines
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
If you take a close look on the prints, you will see the reasons. For example, you print comp_ctx->status which can be only 0 or 1, while it is already clear what its value from the print itself.
Quoted 3 lines
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
Do it out-of-tree, there is no need in upstream code for internal debug sessions.
Quoted 2 lines
I'm less bothered by the format as long as we have the info we need.
Like I said, it is clear that you never actually relied on this information. Better if you completely delete these prints and keep them out-of-tree.
Thanks
Quoted 7 lines
Michael
Quoted 3 lines
Thanks
Margolin, Michael
maintainerQuoted 47 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 34 lines · Michael
Quoted 33 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 13 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);drivers/infiniband/hw/efa/efa_com.c +3
-2@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.Quoted 8 lines
Quoted 7 lines
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
Quoted 8 lines
If you take a close look on the prints, you will see the reasons. For example, you print
comp_ctx->statuswhich can be only 0 or 1, while it is already clear what its value from the print itself.Quoted 2 lines
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
Do it out-of-tree, there is no need in upstream code for internal debug sessions.
It's not for internal debug, it is used in production. Why would I upstream internal debug prints?
Quoted 3 lines
Quoted 1 line
I'm less bothered by the format as long as we have the info we need.
Like I said, it is clear that you never actually relied on this information. Better if you completely delete these prints and keep them out-of-tree.
Not sure that I follow, can you please elaborate on what "relying" means from your POV?
Michael
Quoted 53 lines · Michael
Quoted 51 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 34 lines · Michael
Quoted 33 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 13 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);drivers/infiniband/hw/efa/efa_com.c +3
-2@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.Quoted 8 lines
Quoted 7 lines
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
If you take a close look on the prints, you will see the reasons. For example, you print
comp_ctx->statuswhich can be only 0 or 1, while it is already clear what its value from the print itself.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
Do it out-of-tree, there is no need in upstream code for internal debug sessions.
It's not for internal debug, it is used in production. Why would I upstream internal debug prints?
It is used in internal cloud for the NICs not available to the rest of the world. So yes, it is your internal debug print.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'm less bothered by the format as long as we have the info we need.
Like I said, it is clear that you never actually relied on this information. Better if you completely delete these prints and keep them out-of-tree.
Not sure that I follow, can you please elaborate on what "relying" means from your POV?
"relied" == "used"
Quoted 3 lines
Michael
Margolin, Michael
maintainerQuoted 63 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 52 lines · Michael
Quoted 51 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 34 lines · Michael
Quoted 33 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 13 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);drivers/infiniband/hw/efa/efa_com.c +3
-2@@ -557,17 +559,19 @@ static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comif (comp_ctx->status ==EFA_CMD_COMPLETED )ibdev_err_ratelimited ( aq->efa_dev, -"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device sent a completion but the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);drivers/infiniband/hw/efa/efa_com.c static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *com · line 574
Quoted 10 lines
drivers/infiniband/hw/efa/efa_com.c +3
-2else ibdev_err_ratelimited ( aq->efa_dev, -"The device didn't send any completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" , +"The device didn't send any completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n" ,efa_com_cmd_str (comp_ctx->cmd_opcode), comp_ctx->cmd_opcode, comp_ctx->status, - comp_ctx, aq->sq.pc, aq->sq.cc, aq->cq.cc); + comp_ctx->cmd_id, aq->sq.pc, aq->sq.cc, + aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.Quoted 8 lines
Quoted 7 lines
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
If you take a close look on the prints, you will see the reasons. For example, you print
comp_ctx->statuswhich can be only 0 or 1, while it is already clear what its value from the print itself.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
Do it out-of-tree, there is no need in upstream code for internal debug sessions.
It's not for internal debug, it is used in production. Why would I upstream internal debug prints?
Quoted 9 lines
It is used in internal cloud for the NICs not available to the rest of the world. So yes, it is your internal debug print.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
I'm less bothered by the format as long as we have the info we need.
Like I said, it is clear that you never actually relied on this information. Better if you completely delete these prints and keep them out-of-tree.
Not sure that I follow, can you please elaborate on what "relying" means from your POV?
"relied" == "used"
The NIC might be available only in AWS but customers decide what Linux versions they use. Many of our customers choose to use upstream versions and avoid taking debug or modified versions.
You are right saying the appearance for this print is rare, that's why as you pointed out, it isn't perfectly formatted. But this is since the issue rarely reproduce, what is exactly the reason we need the print in-place when it does.
I can definitely improve the styling if it makes things better.
Michael
Margolin, Michael
maintainerQuoted 83 lines · Michael
Quoted 72 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 61 lines · Michael
Quoted 60 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 43 lines · Michael
Quoted 42 lines · Leon Romanovsky
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 24 lines · Michael Margolin
reinit_completion(&comp_ctx->wait_event);(quoted diff) +0
-0@@ -557,17 +559,19 @@ static intefa_com_wait_and_process_admin_cq_interrupts(struct
efa_comp_ctx*com
if (comp_ctx->status==EFA_CMD_COMPLETED)
ibdev_err_ratelimited(
aq->efa_dev,
- "The device sent a completion but
the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (ctx: 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n", + "The device sent a completion but
the driver didn't receive any MSI-X interrupt for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n",efa_com_cmd_str(comp_ctx->cmd_opcode),comp_ctx->cmd_opcode,comp_ctx->status,
-comp_ctx,aq->sq.pc,aq->sq.cc,aq->cq.cc);
+comp_ctx->cmd_id,aq->sq.pc,aq->sq.cc,
+aq->cq.cc);
else
ibdev_err_ratelimited(
aq->efa_dev,
- "The device didn't send any
completion for admin cmd %s(%d) status %d (ctx 0x%p, sq producer: %d, sq consumer: %d, cq consumer: %d)\n",
+ "The device didn't send anyQuoted 8 lines
completion for admin cmd %s(%d) status %d (id: %d, sq producer: %d, sq consumer: %d, cq consumer: %d)\n",
efa_com_cmd_str(comp_ctx->cmd_opcode),comp_ctx->cmd_opcode,comp_ctx->status,
-comp_ctx,aq->sq.pc,aq->sq.cc,aq->cq.cc);
+comp_ctx->cmd_id,aq->sq.pc,aq->sq.cc,
+aq->cq.cc);I have very strong feeling that you don't really use these prints in real life.
For example,
comp_ctx->cmd_idis printed with %d, while code and comment aroundcmd_idin__efa_com_submit_admin_cmd()suggests that it needs to be 0x%X.Quoted 8 lines
Quoted 7 lines
It has a lot of information separated to LSB and MSB bits which are not readable while printing with %d.
You are also printing
comp_ctx->status, which is clear from if/else section.So no, I don't buy this claim for "additional debug information", while existing is not used.
What do you mean by that?!?
If you take a close look on the prints, you will see the reasons. For example, you print
comp_ctx->statuswhich can be only 0 or 1, while it is already clear what its value from the print itself.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
These errors are extremely rare and are not manually reproducible, that's why we want to collect as much information as we can when it happens.
Do it out-of-tree, there is no need in upstream code for internal debug sessions.
It's not for internal debug, it is used in production. Why would I upstream internal debug prints?
Quoted 9 lines
It is used in internal cloud for the NICs not available to the rest of the world. So yes, it is your internal debug print.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
I'm less bothered by the format as long as we have the info we need.
Like I said, it is clear that you never actually relied on this information. Better if you completely delete these prints and keep them out-of-tree.
Not sure that I follow, can you please elaborate on what "relying" means from your POV?
"relied" == "used"
Quoted 8 lines
The NIC might be available only in AWS but customers decide what Linux versions they use. Many of our customers choose to use upstream versions and avoid taking debug or modified versions.
You are right saying the appearance for this print is rare, that's why as you pointed out, it isn't perfectly formatted. But this is since the issue rarely reproduce, what is exactly the reason we need the print in-place when it does.
I can definitely improve the styling if it makes things better.
Michael
Leon, do you have any additional concerns regarding this patch? It's more than 6 weeks in the pipe now.
We are asking customers to use patched drivers and we shouldn't be there.
Michael
Gal Pressman
reviewerQuoted 5 lines · Leon Romanovsky
Quoted 2 lines
It's not for internal debug, it is used in production. Why would I upstream internal debug prints?
It is used in internal cloud for the NICs not available to the rest of the world. So yes, it is your internal debug print.
It is available to literally anyone in the world through AWS, with upstream kernel.
You may like or dislike the patch, but this argument has nothing to do with anything.
Jason Gunthorpe
maintainerQuoted 7 lines · Michael Margolin
Add command id to the printed message for additional debug information.
Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>--- drivers/infiniband/hw/efa/efa_com.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
I picked this up, I think we can debate what level of debug prints or traces are appropriate next someone adds them, but tweaking an existing one seems fine to me.
Jason