DPDK patches and discussions
 help / color / mirror / Atom feed
From: <shaibran@amazon.com>
To: <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, Shai Brandes <shaibran@amazon.com>
Subject: [PATCH 03/15] net/ena/base: remove redundant assert checks
Date: Tue, 2 Jul 2024 17:46:14 +0300	[thread overview]
Message-ID: <20240702144626.14545-4-shaibran@amazon.com> (raw)
In-Reply-To: <20240702144626.14545-1-shaibran@amazon.com>

From: Shai Brandes <shaibran@amazon.com>

Remove ENA_WARN checks from ena_com_wait_and_process_admin_cq_polling
since once the execution flow reaches the check, it must be
ENA_CMD_COMPLETED because it can't be either of the other options:
1. ENA_CMD_ABORTED - in such case it will perform "goto err" in the "if"
   block above, thus skipping the ENA_WARN check.
2. ENA_CMD_SUBMITTED - in such case it will timeout inside the while(1)
   loop above and perform "goto err", thus skipping the ENA_WARN check.

Remove ENA_WARN check from ena_com_wait_and_process_admin_cq_interrupts
since once the execution flow reaches the check, it must be
ENA_CMD_COMPLETED because it can't be either of the other options:
1. ENA_CMD_ABORTED - same as above, i will perform "goto err" in the
   "if" block above, thus skipping the ENA_WARN check.
2. ENA_CMD_SUBMITTED - in such case it will perform "goto err" in the
   nested if block above, since "admin_queue->polling" is false (because
   of the interrupt mode execution of admin commands)

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/base/ena_com.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 9e1fa40c0c..f9dd086484 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -598,10 +598,6 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
 		goto err;
 	}
 
-	ENA_WARN(comp_ctx->status != ENA_CMD_COMPLETED,
-		 admin_queue->ena_dev, "Invalid comp status %d\n",
-		 comp_ctx->status);
-
 	ret = ena_com_comp_status_to_errno(admin_queue, comp_ctx->comp_status);
 err:
 	comp_ctxt_release(admin_queue, comp_ctx);
@@ -828,10 +824,6 @@ static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *com
 		goto err;
 	}
 
-	ENA_WARN(comp_ctx->status != ENA_CMD_COMPLETED,
-		 admin_queue->ena_dev, "Invalid comp status %d\n",
-		 comp_ctx->status);
-
 	ret = ena_com_comp_status_to_errno(admin_queue, comp_ctx->comp_status);
 err:
 	comp_ctxt_release(admin_queue, comp_ctx);
-- 
2.17.1


  parent reply	other threads:[~2024-07-02 14:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 14:46 [PATCH 00/15] net/ena: driver release 2.10.0 shaibran
2024-07-02 14:46 ` [PATCH 01/15] net/ena/base: add descriptor dump capability shaibran
2024-07-02 14:46 ` [PATCH 02/15] net/ena/base: remove unused param shaibran
2024-07-02 14:46 ` shaibran [this message]
2024-07-02 14:46 ` [PATCH 04/15] net/ena/base: update memory barrier comment shaibran
2024-07-02 14:46 ` [PATCH 05/15] net/ena/base: add method to check used entries shaibran
2024-07-02 14:46 ` [PATCH 06/15] net/ena/base: add an additional reset reason shaibran
2024-07-02 14:46 ` [PATCH 07/15] net/ena/base: update copyrights comments shaibran
2024-07-02 14:46 ` [PATCH 08/15] net/ena/base: add macro for bitfield access shaibran
2024-07-02 14:46 ` [PATCH 09/15] net/ena: logger change to improve performance shaibran
2024-07-02 14:46 ` [PATCH 10/15] net/ena: rework device uninit shaibran
2024-07-02 14:46 ` [PATCH 11/15] net/ena: fix bad checksum handling shaibran
2024-07-02 14:46 ` [PATCH 12/15] net/ena: fix invalid return value check shaibran
2024-07-02 14:46 ` [PATCH 13/15] net/ena: fix wrong handling of checksum shaibran
2024-07-02 14:46 ` [PATCH 14/15] net/ena: rework Rx checksum inspection shaibran
2024-07-02 14:46 ` [PATCH 15/15] net/ena: upgrade driver version to 2.10.0 shaibran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240702144626.14545-4-shaibran@amazon.com \
    --to=shaibran@amazon.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).