From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: [dpdk-dev] [PATCH v2 02/10] net/bnxt: use macro for PCI log format
Date: Tue, 21 Apr 2020 13:07:12 -0700 [thread overview]
Message-ID: <20200421200720.81151-3-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20200421200720.81151-1-ajit.khaparde@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Use PCI_PRI_FMT instead of "%04x:%02x:%02x:%02x" print format.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 6 +++---
drivers/net/bnxt/bnxt_ring.c | 2 +-
drivers/net/bnxt/bnxt_vnic.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 09a73286b..4c0fac6be 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1104,7 +1104,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
dev_caps_cfg = rte_le_to_cpu_32(resp->dev_caps_cfg);
if (bp->max_resp_len != max_resp_len) {
- sprintf(type, "bnxt_hwrm_%04x:%02x:%02x:%02x",
+ sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT,
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function);
@@ -1139,7 +1139,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
(dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED)) ||
bp->hwrm_max_ext_req_len > HWRM_MAX_REQ_LEN) {
- sprintf(type, "bnxt_hwrm_short_%04x:%02x:%02x:%02x",
+ sprintf(type, "bnxt_hwrm_short_" PCI_PRI_FMT,
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function);
@@ -2574,7 +2574,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
struct rte_pci_device *pdev = bp->pdev;
char type[RTE_MEMZONE_NAMESIZE];
- sprintf(type, "bnxt_hwrm_%04x:%02x:%02x:%02x", pdev->addr.domain,
+ sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT, pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
bp->max_resp_len = HWRM_MAX_RESP_LEN;
bp->hwrm_cmd_resp_addr = rte_malloc(type, bp->max_resp_len, 0);
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 1999cd786..24a947f27 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -196,7 +196,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
total_alloc_len += tpa_info_len;
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
- "bnxt_%04x:%02x:%02x:%02x-%04x_%s", pdev->addr.domain,
+ "bnxt_" PCI_PRI_FMT "-%04x_%s", pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function, qidx,
suffix);
mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index bc054a8e0..326c0d1b6 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -136,7 +136,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
max_vnics = bp->max_vnics;
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
- "bnxt_%04x:%02x:%02x:%02x_vnicattr", pdev->addr.domain,
+ "bnxt_" PCI_PRI_FMT "_vnicattr", pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
mz = rte_memzone_lookup(mz_name);
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2020-04-21 20:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 9:12 [dpdk-dev] [PATCH 0/9] bnxt patchset with fixes Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 1/9] net/bnxt: use macro for PCI log format Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 2/9] net/bnxt: return speed capabilities in device info get Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 3/9] net/bnxt: fix to resend FUNC_DRV_IF_CHANGE when FW reset is in progress Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 4/9] net/bnxt: fix to use true/false for bool types Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 5/9] net/bnxt: fix to handle port start failure Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 6/9] net/bnxt: fix vlan add when port is stopped Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 7/9] net/bnxt: define FW_STATUS location structure for ChiMP devices Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 8/9] net/bnxt: log firmware status on early init failure Kalesh A P
2020-04-21 9:12 ` [dpdk-dev] [PATCH 9/9] net/bnxt: fix to not issue HWRM_PORT_MAC_QCFG on a VF Kalesh A P
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 00/10] bnxt patchset with fixes Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 01/10] net/bnxt: fix compilation on BSD Ajit Khaparde
2020-04-21 20:07 ` Ajit Khaparde [this message]
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 03/10] net/bnxt: return speed capabilities in device get info Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 04/10] net/bnxt: fix HWRM command failure during FW reset Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 05/10] net/bnxt: fix to use true/false for bool types Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 06/10] net/bnxt: fix to handle port start failure Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 07/10] net/bnxt: fix vlan add when port is stopped Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 08/10] net/bnxt: add FW status location structure Ajit Khaparde
2020-04-21 21:05 ` Ferruh Yigit
2020-04-21 21:21 ` Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 09/10] net/bnxt: log firmware status on early init failure Ajit Khaparde
2020-04-21 20:07 ` [dpdk-dev] [PATCH v2 10/10] net/bnxt: fix to not issue port MAC query on a VF Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 0/9] bnxt patchset with fixes Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 1/9] net/bnxt: fix compilation on BSD Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 2/9] net/bnxt: use macro for PCI log format Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 3/9] net/bnxt: return speed capabilities in device get info Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 4/9] net/bnxt: fix HWRM command failure during FW reset Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 5/9] net/bnxt: fix to use true/false for bool types Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 6/9] net/bnxt: fix to handle port start failure Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 7/9] net/bnxt: fix vlan add when port is stopped Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 8/9] net/bnxt: log firmware status on early init failure Ajit Khaparde
2020-04-21 21:33 ` [dpdk-dev] [PATCH v3 9/9] net/bnxt: fix to not issue port MAC query on a VF Ajit Khaparde
2020-04-22 11:44 ` [dpdk-dev] [PATCH v3 0/9] bnxt patchset with fixes Ferruh Yigit
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=20200421200720.81151-3-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=kalesh-anakkur.purayil@broadcom.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).