DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: stable@dpdk.org,
	Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Subject: [PATCH 3/3] net/bnxt: fix backing store logging
Date: Thu,  6 Jun 2024 16:31:16 -0700	[thread overview]
Message-ID: <20240606233116.38445-4-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20240606233116.38445-1-ajit.khaparde@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 3249 bytes --]

Backing store type count can increase with newer firmware.
So a static bnxt_backing_store_types can cause unnecessary faults.
Instead of logging the string for the backing store type, just log
the value provided by the firmware.

Fixes: fe2f715ca580 ("net/bnxt: support backing store v2")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 48 ++++--------------------------------
 1 file changed, 5 insertions(+), 43 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 9ea5cc090f..fc142672f6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -31,43 +31,6 @@ struct bnxt_plcmodes_cfg {
 	uint16_t	hds_threshold;
 };
 
-const char *bnxt_backing_store_types[] = {
-	"Queue pair",
-	"Shared receive queue",
-	"Completion queue",
-	"Virtual NIC",
-	"Statistic context",
-	"Slow-path TQM ring",
-	"Fast-path TQM ring",
-	"Unused",
-	"Unused",
-	"Unused",
-	"Unused",
-	"Unused",
-	"Unused",
-	"Unused",
-	"MR and MAV Context",
-	"TIM",
-	"Unused",
-	"Unused",
-	"Unused",
-	"Tx key context",
-	"Rx key context",
-	"Mid-path TQM ring",
-	"SQ Doorbell shadow region",
-	"RQ Doorbell shadow region",
-	"SRQ Doorbell shadow region",
-	"CQ Doorbell shadow region",
-	"QUIC Tx key context",
-	"QUIC Rx key context",
-	"Invalid type",
-	"Invalid type",
-	"Invalid type",
-	"Invalid type",
-	"Invalid type",
-	"Invalid type"
-};
-
 const char *media_type[] = { "Unknown", "Twisted Pair",
 	"Direct Attached Copper", "Fiber"
 };
@@ -6402,8 +6365,8 @@ int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
 			ctxm->split[i] = rte_le_to_cpu_32(*p);
 
 		PMD_DRV_LOG(DEBUG,
-			    "type:%s size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x\n",
-			    bnxt_backing_store_types[ctxm->type], ctxm->entry_size,
+			    "type:0x%x size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x\n",
+			    ctxm->type, ctxm->entry_size,
 			    ctxm->entry_multiple, ctxm->max_entries, ctxm->min_entries,
 			    ctxm->split_entry_cnt, init_val, init_off,
 			    BNXT_CTX_INIT_VALID(flags), ctxm->instance_bmap);
@@ -6446,8 +6409,7 @@ int bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
 		HWRM_UNLOCK();
 
 		if (flags & HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_TYPE_VALID) {
-			PMD_DRV_LOG(DEBUG, "Valid types 0x%x - %s\n",
-				    req.type, bnxt_backing_store_types[req.type]);
+			PMD_DRV_LOG(DEBUG, "Valid types 0x%x\n", req.type);
 			types++;
 		}
 	} while (type != HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID);
@@ -6625,8 +6587,8 @@ int bnxt_hwrm_func_backing_store_cfg_v2(struct bnxt *bp,
 				      &req.page_size_pbl_level,
 				      &req.page_dir);
 		PMD_DRV_LOG(DEBUG,
-			    "Backing store config V2 type:%s last %d, instance %d, hw %d\n",
-			    bnxt_backing_store_types[req.type], ctxm->last, j, w);
+			    "Backing store config V2 type:0x%x last %d, instance %d, hw %d\n",
+			    req.type, ctxm->last, j, w);
 		if (ctxm->last && i == (w - 1))
 			req.flags =
 			rte_cpu_to_le_32(BACKING_STORE_CFG_V2_IN_FLG_CFG_ALL_DONE);
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

  parent reply	other threads:[~2024-06-06 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 23:31 [PATCH 0/3] bnxt bug fixes Ajit Khaparde
2024-06-06 23:31 ` [PATCH 1/3] net/bnxt: fix vector mode for P7 devices Ajit Khaparde
2024-06-06 23:31 ` [PATCH 2/3] net/bnxt: refactor backing store qcaps v2 Ajit Khaparde
2024-06-06 23:31 ` Ajit Khaparde [this message]
2024-06-07 16:27 ` [PATCH 0/3] bnxt bug fixes Ajit Khaparde

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=20240606233116.38445-4-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=damodharam.ammepalli@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).