get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/70343/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 70343,
    "url": "https://patches.dpdk.org/api/patches/70343/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200515184542.89318-7-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200515184542.89318-7-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200515184542.89318-7-ajit.khaparde@broadcom.com",
    "date": "2020-05-15T18:45:39",
    "name": "[v1,6/9] net/bnxt: fix to alloc PF info structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a793586d32a8a441b92eeae3445de1e4ce9d2e13",
    "submitter": {
        "id": 501,
        "url": "https://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "https://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200515184542.89318-7-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 10105,
            "url": "https://patches.dpdk.org/api/series/10105/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10105",
            "date": "2020-05-15T18:45:33",
            "name": "bug fixes for bnxt PMD",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10105/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/70343/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/70343/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E22CFA00C3;\n\tFri, 15 May 2020 20:46:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 08DF21DAC0;\n\tFri, 15 May 2020 20:46:01 +0200 (CEST)",
            "from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com\n [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 10F6E1DAC1;\n Fri, 15 May 2020 20:45:52 +0200 (CEST)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n [10.75.242.48])\n by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 8205091BF3;\n Fri, 15 May 2020 11:44:44 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.230.185.215])\n by mail-irv-17.broadcom.com (Postfix) with ESMTP id C7AEB14008B;\n Fri, 15 May 2020 11:45:50 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 8205091BF3",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1589568284;\n bh=fiCKI/fA3x0hNhkDHyyJNTNu2DsENCQ/zWJpi5s8WOk=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Jw8em+njFswR+NN1l19UNxvZvFI0iapYCY6/ieSu0UyIfh8UxaEMsKWzgtr3N44ao\n Jmgatr9v/3haArDE0dBi2e5xjpbmB+DgkVHLKucssscMP9cVltVeqW7T604GhK4zj5\n 4lNTSfRNsJIBu7qN7gFP/2w+Ny1z/65EneplsGTs=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, stable@dpdk.org,\n Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,\n Somnath Kotur <somnath.kotur@broadcom.com>",
        "Date": "Fri, 15 May 2020 11:45:39 -0700",
        "Message-Id": "<20200515184542.89318-7-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20200515184542.89318-1-ajit.khaparde@broadcom.com>",
        "References": "<20200515184542.89318-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v1 6/9] net/bnxt: fix to alloc PF info structure",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Fixes: 804e746c7b73 (\"net/bnxt: add hardware resource manager init code\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\nSigned-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>\nReviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>\n---\n drivers/net/bnxt/bnxt.h         |   9 +-\n drivers/net/bnxt/bnxt_cpr.c     |  20 ++---\n drivers/net/bnxt/bnxt_ethdev.c  |  31 +++++--\n drivers/net/bnxt/bnxt_filter.c  |  12 +--\n drivers/net/bnxt/bnxt_hwrm.c    | 145 ++++++++++++++++----------------\n drivers/net/bnxt/rte_pmd_bnxt.c |  98 ++++++++++-----------\n 6 files changed, 169 insertions(+), 146 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex b66f6ba25..7410db5e4 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -219,11 +219,12 @@ struct bnxt_child_vf_info {\n \n struct bnxt_pf_info {\n #define BNXT_FIRST_PF_FID\t1\n-#define BNXT_MAX_VFS(bp)\t(bp->pf.max_vfs)\n-#define BNXT_TOTAL_VFS(bp)\t((bp)->pf.total_vfs)\n+#define BNXT_MAX_VFS(bp)\t((bp)->pf->max_vfs)\n+#define BNXT_TOTAL_VFS(bp)\t((bp)->pf->total_vfs)\n #define BNXT_FIRST_VF_FID\t128\n #define BNXT_PF_RINGS_USED(bp)\tbnxt_get_num_queues(bp)\n-#define BNXT_PF_RINGS_AVAIL(bp)\t(bp->pf.max_cp_rings - BNXT_PF_RINGS_USED(bp))\n+#define BNXT_PF_RINGS_AVAIL(bp)\t((bp)->pf->max_cp_rings - \\\n+\t\t\t\t BNXT_PF_RINGS_USED(bp))\n \tuint16_t\t\tport_id;\n \tuint16_t\t\tfirst_vf_id;\n \tuint16_t\t\tactive_vfs;\n@@ -689,7 +690,7 @@ struct bnxt {\n #define BNXT_OUTER_TPID_BD_MASK\t0xffff0000\n #define BNXT_OUTER_TPID_BD_SHFT\t16\n \tuint32_t\t\touter_tpid_bd;\n-\tstruct bnxt_pf_info\tpf;\n+\tstruct bnxt_pf_info\t*pf;\n \tuint8_t\t\t\tvxlan_port_cnt;\n \tuint8_t\t\t\tgeneve_port_cnt;\n \tuint16_t\t\tvxlan_port;\ndiff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c\nindex 21565b1e2..40e5350f6 100644\n--- a/drivers/net/bnxt/bnxt_cpr.c\n+++ b/drivers/net/bnxt/bnxt_cpr.c\n@@ -160,14 +160,14 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)\n \tuint16_t req_len;\n \tint rc;\n \n-\tif (bp->pf.active_vfs <= 0) {\n+\tif (bp->pf->active_vfs <= 0) {\n \t\tPMD_DRV_LOG(ERR, \"Forwarded VF with no active VFs\\n\");\n \t\treturn;\n \t}\n \n \t/* Qualify the fwd request */\n \tfw_vf_id = rte_le_to_cpu_16(fwd_cmpl->source_id);\n-\tvf_id = fw_vf_id - bp->pf.first_vf_id;\n+\tvf_id = fw_vf_id - bp->pf->first_vf_id;\n \n \treq_len = (rte_le_to_cpu_16(fwd_cmpl->req_len_type) &\n \t\t   HWRM_FWD_REQ_CMPL_REQ_LEN_MASK) >>\n@@ -176,15 +176,15 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)\n \t\treq_len = sizeof(fwreq->encap_request);\n \n \t/* Locate VF's forwarded command */\n-\tfwd_cmd = (struct input *)bp->pf.vf_info[vf_id].req_buf;\n+\tfwd_cmd = (struct input *)bp->pf->vf_info[vf_id].req_buf;\n \n-\tif (fw_vf_id < bp->pf.first_vf_id ||\n-\t    fw_vf_id >= (bp->pf.first_vf_id) + bp->pf.active_vfs) {\n+\tif (fw_vf_id < bp->pf->first_vf_id ||\n+\t    fw_vf_id >= bp->pf->first_vf_id + bp->pf->active_vfs) {\n \t\tPMD_DRV_LOG(ERR,\n \t\t\"FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\\n\",\n-\t\t\tfw_vf_id, bp->pf.first_vf_id,\n-\t\t\t(bp->pf.first_vf_id) + bp->pf.active_vfs - 1,\n-\t\t\tbp->pf.first_vf_id, bp->pf.active_vfs);\n+\t\t\tfw_vf_id, bp->pf->first_vf_id,\n+\t\t\t(bp->pf->first_vf_id) + bp->pf->active_vfs - 1,\n+\t\t\tbp->pf->first_vf_id, bp->pf->active_vfs);\n \t\tgoto reject;\n \t}\n \n@@ -219,7 +219,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)\n \t\tif (rc) {\n \t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t\"Failed to send FWD req VF 0x%x, type 0x%x.\\n\",\n-\t\t\t\tfw_vf_id - bp->pf.first_vf_id,\n+\t\t\t\tfw_vf_id - bp->pf->first_vf_id,\n \t\t\t\trte_le_to_cpu_16(fwd_cmd->req_type));\n \t\t}\n \t\treturn;\n@@ -230,7 +230,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)\n \tif (rc) {\n \t\tPMD_DRV_LOG(ERR,\n \t\t\t\"Failed to send REJECT req VF 0x%x, type 0x%x.\\n\",\n-\t\t\tfw_vf_id - bp->pf.first_vf_id,\n+\t\t\tfw_vf_id - bp->pf->first_vf_id,\n \t\t\trte_le_to_cpu_16(fwd_cmd->req_type));\n \t}\n \ndiff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex 7367c14d4..b64745003 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -191,6 +191,11 @@ static uint16_t  bnxt_rss_hash_tbl_size(const struct bnxt *bp)\n \treturn bnxt_rss_ctxts(bp) * BNXT_RSS_ENTRIES_PER_CTX_THOR;\n }\n \n+static void bnxt_free_pf_info(struct bnxt *bp)\n+{\n+\trte_free(bp->pf);\n+}\n+\n static void bnxt_free_link_info(struct bnxt *bp)\n {\n \trte_free(bp->link_info);\n@@ -238,6 +243,15 @@ static void bnxt_free_mem(struct bnxt *bp, bool reconfig)\n \tbp->grp_info = NULL;\n }\n \n+static int bnxt_alloc_pf_info(struct bnxt *bp)\n+{\n+\tbp->pf = rte_zmalloc(\"bnxt_pf_info\", sizeof(struct bnxt_pf_info), 0);\n+\tif (bp->pf == NULL)\n+\t\treturn -ENOMEM;\n+\n+\treturn 0;\n+}\n+\n static int bnxt_alloc_link_info(struct bnxt *bp)\n {\n \tbp->link_info =\n@@ -1319,6 +1333,7 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)\n \tbnxt_free_leds_info(bp);\n \tbnxt_free_cos_queues(bp);\n \tbnxt_free_link_info(bp);\n+\tbnxt_free_pf_info(bp);\n \n \teth_dev->dev_ops = NULL;\n \teth_dev->rx_pkt_burst = NULL;\n@@ -1329,8 +1344,8 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)\n \trte_memzone_free((const struct rte_memzone *)bp->rx_mem_zone);\n \tbp->rx_mem_zone = NULL;\n \n-\trte_free(bp->pf.vf_info);\n-\tbp->pf.vf_info = NULL;\n+\trte_free(bp->pf->vf_info);\n+\tbp->pf->vf_info = NULL;\n \n \trte_free(bp->grp_info);\n \tbp->grp_info = NULL;\n@@ -3751,7 +3766,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)\n static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)\n {\n \tstruct bnxt_ptp_cfg *ptp = bp->ptp_cfg;\n-\tstruct bnxt_pf_info *pf = &bp->pf;\n+\tstruct bnxt_pf_info *pf = bp->pf;\n \tuint16_t port_id;\n \tuint32_t fifo;\n \n@@ -5013,7 +5028,7 @@ static void bnxt_config_vf_req_fwd(struct bnxt *bp)\n #define ALLOW_FUNC(x)\t\\\n \t{ \\\n \t\tuint32_t arg = (x); \\\n-\t\tbp->pf.vf_req_fwd[((arg) >> 5)] &= \\\n+\t\tbp->pf->vf_req_fwd[((arg) >> 5)] &= \\\n \t\t~rte_cpu_to_le_32(1 << ((arg) & 0x1f)); \\\n \t}\n \n@@ -5021,11 +5036,11 @@ static void bnxt_config_vf_req_fwd(struct bnxt *bp)\n \tif (((bp->fw_ver >= ((20 << 24) | (6 << 16) | (100 << 8))) &&\n \t     (bp->fw_ver < ((20 << 24) | (7 << 16)))) ||\n \t    ((bp->fw_ver >= ((20 << 24) | (8 << 16))))) {\n-\t\tmemset(bp->pf.vf_req_fwd, 0xff, sizeof(bp->pf.vf_req_fwd));\n+\t\tmemset(bp->pf->vf_req_fwd, 0xff, sizeof(bp->pf->vf_req_fwd));\n \t} else {\n \t\tPMD_DRV_LOG(WARNING,\n \t\t\t    \"Firmware too old for VF mailbox functionality\\n\");\n-\t\tmemset(bp->pf.vf_req_fwd, 0, sizeof(bp->pf.vf_req_fwd));\n+\t\tmemset(bp->pf->vf_req_fwd, 0, sizeof(bp->pf->vf_req_fwd));\n \t}\n \n \t/*\n@@ -5457,6 +5472,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)\n \t\treturn rc;\n \t}\n \n+\trc = bnxt_alloc_pf_info(bp);\n+\tif (rc)\n+\t\tgoto error_free;\n+\n \trc = bnxt_alloc_link_info(bp);\n \tif (rc)\n \t\tgoto error_free;\ndiff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c\nindex a1463a0e2..d822ff607 100644\n--- a/drivers/net/bnxt/bnxt_filter.c\n+++ b/drivers/net/bnxt/bnxt_filter.c\n@@ -55,7 +55,7 @@ struct bnxt_filter_info *bnxt_alloc_vf_filter(struct bnxt *bp, uint16_t vf)\n \t}\n \n \tfilter->fw_l2_filter_id = UINT64_MAX;\n-\tSTAILQ_INSERT_TAIL(&bp->pf.vf_info[vf].filter, filter, next);\n+\tSTAILQ_INSERT_TAIL(&bp->pf->vf_info[vf].filter, filter, next);\n \treturn filter;\n }\n \n@@ -95,8 +95,8 @@ void bnxt_free_all_filters(struct bnxt *bp)\n \t\tSTAILQ_INIT(&vnic->filter);\n \t}\n \n-\tfor (i = 0; i < bp->pf.max_vfs; i++) {\n-\t\tSTAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {\n+\tfor (i = 0; i < bp->pf->max_vfs; i++) {\n+\t\tSTAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {\n \t\t\tbnxt_hwrm_clear_l2_filter(bp, filter);\n \t\t}\n \t}\n@@ -144,10 +144,10 @@ void bnxt_free_filter_mem(struct bnxt *bp)\n \trte_free(bp->filter_info);\n \tbp->filter_info = NULL;\n \n-\tfor (i = 0; i < bp->pf.max_vfs; i++) {\n-\t\tSTAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {\n+\tfor (i = 0; i < bp->pf->max_vfs; i++) {\n+\t\tSTAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {\n \t\t\trte_free(filter);\n-\t\t\tSTAILQ_REMOVE(&bp->pf.vf_info[i].filter, filter,\n+\t\t\tSTAILQ_REMOVE(&bp->pf->vf_info[i].filter, filter,\n \t\t\t\t      bnxt_filter_info, next);\n \t\t}\n \t}\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex 2e93a847f..a41d77669 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -626,7 +626,7 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)\n \n \tHWRM_PREP(&req, HWRM_PORT_MAC_PTP_QCFG, BNXT_USE_CHIMP_MB);\n \n-\treq.port_id = rte_cpu_to_le_16(bp->pf.port_id);\n+\treq.port_id = rte_cpu_to_le_16(bp->pf->port_id);\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n@@ -690,41 +690,42 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)\n \tbp->max_ring_grps = rte_le_to_cpu_32(resp->max_hw_ring_grps);\n \tflags = rte_le_to_cpu_32(resp->flags);\n \tif (BNXT_PF(bp)) {\n-\t\tbp->pf.port_id = resp->port_id;\n-\t\tbp->pf.first_vf_id = rte_le_to_cpu_16(resp->first_vf_id);\n-\t\tbp->pf.total_vfs = rte_le_to_cpu_16(resp->max_vfs);\n+\t\tbp->pf->port_id = resp->port_id;\n+\t\tbp->pf->first_vf_id = rte_le_to_cpu_16(resp->first_vf_id);\n+\t\tbp->pf->total_vfs = rte_le_to_cpu_16(resp->max_vfs);\n \t\tnew_max_vfs = bp->pdev->max_vfs;\n-\t\tif (new_max_vfs != bp->pf.max_vfs) {\n-\t\t\tif (bp->pf.vf_info)\n-\t\t\t\trte_free(bp->pf.vf_info);\n-\t\t\tbp->pf.vf_info = rte_malloc(\"bnxt_vf_info\",\n-\t\t\t    sizeof(bp->pf.vf_info[0]) * new_max_vfs, 0);\n-\t\t\tbp->pf.max_vfs = new_max_vfs;\n+\t\tif (new_max_vfs != bp->pf->max_vfs) {\n+\t\t\tif (bp->pf->vf_info)\n+\t\t\t\trte_free(bp->pf->vf_info);\n+\t\t\tbp->pf->vf_info = rte_malloc(\"bnxt_vf_info\",\n+\t\t\t    sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0);\n+\t\t\tbp->pf->max_vfs = new_max_vfs;\n \t\t\tfor (i = 0; i < new_max_vfs; i++) {\n-\t\t\t\tbp->pf.vf_info[i].fid = bp->pf.first_vf_id + i;\n-\t\t\t\tbp->pf.vf_info[i].vlan_table =\n+\t\t\t\tbp->pf->vf_info[i].fid =\n+\t\t\t\t\tbp->pf->first_vf_id + i;\n+\t\t\t\tbp->pf->vf_info[i].vlan_table =\n \t\t\t\t\trte_zmalloc(\"VF VLAN table\",\n \t\t\t\t\t\t    getpagesize(),\n \t\t\t\t\t\t    getpagesize());\n-\t\t\t\tif (bp->pf.vf_info[i].vlan_table == NULL)\n+\t\t\t\tif (bp->pf->vf_info[i].vlan_table == NULL)\n \t\t\t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t\t\"Fail to alloc VLAN table for VF %d\\n\",\n \t\t\t\t\ti);\n \t\t\t\telse\n \t\t\t\t\trte_mem_lock_page(\n-\t\t\t\t\t\tbp->pf.vf_info[i].vlan_table);\n-\t\t\t\tbp->pf.vf_info[i].vlan_as_table =\n+\t\t\t\t\t\tbp->pf->vf_info[i].vlan_table);\n+\t\t\t\tbp->pf->vf_info[i].vlan_as_table =\n \t\t\t\t\trte_zmalloc(\"VF VLAN AS table\",\n \t\t\t\t\t\t    getpagesize(),\n \t\t\t\t\t\t    getpagesize());\n-\t\t\t\tif (bp->pf.vf_info[i].vlan_as_table == NULL)\n+\t\t\t\tif (bp->pf->vf_info[i].vlan_as_table == NULL)\n \t\t\t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t\t\"Alloc VLAN AS table for VF %d fail\\n\",\n \t\t\t\t\ti);\n \t\t\t\telse\n \t\t\t\t\trte_mem_lock_page(\n-\t\t\t\t\t       bp->pf.vf_info[i].vlan_as_table);\n-\t\t\t\tSTAILQ_INIT(&bp->pf.vf_info[i].filter);\n+\t\t\t\t\t      bp->pf->vf_info[i].vlan_as_table);\n+\t\t\t\tSTAILQ_INIT(&bp->pf->vf_info[i].filter);\n \t\t\t}\n \t\t}\n \t}\n@@ -742,7 +743,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)\n \t\tbp->max_l2_ctx += bp->max_rx_em_flows;\n \t/* TODO: For now, do not support VMDq/RFS on VFs. */\n \tif (BNXT_PF(bp)) {\n-\t\tif (bp->pf.max_vfs)\n+\t\tif (bp->pf->max_vfs)\n \t\t\tbp->max_vnics = 1;\n \t\telse\n \t\t\tbp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);\n@@ -753,7 +754,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)\n \t\t    bp->max_l2_ctx, bp->max_vnics);\n \tbp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);\n \tif (BNXT_PF(bp)) {\n-\t\tbp->pf.total_vnics = rte_le_to_cpu_16(resp->max_vnics);\n+\t\tbp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);\n \t\tif (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {\n \t\t\tbp->flags |= BNXT_FLAG_PTP_SUPPORTED;\n \t\t\tPMD_DRV_LOG(DEBUG, \"PTP SUPPORTED\\n\");\n@@ -881,9 +882,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)\n \tif (BNXT_PF(bp)) {\n \t\treq.enables |= rte_cpu_to_le_32(\n \t\t\tHWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VF_REQ_FWD);\n-\t\tmemcpy(req.vf_req_fwd, bp->pf.vf_req_fwd,\n+\t\tmemcpy(req.vf_req_fwd, bp->pf->vf_req_fwd,\n \t\t       RTE_MIN(sizeof(req.vf_req_fwd),\n-\t\t\t       sizeof(bp->pf.vf_req_fwd)));\n+\t\t\t       sizeof(bp->pf->vf_req_fwd)));\n \n \t\t/*\n \t\t * PF can sniff HWRM API issued by VF. This can be set up by\n@@ -2234,11 +2235,11 @@ int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf, const uint8_t *mac_addr)\n \tstruct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;\n \tint rc;\n \n-\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);\n+\treq.flags = rte_cpu_to_le_32(bp->pf->vf_info[vf].func_cfg_flags);\n \treq.enables = rte_cpu_to_le_32(\n \t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR);\n \tmemcpy(req.dflt_mac_addr, mac_addr, sizeof(req.dflt_mac_addr));\n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n@@ -2246,7 +2247,7 @@ int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf, const uint8_t *mac_addr)\n \tHWRM_CHECK_RESULT();\n \tHWRM_UNLOCK();\n \n-\tbp->pf.vf_info[vf].random_mac = false;\n+\tbp->pf->vf_info[vf].random_mac = false;\n \n \treturn rc;\n }\n@@ -3164,7 +3165,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)\n \t\treq.num_msix = rte_cpu_to_le_16(bp->max_nq_rings);\n \t}\n \n-\treq.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);\n+\treq.flags = rte_cpu_to_le_32(bp->pf->func_cfg_flags);\n \treq.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU);\n \treq.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));\n \treq.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);\n@@ -3233,7 +3234,7 @@ static void add_random_mac_if_needed(struct bnxt *bp,\n \t\tcfg_req->enables |=\n \t\trte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR);\n \t\trte_eth_random_addr(cfg_req->dflt_mac_addr);\n-\t\tbp->pf.vf_info[vf].random_mac = true;\n+\t\tbp->pf->vf_info[vf].random_mac = true;\n \t} else {\n \t\tmemcpy(cfg_req->dflt_mac_addr, mac.addr_bytes,\n \t\t\tRTE_ETHER_ADDR_LEN);\n@@ -3250,7 +3251,7 @@ static int reserve_resources_from_vf(struct bnxt *bp,\n \n \t/* Get the actual allocated values now */\n \tHWRM_PREP(&req, HWRM_FUNC_QCAPS, BNXT_USE_CHIMP_MB);\n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n \tif (rc) {\n@@ -3288,7 +3289,7 @@ int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)\n \n \t/* Check for zero MAC address */\n \tHWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);\n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \tHWRM_CHECK_RESULT();\n \trc = rte_le_to_cpu_16(resp->vlan);\n@@ -3312,7 +3313,7 @@ static int update_pf_resource_max(struct bnxt *bp)\n \n \t/* Only TX ring value reflects actual allocation? TODO */\n \tbp->max_tx_rings = rte_le_to_cpu_16(resp->alloc_tx_rings);\n-\tbp->pf.evb_mode = resp->evb_mode;\n+\tbp->pf->evb_mode = resp->evb_mode;\n \n \tHWRM_UNLOCK();\n \n@@ -3332,10 +3333,10 @@ int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)\n \tif (rc)\n \t\treturn rc;\n \n-\tbp->pf.func_cfg_flags &=\n+\tbp->pf->func_cfg_flags &=\n \t\t~(HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_ENABLE |\n \t\t  HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE);\n-\tbp->pf.func_cfg_flags |=\n+\tbp->pf->func_cfg_flags |=\n \t\tHWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE;\n \trc = bnxt_hwrm_pf_func_cfg(bp, bp->max_tx_rings);\n \trc = __bnxt_hwrm_func_qcaps(bp);\n@@ -3361,7 +3362,7 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)\n \tif (rc)\n \t\treturn rc;\n \n-\tbp->pf.active_vfs = num_vfs;\n+\tbp->pf->active_vfs = num_vfs;\n \n \t/*\n \t * First, configure the PF to only use one TX ring.  This ensures that\n@@ -3373,10 +3374,10 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)\n \t *\n \t * This has been fixed with firmware versions above 20.6.54\n \t */\n-\tbp->pf.func_cfg_flags &=\n+\tbp->pf->func_cfg_flags &=\n \t\t~(HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_ENABLE |\n \t\t  HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE);\n-\tbp->pf.func_cfg_flags |=\n+\tbp->pf->func_cfg_flags |=\n \t\tHWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_ENABLE;\n \trc = bnxt_hwrm_pf_func_cfg(bp, 1);\n \tif (rc)\n@@ -3386,16 +3387,16 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)\n \t * Now, create and register a buffer to hold forwarded VF requests\n \t */\n \treq_buf_sz = num_vfs * HWRM_MAX_REQ_LEN;\n-\tbp->pf.vf_req_buf = rte_malloc(\"bnxt_vf_fwd\", req_buf_sz,\n+\tbp->pf->vf_req_buf = rte_malloc(\"bnxt_vf_fwd\", req_buf_sz,\n \t\tpage_roundup(num_vfs * HWRM_MAX_REQ_LEN));\n-\tif (bp->pf.vf_req_buf == NULL) {\n+\tif (bp->pf->vf_req_buf == NULL) {\n \t\trc = -ENOMEM;\n \t\tgoto error_free;\n \t}\n \tfor (sz = 0; sz < req_buf_sz; sz += getpagesize())\n-\t\trte_mem_lock_page(((char *)bp->pf.vf_req_buf) + sz);\n+\t\trte_mem_lock_page(((char *)bp->pf->vf_req_buf) + sz);\n \tfor (i = 0; i < num_vfs; i++)\n-\t\tbp->pf.vf_info[i].req_buf = ((char *)bp->pf.vf_req_buf) +\n+\t\tbp->pf->vf_info[i].req_buf = ((char *)bp->pf->vf_req_buf) +\n \t\t\t\t\t(i * HWRM_MAX_REQ_LEN);\n \n \trc = bnxt_hwrm_func_buf_rgtr(bp);\n@@ -3404,13 +3405,13 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)\n \n \tpopulate_vf_func_cfg_req(bp, &req, num_vfs);\n \n-\tbp->pf.active_vfs = 0;\n+\tbp->pf->active_vfs = 0;\n \tfor (i = 0; i < num_vfs; i++) {\n \t\tadd_random_mac_if_needed(bp, &req, i);\n \n \t\tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n-\t\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[i].func_cfg_flags);\n-\t\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[i].fid);\n+\t\treq.flags = rte_cpu_to_le_32(bp->pf->vf_info[i].func_cfg_flags);\n+\t\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[i].fid);\n \t\trc = bnxt_hwrm_send_message(bp,\n \t\t\t\t\t    &req,\n \t\t\t\t\t    sizeof(req),\n@@ -3433,8 +3434,8 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)\n \t\tHWRM_UNLOCK();\n \n \t\treserve_resources_from_vf(bp, &req, i);\n-\t\tbp->pf.active_vfs++;\n-\t\tbnxt_hwrm_func_clr_stats(bp, bp->pf.vf_info[i].fid);\n+\t\tbp->pf->active_vfs++;\n+\t\tbnxt_hwrm_func_clr_stats(bp, bp->pf->vf_info[i].fid);\n \t}\n \n \t/*\n@@ -3468,7 +3469,7 @@ int bnxt_hwrm_pf_evb_mode(struct bnxt *bp)\n \n \treq.fid = rte_cpu_to_le_16(0xffff);\n \treq.enables = rte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_EVB_MODE);\n-\treq.evb_mode = bp->pf.evb_mode;\n+\treq.evb_mode = bp->pf->evb_mode;\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \tHWRM_CHECK_RESULT();\n@@ -3536,7 +3537,7 @@ int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf,\n \n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \treq.flags = rte_cpu_to_le_32(flags);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n@@ -3568,10 +3569,10 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)\n \n \treq.req_buf_num_pages = rte_cpu_to_le_16(1);\n \treq.req_buf_page_size = rte_cpu_to_le_16(\n-\t\t\t page_getenum(bp->pf.active_vfs * HWRM_MAX_REQ_LEN));\n+\t\t\t page_getenum(bp->pf->active_vfs * HWRM_MAX_REQ_LEN));\n \treq.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN);\n \treq.req_buf_page_addr0 =\n-\t\trte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf.vf_req_buf));\n+\t\trte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf->vf_req_buf));\n \tif (req.req_buf_page_addr0 == RTE_BAD_IOVA) {\n \t\tPMD_DRV_LOG(ERR,\n \t\t\t\"unable to map buffer address to physical memory\\n\");\n@@ -3614,7 +3615,7 @@ int bnxt_hwrm_func_cfg_def_cp(struct bnxt *bp)\n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n \treq.fid = rte_cpu_to_le_16(0xffff);\n-\treq.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);\n+\treq.flags = rte_cpu_to_le_32(bp->pf->func_cfg_flags);\n \treq.enables = rte_cpu_to_le_32(\n \t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR);\n \treq.async_event_cr = rte_cpu_to_le_16(\n@@ -3658,12 +3659,12 @@ int bnxt_hwrm_set_default_vlan(struct bnxt *bp, int vf, uint8_t is_vf)\n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n \tif (is_vf) {\n-\t\tdflt_vlan = bp->pf.vf_info[vf].dflt_vlan;\n-\t\tfid = bp->pf.vf_info[vf].fid;\n-\t\tfunc_cfg_flags = bp->pf.vf_info[vf].func_cfg_flags;\n+\t\tdflt_vlan = bp->pf->vf_info[vf].dflt_vlan;\n+\t\tfid = bp->pf->vf_info[vf].fid;\n+\t\tfunc_cfg_flags = bp->pf->vf_info[vf].func_cfg_flags;\n \t} else {\n \t\tfid = rte_cpu_to_le_16(0xffff);\n-\t\tfunc_cfg_flags = bp->pf.func_cfg_flags;\n+\t\tfunc_cfg_flags = bp->pf->func_cfg_flags;\n \t\tdflt_vlan = bp->vlan;\n \t}\n \n@@ -3689,9 +3690,9 @@ int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,\n \n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \treq.enables |= rte_cpu_to_le_32(enables);\n-\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);\n+\treq.flags = rte_cpu_to_le_32(bp->pf->vf_info[vf].func_cfg_flags);\n \treq.max_bw = rte_cpu_to_le_32(max_bw);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n@@ -3709,10 +3710,10 @@ int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf)\n \n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n-\treq.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);\n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.flags = rte_cpu_to_le_32(bp->pf->vf_info[vf].func_cfg_flags);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \treq.enables |= rte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_VLAN);\n-\treq.dflt_vlan = rte_cpu_to_le_16(bp->pf.vf_info[vf].dflt_vlan);\n+\treq.dflt_vlan = rte_cpu_to_le_16(bp->pf->vf_info[vf].dflt_vlan);\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n@@ -3766,7 +3767,7 @@ int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,\n \n \tHWRM_PREP(&req, HWRM_FUNC_QCFG, BNXT_USE_CHIMP_MB);\n \n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n \tHWRM_CHECK_RESULT();\n@@ -3843,7 +3844,7 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp)\n {\n \tstruct hwrm_port_qstats_input req = {0};\n \tstruct hwrm_port_qstats_output *resp = bp->hwrm_cmd_resp_addr;\n-\tstruct bnxt_pf_info *pf = &bp->pf;\n+\tstruct bnxt_pf_info *pf = bp->pf;\n \tint rc;\n \n \tHWRM_PREP(&req, HWRM_PORT_QSTATS, BNXT_USE_CHIMP_MB);\n@@ -3863,7 +3864,7 @@ int bnxt_hwrm_port_clr_stats(struct bnxt *bp)\n {\n \tstruct hwrm_port_clr_stats_input req = {0};\n \tstruct hwrm_port_clr_stats_output *resp = bp->hwrm_cmd_resp_addr;\n-\tstruct bnxt_pf_info *pf = &bp->pf;\n+\tstruct bnxt_pf_info *pf = bp->pf;\n \tint rc;\n \n \t/* Not allowed on NS2 device, NPAR, MultiHost, VF */\n@@ -3892,7 +3893,7 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)\n \t\treturn 0;\n \n \tHWRM_PREP(&req, HWRM_PORT_LED_QCAPS, BNXT_USE_CHIMP_MB);\n-\treq.port_id = bp->pf.port_id;\n+\treq.port_id = bp->pf->port_id;\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n \tHWRM_CHECK_RESULT();\n@@ -3939,7 +3940,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)\n \t\tled_state = HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT;\n \t\tduration = rte_cpu_to_le_16(500);\n \t}\n-\treq.port_id = bp->pf.port_id;\n+\treq.port_id = bp->pf->port_id;\n \treq.num_leds = bp->leds->num_leds;\n \tled_cfg = (struct bnxt_led_cfg *)&req.led0_id;\n \tfor (i = 0; i < bp->leds->num_leds; i++, led_cfg++) {\n@@ -4151,8 +4152,8 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,\n \t/* First query all VNIC ids */\n \tHWRM_PREP(&req, HWRM_FUNC_VF_VNIC_IDS_QUERY, BNXT_USE_CHIMP_MB);\n \n-\treq.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf);\n-\treq.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);\n+\treq.vf_id = rte_cpu_to_le_16(bp->pf->first_vf_id + vf);\n+\treq.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf->total_vnics);\n \treq.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_malloc_virt2iova(vnic_ids));\n \n \tif (req.vnic_id_tbl_addr == RTE_BAD_IOVA) {\n@@ -4187,7 +4188,7 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,\n \tsize_t sz;\n \n \t/* First query all VNIC ids */\n-\tvnic_id_sz = bp->pf.total_vnics * sizeof(*vnic_ids);\n+\tvnic_id_sz = bp->pf->total_vnics * sizeof(*vnic_ids);\n \tvnic_ids = rte_malloc(\"bnxt_hwrm_vf_vnic_ids_query\", vnic_id_sz,\n \t\t\tRTE_CACHE_LINE_SIZE);\n \tif (vnic_ids == NULL)\n@@ -4206,7 +4207,7 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,\n \tfor (i = 0; i < num_vnic_ids; i++) {\n \t\tmemset(&vnic, 0, sizeof(struct bnxt_vnic_info));\n \t\tvnic.fw_vnic_id = rte_le_to_cpu_16(vnic_ids[i]);\n-\t\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic, bp->pf.first_vf_id + vf);\n+\t\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic, bp->pf->first_vf_id + vf);\n \t\tif (rc)\n \t\t\tbreak;\n \t\tif (vnic.mru <= 4)\t/* Indicates unallocated */\n@@ -4233,7 +4234,7 @@ int bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(struct bnxt *bp, uint16_t vf,\n \n \tHWRM_PREP(&req, HWRM_FUNC_CFG, BNXT_USE_CHIMP_MB);\n \n-\treq.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);\n+\treq.fid = rte_cpu_to_le_16(bp->pf->vf_info[vf].fid);\n \treq.enables |= rte_cpu_to_le_32(\n \t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE);\n \treq.vlan_antispoof_mode = on ?\n@@ -4256,7 +4257,7 @@ int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)\n \tsize_t sz;\n \tint rc;\n \n-\tvnic_id_sz = bp->pf.total_vnics * sizeof(*vnic_ids);\n+\tvnic_id_sz = bp->pf->total_vnics * sizeof(*vnic_ids);\n \tvnic_ids = rte_malloc(\"bnxt_hwrm_vf_vnic_ids_query\", vnic_id_sz,\n \t\t\tRTE_CACHE_LINE_SIZE);\n \tif (vnic_ids == NULL)\n@@ -4279,7 +4280,7 @@ int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)\n \t\tmemset(&vnic, 0, sizeof(struct bnxt_vnic_info));\n \t\tvnic.fw_vnic_id = rte_le_to_cpu_16(vnic_ids[i]);\n \t\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic,\n-\t\t\t\t\tbp->pf.first_vf_id + vf);\n+\t\t\t\t\tbp->pf->first_vf_id + vf);\n \t\tif (rc)\n \t\t\tgoto exit;\n \t\tif (vnic.func_default) {\n@@ -4885,7 +4886,7 @@ int bnxt_hwrm_ext_port_qstats(struct bnxt *bp)\n {\n \tstruct hwrm_port_qstats_ext_input req = {0};\n \tstruct hwrm_port_qstats_ext_output *resp = bp->hwrm_cmd_resp_addr;\n-\tstruct bnxt_pf_info *pf = &bp->pf;\n+\tstruct bnxt_pf_info *pf = bp->pf;\n \tint rc;\n \n \tif (!(bp->flags & BNXT_FLAG_EXT_RX_PORT_STATS ||\n@@ -5204,7 +5205,7 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)\n \t}\n \n \treq.flags = rte_cpu_to_le_32(flags);\n-\treq.port_id = rte_cpu_to_le_16(bp->pf.port_id);\n+\treq.port_id = rte_cpu_to_le_16(bp->pf->port_id);\n \n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \ndiff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c\nindex 2df486592..eafc1d386 100644\n--- a/drivers/net/bnxt/rte_pmd_bnxt.c\n+++ b/drivers/net/bnxt/rte_pmd_bnxt.c\n@@ -64,9 +64,9 @@ int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)\n \t}\n \n \tif (on)\n-\t\tbp->pf.evb_mode = BNXT_EVB_MODE_VEB;\n+\t\tbp->pf->evb_mode = BNXT_EVB_MODE_VEB;\n \telse\n-\t\tbp->pf.evb_mode = BNXT_EVB_MODE_VEPA;\n+\t\tbp->pf->evb_mode = BNXT_EVB_MODE_VEPA;\n \n \trc = bnxt_hwrm_pf_evb_mode(bp);\n \n@@ -118,7 +118,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)\n \t}\n \n \t/* Stall all active VFs */\n-\tfor (i = 0; i < bp->pf.active_vfs; i++) {\n+\tfor (i = 0; i < bp->pf->active_vfs; i++) {\n \t\trc = bnxt_hwrm_func_vf_vnic_query_and_config(bp, i,\n \t\t\t\trte_pmd_bnxt_set_all_queues_drop_en_cb, &on,\n \t\t\t\tbnxt_hwrm_vnic_cfg);\n@@ -197,10 +197,10 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,\n \t}\n \tbp = eth_dev->data->dev_private;\n \n-\tif (!bp->pf.active_vfs)\n+\tif (!bp->pf->active_vfs)\n \t\treturn -EINVAL;\n \n-\tif (vf >= bp->pf.max_vfs)\n+\tif (vf >= bp->pf->max_vfs)\n \t\treturn -EINVAL;\n \n \t/* Add up the per queue BW and configure MAX BW of the VF */\n@@ -216,14 +216,14 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,\n \t}\n \n \t/* Requested BW already configured */\n-\tif (tot_rate == bp->pf.vf_info[vf].max_tx_rate)\n+\tif (tot_rate == bp->pf->vf_info[vf].max_tx_rate)\n \t\treturn 0;\n \n \trc = bnxt_hwrm_func_bw_cfg(bp, vf, tot_rate,\n \t\t\t\tHWRM_FUNC_CFG_INPUT_ENABLES_MAX_BW);\n \n \tif (!rc)\n-\t\tbp->pf.vf_info[vf].max_tx_rate = tot_rate;\n+\t\tbp->pf->vf_info[vf].max_tx_rate = tot_rate;\n \n \treturn rc;\n }\n@@ -265,10 +265,10 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)\n \t\treturn -EINVAL;\n \n \t/* Prev setting same as new setting. */\n-\tif (on == bp->pf.vf_info[vf].mac_spoof_en)\n+\tif (on == bp->pf->vf_info[vf].mac_spoof_en)\n \t\treturn 0;\n \n-\tfunc_flags = bp->pf.vf_info[vf].func_cfg_flags;\n+\tfunc_flags = bp->pf->vf_info[vf].func_cfg_flags;\n \tfunc_flags &= ~(HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE |\n \t    HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE);\n \n@@ -281,8 +281,8 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)\n \n \trc = bnxt_hwrm_func_cfg_vf_set_flags(bp, vf, func_flags);\n \tif (!rc) {\n-\t\tbp->pf.vf_info[vf].mac_spoof_en = on;\n-\t\tbp->pf.vf_info[vf].func_cfg_flags = func_flags;\n+\t\tbp->pf->vf_info[vf].mac_spoof_en = on;\n+\t\tbp->pf->vf_info[vf].func_cfg_flags = func_flags;\n \t}\n \n \treturn rc;\n@@ -325,12 +325,12 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)\n \n \trc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on);\n \tif (!rc) {\n-\t\tbp->pf.vf_info[vf].vlan_spoof_en = on;\n+\t\tbp->pf->vf_info[vf].vlan_spoof_en = on;\n \t\tif (on) {\n \t\t\tif (bnxt_hwrm_cfa_vlan_antispoof_cfg(bp,\n-\t\t\t\tbp->pf.first_vf_id + vf,\n-\t\t\t\tbp->pf.vf_info[vf].vlan_count,\n-\t\t\t\tbp->pf.vf_info[vf].vlan_as_table))\n+\t\t\t\tbp->pf->first_vf_id + vf,\n+\t\t\t\tbp->pf->vf_info[vf].vlan_count,\n+\t\t\t\tbp->pf->vf_info[vf].vlan_as_table))\n \t\t\t\trc = -1;\n \t\t}\n \t} else {\n@@ -415,7 +415,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,\n \t}\n \tbp = dev->data->dev_private;\n \n-\tif (!bp->pf.vf_info)\n+\tif (!bp->pf->vf_info)\n \t\treturn -EINVAL;\n \n \tif (vf >= bp->pdev->max_vfs)\n@@ -436,13 +436,13 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,\n \t\tflag |= BNXT_VNIC_INFO_ALLMULTI | BNXT_VNIC_INFO_MCAST;\n \n \tif (on)\n-\t\tbp->pf.vf_info[vf].l2_rx_mask |= flag;\n+\t\tbp->pf->vf_info[vf].l2_rx_mask |= flag;\n \telse\n-\t\tbp->pf.vf_info[vf].l2_rx_mask &= ~flag;\n+\t\tbp->pf->vf_info[vf].l2_rx_mask &= ~flag;\n \n \trc = bnxt_hwrm_func_vf_vnic_query_and_config(bp, vf,\n \t\t\t\t\tvf_vnic_set_rxmask_cb,\n-\t\t\t\t\t&bp->pf.vf_info[vf].l2_rx_mask,\n+\t\t\t\t\t&bp->pf->vf_info[vf].l2_rx_mask,\n \t\t\t\t\tbnxt_set_rx_mask_no_vlan);\n \tif (rc)\n \t\tPMD_DRV_LOG(ERR, \"bnxt_hwrm_func_vf_vnic_set_rxmask failed\\n\");\n@@ -475,10 +475,10 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)\n \t\tmemset(&vnic, 0, sizeof(vnic));\n \t\tvnic.fw_vnic_id = dflt_vnic;\n \t\tif (bnxt_hwrm_vnic_qcfg(bp, &vnic,\n-\t\t\t\t\tbp->pf.first_vf_id + vf) == 0) {\n+\t\t\t\t\tbp->pf->first_vf_id + vf) == 0) {\n \t\t\tif (bnxt_hwrm_cfa_l2_set_rx_mask(bp, &vnic,\n-\t\t\t\t\t\tbp->pf.vf_info[vf].vlan_count,\n-\t\t\t\t\t\tbp->pf.vf_info[vf].vlan_table))\n+\t\t\t\t\t\tbp->pf->vf_info[vf].vlan_count,\n+\t\t\t\t\t\tbp->pf->vf_info[vf].vlan_table))\n \t\t\t\trc = -1;\n \t\t} else {\n \t\t\trc = -1;\n@@ -506,19 +506,19 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,\n \t\treturn -ENOTSUP;\n \n \tbp = dev->data->dev_private;\n-\tif (!bp->pf.vf_info)\n+\tif (!bp->pf->vf_info)\n \t\treturn -EINVAL;\n \n \tfor (i = 0; vf_mask; i++, vf_mask >>= 1) {\n-\t\tcnt = bp->pf.vf_info[i].vlan_count;\n+\t\tcnt = bp->pf->vf_info[i].vlan_count;\n \t\tif ((vf_mask & 1)  == 0)\n \t\t\tcontinue;\n \n-\t\tif (bp->pf.vf_info[i].vlan_table == NULL) {\n+\t\tif (bp->pf->vf_info[i].vlan_table == NULL) {\n \t\t\trc = -1;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (bp->pf.vf_info[i].vlan_as_table == NULL) {\n+\t\tif (bp->pf->vf_info[i].vlan_as_table == NULL) {\n \t\t\trc = -1;\n \t\t\tcontinue;\n \t\t}\n@@ -526,7 +526,8 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,\n \t\t\t/* First, search for a duplicate... */\n \t\t\tfor (j = 0; j < cnt; j++) {\n \t\t\t\tif (rte_be_to_cpu_16(\n-\t\t\t\t   bp->pf.vf_info[i].vlan_table[j].vid) == vlan)\n+\t\t\t\t   bp->pf->vf_info[i].vlan_table[j].vid) ==\n+\t\t\t\t    vlan)\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (j == cnt) {\n@@ -543,17 +544,17 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,\n \t\t\t\t}\n \n \t\t\t\t/* cnt is one less than vlan_count */\n-\t\t\t\tcnt = bp->pf.vf_info[i].vlan_count++;\n+\t\t\t\tcnt = bp->pf->vf_info[i].vlan_count++;\n \t\t\t\t/*\n \t\t\t\t * And finally, add to the\n \t\t\t\t * end of the table\n \t\t\t\t */\n-\t\t\t\tvase = &bp->pf.vf_info[i].vlan_as_table[cnt];\n+\t\t\t\tvase = &bp->pf->vf_info[i].vlan_as_table[cnt];\n \t\t\t\t// TODO: Hardcoded TPID\n \t\t\t\tvase->tpid = rte_cpu_to_be_16(0x8100);\n \t\t\t\tvase->vid = rte_cpu_to_be_16(vlan);\n \t\t\t\tvase->mask = rte_cpu_to_be_16(0xfff);\n-\t\t\t\tve = &bp->pf.vf_info[i].vlan_table[cnt];\n+\t\t\t\tve = &bp->pf->vf_info[i].vlan_table[cnt];\n \t\t\t\t/* TODO: Hardcoded TPID */\n \t\t\t\tve->tpid = rte_cpu_to_be_16(0x8100);\n \t\t\t\tve->vid = rte_cpu_to_be_16(vlan);\n@@ -561,18 +562,19 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,\n \t\t} else {\n \t\t\tfor (j = 0; j < cnt; j++) {\n \t\t\t\tif (rte_be_to_cpu_16(\n-\t\t\t\t   bp->pf.vf_info[i].vlan_table[j].vid) != vlan)\n+\t\t\t\t   bp->pf->vf_info[i].vlan_table[j].vid) !=\n+\t\t\t\t    vlan)\n \t\t\t\t\tcontinue;\n-\t\t\t\tmemmove(&bp->pf.vf_info[i].vlan_table[j],\n-\t\t\t\t\t&bp->pf.vf_info[i].vlan_table[j + 1],\n+\t\t\t\tmemmove(&bp->pf->vf_info[i].vlan_table[j],\n+\t\t\t\t\t&bp->pf->vf_info[i].vlan_table[j + 1],\n \t\t\t\t\tgetpagesize() - ((j + 1) *\n \t\t\t\t\tsizeof(struct bnxt_vlan_table_entry)));\n-\t\t\t\tmemmove(&bp->pf.vf_info[i].vlan_as_table[j],\n-\t\t\t\t\t&bp->pf.vf_info[i].vlan_as_table[j + 1],\n+\t\t\t\tmemmove(&bp->pf->vf_info[i].vlan_as_table[j],\n+\t\t\t\t\t&bp->pf->vf_info[i].vlan_as_table[j + 1],\n \t\t\t\t\tgetpagesize() - ((j + 1) * sizeof(struct\n \t\t\t\t\tbnxt_vlan_antispoof_table_entry)));\n \t\t\t\tj--;\n-\t\t\t\tcnt = --bp->pf.vf_info[i].vlan_count;\n+\t\t\t\tcnt = --bp->pf->vf_info[i].vlan_count;\n \t\t\t}\n \t\t}\n \t\tbnxt_set_vf_table(bp, i);\n@@ -614,7 +616,7 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,\n \t\treturn -ENOTSUP;\n \t}\n \n-\treturn bnxt_hwrm_func_qstats(bp, bp->pf.first_vf_id + vf_id, stats,\n+\treturn bnxt_hwrm_func_qstats(bp, bp->pf->first_vf_id + vf_id, stats,\n \t\t\t\t     NULL);\n }\n \n@@ -650,7 +652,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,\n \t\treturn -ENOTSUP;\n \t}\n \n-\treturn bnxt_hwrm_func_clr_stats(bp, bp->pf.first_vf_id + vf_id);\n+\treturn bnxt_hwrm_func_clr_stats(bp, bp->pf->first_vf_id + vf_id);\n }\n \n int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)\n@@ -719,7 +721,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,\n \t\treturn -ENOTSUP;\n \t}\n \n-\treturn bnxt_hwrm_func_qstats_tx_drop(bp, bp->pf.first_vf_id + vf_id,\n+\treturn bnxt_hwrm_func_qstats_tx_drop(bp, bp->pf->first_vf_id + vf_id,\n \t\t\t\t\t     count);\n }\n \n@@ -759,7 +761,7 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,\n \t}\n \n \t/* If the VF currently uses a random MAC, update default to this one */\n-\tif (bp->pf.vf_info[vf_id].random_mac) {\n+\tif (bp->pf->vf_info[vf_id].random_mac) {\n \t\tif (rte_pmd_bnxt_get_vf_rx_status(port, vf_id) <= 0)\n \t\t\tbnxt_hwrm_func_vf_mac(bp, vf_id, (uint8_t *)addr);\n \t}\n@@ -771,11 +773,11 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,\n \n \tmemset(&vnic, 0, sizeof(struct bnxt_vnic_info));\n \tvnic.fw_vnic_id = rte_le_to_cpu_16(rc);\n-\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic, bp->pf.first_vf_id + vf_id);\n+\trc = bnxt_hwrm_vnic_qcfg(bp, &vnic, bp->pf->first_vf_id + vf_id);\n \tif (rc < 0)\n \t\tgoto exit;\n \n-\tSTAILQ_FOREACH(filter, &bp->pf.vf_info[vf_id].filter, next) {\n+\tSTAILQ_FOREACH(filter, &bp->pf->vf_info[vf_id].filter, next) {\n \t\tif (filter->flags ==\n \t\t    HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX &&\n \t\t    filter->enables ==\n@@ -841,9 +843,9 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,\n \t\treturn -ENOTSUP;\n \t}\n \n-\tbp->pf.vf_info[vf].dflt_vlan = vlan_id;\n+\tbp->pf->vf_info[vf].dflt_vlan = vlan_id;\n \tif (bnxt_hwrm_func_qcfg_current_vf_vlan(bp, vf) ==\n-\t    bp->pf.vf_info[vf].dflt_vlan)\n+\t    bp->pf->vf_info[vf].dflt_vlan)\n \t\treturn 0;\n \n \trc = bnxt_hwrm_set_vf_vlan(bp, vf);\n@@ -886,10 +888,10 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)\n \t\treturn -EINVAL;\n \n \t/* Prev setting same as new setting. */\n-\tif (on == bp->pf.vf_info[vf].persist_stats)\n+\tif (on == bp->pf->vf_info[vf].persist_stats)\n \t\treturn 0;\n \n-\tfunc_flags = bp->pf.vf_info[vf].func_cfg_flags;\n+\tfunc_flags = bp->pf->vf_info[vf].func_cfg_flags;\n \n \tif (on)\n \t\tfunc_flags |=\n@@ -900,8 +902,8 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)\n \n \trc = bnxt_hwrm_func_cfg_vf_set_flags(bp, vf, func_flags);\n \tif (!rc) {\n-\t\tbp->pf.vf_info[vf].persist_stats = on;\n-\t\tbp->pf.vf_info[vf].func_cfg_flags = func_flags;\n+\t\tbp->pf->vf_info[vf].persist_stats = on;\n+\t\tbp->pf->vf_info[vf].func_cfg_flags = func_flags;\n \t}\n \n \treturn rc;\n",
    "prefixes": [
        "v1",
        "6/9"
    ]
}