From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55399A05A0; Tue, 21 Apr 2020 23:34:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30F021D40B; Tue, 21 Apr 2020 23:34:13 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 23C561D151 for ; Tue, 21 Apr 2020 23:34:06 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id D76E130C1AE; Tue, 21 Apr 2020 14:22:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com D76E130C1AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1587504144; bh=kMbH3wd5+chkb6xTiweZBw8JkxufXQKKYhMzqg5x4Ss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X65A6/WHvFQDcTEBT9oWpOr+g66rey4xCfnqMUI1KtKz7O8EurFiy1+qfFE++HwJ5 OndqmpvToEjasV4EHgl7CwXY34BlyNGLkJpIZD3LzqzLDSHIV/jHy6SoMegoKX+yBU as/tuShuiIasDRGSfk5jkUPT7kBIwceDSwFg88Hg= Received: from localhost.localdomain (unknown [10.230.185.215]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id B2282140069; Tue, 21 Apr 2020 14:34:00 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: Kalesh AP Date: Tue, 21 Apr 2020 14:33:44 -0700 Message-Id: <20200421213351.87219-3-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200421213351.87219-1-ajit.khaparde@broadcom.com> References: <20200421091257.8089-1-kalesh-anakkur.purayil@broadcom.com> <20200421213351.87219-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 2/9] net/bnxt: use macro for PCI log format X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP Use PCI_PRI_FMT instead of "%04x:%02x:%02x:%02x" print format. Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde --- 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)