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 09FE4A052F for ; Tue, 11 Feb 2020 12:35:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D03B71BFA8; Tue, 11 Feb 2020 12:35:03 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 173251BDFD for ; Tue, 11 Feb 2020 12:35:01 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id z7so11865965wrl.13 for ; Tue, 11 Feb 2020 03:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3LznIRyLxrfTPWkXybMktzsnCxaqbRnLQ+iheAh1r+4=; b=bNMQ4Sh4Ex7fnXBptS0vliCMslcXIsHOFcXZJZuZUeRYKLt7GbQxd7RSsrvgGvlLn6 0mmCSU1Y1uhuV0x3axrRILEMfvtk0klcwPx3+3cXtbtzkf/RnzzQxT44rAK3MmFk88oa jtIRnDhSVDhn8pHOVKynjbvmye0+SIV9nUc5/OnlzfJ7+Rn2ej5t7GC1J2Q0I21y9aTy svAo0kBZ10tJ3XUYrC1ipXuUqJkyztjlx1+p4puBWepYTxtPjEvPL9GdniG3u9P5FqHO vnTuChoo4889CRXZT0PKpYCpoLgnRHP64VZqUfWI5e+Zol5IE/i8eSUdnyvafFY1im2A 6SDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3LznIRyLxrfTPWkXybMktzsnCxaqbRnLQ+iheAh1r+4=; b=lispS6LIYwnkNWug3Alg3tlyox0wOruchB3MBIo1nSwz81TLLGXNb2+SuWpRZ/4Fza C5u4ymqDHi35cSmNqj4MI+RFfUcZU9yzlEDeL9aUTiA1fAP+S2di0AMJToeIhTvW5gCD FzKfH4uBCLEoNzhKAEJLsN8k8gN92C8D9UuFTxgVjwfha8bkg1/6MWepsybasU8ljx6P hnwoFHd7e/IlO2xPS3q/bvjRg6KXXkwMZr8gM0ZIkAGpsGmFH7qjtWkkjhsrddcJNzyk ytZ78C9kCF4eK+vbNxnJewf8QQZ0UwpN+ZRdCrZ7r2t+LATCfvUckjXbNZkNcWLZZARe HtrQ== X-Gm-Message-State: APjAAAXjSNWukVtXmghQKdvKbrToI4HTtXUMlDebefbT3gpvo1jlR+42 Q921MV35ZdZbMtPZYCcY564= X-Google-Smtp-Source: APXvYqwSHDx9CEZ5ca/6VHUWaHRGYD3UnhSmXJ9uy8hFEtVObbWEOy9y/EZWrPz0eiE2gEITuYMUqg== X-Received: by 2002:a5d:5752:: with SMTP id q18mr8462687wrw.277.1581420900649; Tue, 11 Feb 2020 03:35:00 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y139sm3558689wmd.24.2020.02.11.03.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:35:00 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Tue, 11 Feb 2020 11:21:18 +0000 Message-Id: <20200211112216.3929-132-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix IOVA mapping' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 737a87c64741d59cb8ff0d29bda7615ff6091495 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 16 Jan 2020 18:34:48 +0530 Subject: [PATCH] net/bnxt: fix IOVA mapping [ upstream commit 8f3224f2659e2785d3957e91000c0297fff19b9f ] Use rte_malloc_virt2iova() to obtain the IO address of a virtual address obtained through rte_malloc(). Fixed to use the iova address returned by rte_memzone_reserve_aligned() as the call always returns with populating "mz->iova" with rte_malloc_virt2iova(mz->addr). Removed redundant rte_mem_lock_page() call to lock the pages. Fixes: f55e12f33416 ("net/bnxt: support extended port counters") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 49 ---------------------------------- drivers/net/bnxt/bnxt_hwrm.c | 28 ++++++++----------- drivers/net/bnxt/bnxt_ring.c | 17 ------------ drivers/net/bnxt/bnxt_vnic.c | 11 -------- 4 files changed, 11 insertions(+), 94 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index c3fec1561d..b2f30de5bf 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4149,18 +4149,6 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp, memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr) { - PMD_DRV_LOG(DEBUG, - "physical address same as virtual\n"); - PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n"); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "unable to map addr to phys memory\n"); - return -ENOMEM; - } - } - rte_mem_lock_page(((char *)mz->addr)); rmem->pg_tbl = mz->addr; rmem->pg_tbl_map = mz_phys_addr; @@ -4184,22 +4172,8 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp, memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr) { - PMD_DRV_LOG(DEBUG, - "Memzone physical address same as virtual.\n"); - PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n"); - for (sz = 0; sz < mem_size; sz += BNXT_PAGE_SIZE) - rte_mem_lock_page(((char *)mz->addr) + sz); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "unable to map addr to phys memory\n"); - return -ENOMEM; - } - } for (sz = 0, i = 0; sz < mem_size; sz += BNXT_PAGE_SIZE, i++) { - rte_mem_lock_page(((char *)mz->addr) + sz); rmem->pg_arr[i] = ((char *)mz->addr) + sz; rmem->dma_arr[i] = mz_phys_addr + sz; @@ -4376,18 +4350,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) } memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr) { - PMD_DRV_LOG(DEBUG, - "Memzone physical address same as virtual.\n"); - PMD_DRV_LOG(DEBUG, - "Using rte_mem_virt2iova()\n"); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "Can't map address to physical memory\n"); - return -ENOMEM; - } - } bp->rx_mem_zone = (const void *)mz; bp->hw_rx_port_stats = mz->addr; @@ -4414,17 +4376,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) } memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr) { - PMD_DRV_LOG(DEBUG, - "Memzone physical address same as virtual\n"); - PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n"); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "Can't map address to physical memory\n"); - return -ENOMEM; - } - } bp->tx_mem_zone = (const void *)mz; bp->hw_tx_port_stats = mz->addr; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 3319dee6a1..2becf0fbe6 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -309,8 +309,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, if (vlan_table) { if (!(mask & HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN)) mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY; - req.vlan_tag_tbl_addr = rte_cpu_to_le_64( - rte_mem_virt2iova(vlan_table)); + req.vlan_tag_tbl_addr = + rte_cpu_to_le_64(rte_malloc_virt2iova(vlan_table)); req.num_vlan_tags = rte_cpu_to_le_32((uint32_t)vlan_count); } req.mask = rte_cpu_to_le_32(mask); @@ -351,7 +351,7 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid, req.fid = rte_cpu_to_le_16(fid); req.vlan_tag_mask_tbl_addr = - rte_cpu_to_le_64(rte_mem_virt2iova(vlan_table)); + rte_cpu_to_le_64(rte_malloc_virt2iova(vlan_table)); req.num_vlan_entries = rte_cpu_to_le_32((uint32_t)vlan_count); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); @@ -1029,9 +1029,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) rc = -ENOMEM; goto error; } - rte_mem_lock_page(bp->hwrm_cmd_resp_addr); bp->hwrm_cmd_resp_dma_addr = - rte_mem_virt2iova(bp->hwrm_cmd_resp_addr); + rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr); if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "Unable to map response buffer to physical memory.\n"); @@ -1066,9 +1065,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) rc = -ENOMEM; goto error; } - rte_mem_lock_page(bp->hwrm_short_cmd_req_addr); bp->hwrm_short_cmd_req_dma_addr = - rte_mem_virt2iova(bp->hwrm_short_cmd_req_addr); + rte_malloc_virt2iova(bp->hwrm_short_cmd_req_addr); if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) { rte_free(bp->hwrm_short_cmd_req_addr); PMD_DRV_LOG(ERR, @@ -2476,11 +2474,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp) 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); - rte_mem_lock_page(bp->hwrm_cmd_resp_addr); if (bp->hwrm_cmd_resp_addr == NULL) return -ENOMEM; bp->hwrm_cmd_resp_dma_addr = - rte_mem_virt2iova(bp->hwrm_cmd_resp_addr); + rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr); if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); @@ -3426,7 +3423,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp) page_getenum(bp->pf.active_vfs * HWRM_MAX_REQ_LEN)); req.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN); req.req_buf_page_addr0 = - rte_cpu_to_le_64(rte_mem_virt2iova(bp->pf.vf_req_buf)); + rte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf.vf_req_buf)); if (req.req_buf_page_addr0 == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map buffer address to physical memory\n"); @@ -3856,10 +3853,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data) buflen = dir_entries * entry_length; buf = rte_malloc("nvm_dir", buflen, 0); - rte_mem_lock_page(buf); if (buf == NULL) return -ENOMEM; - dma_handle = rte_mem_virt2iova(buf); + dma_handle = rte_malloc_virt2iova(buf); if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); @@ -3890,11 +3886,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index, struct hwrm_nvm_read_output *resp = bp->hwrm_cmd_resp_addr; buf = rte_malloc("nvm_item", length, 0); - rte_mem_lock_page(buf); if (!buf) return -ENOMEM; - dma_handle = rte_mem_virt2iova(buf); + dma_handle = rte_malloc_virt2iova(buf); if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); @@ -3944,11 +3939,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type, uint8_t *buf; buf = rte_malloc("nvm_write", data_len, 0); - rte_mem_lock_page(buf); if (!buf) return -ENOMEM; - dma_handle = rte_mem_virt2iova(buf); + dma_handle = rte_malloc_virt2iova(buf); if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); @@ -4011,7 +4005,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf, req.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf); req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics); - req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_mem_virt2iova(vnic_ids)); + req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_malloc_virt2iova(vnic_ids)); if (req.vnic_id_tbl_addr == RTE_BAD_IOVA) { HWRM_UNLOCK(); diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index ea46fa9bc0..d6e4e8a281 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -110,9 +110,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, uint64_t rx_offloads = bp->eth_dev->data->dev_conf.rxmode.offloads; const struct rte_memzone *mz = NULL; char mz_name[RTE_MEMZONE_NAMESIZE]; - rte_iova_t mz_phys_addr_base; rte_iova_t mz_phys_addr; - int sz; int stats_len = (tx_ring_info || rx_ring_info) ? RTE_CACHE_LINE_ROUNDUP(sizeof(struct hwrm_stat_ctx_query_output) - @@ -214,22 +212,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, return -ENOMEM; } memset(mz->addr, 0, mz->len); - mz_phys_addr_base = mz->iova; mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr_base) { - PMD_DRV_LOG(DEBUG, - "Memzone physical address same as virtual.\n"); - PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n"); - for (sz = 0; sz < total_alloc_len; sz += getpagesize()) - rte_mem_lock_page(((char *)mz->addr) + sz); - mz_phys_addr_base = rte_mem_virt2iova(mz->addr); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "unable to map ring address to physical memory\n"); - return -ENOMEM; - } - } if (tx_ring_info) { txq->mz = mz; diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c index 104342e13b..bc054a8e0e 100644 --- a/drivers/net/bnxt/bnxt_vnic.c +++ b/drivers/net/bnxt/bnxt_vnic.c @@ -150,17 +150,6 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp) return -ENOMEM; } mz_phys_addr = mz->iova; - if ((unsigned long)mz->addr == mz_phys_addr) { - PMD_DRV_LOG(DEBUG, - "Memzone physical address same as virtual.\n"); - PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n"); - mz_phys_addr = rte_mem_virt2iova(mz->addr); - if (mz_phys_addr == RTE_BAD_IOVA) { - PMD_DRV_LOG(ERR, - "unable to map to physical memory\n"); - return -ENOMEM; - } - } for (i = 0; i < max_vnics; i++) { vnic = &bp->vnic_info[i]; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.287986637 +0000 +++ 0132-net-bnxt-fix-IOVA-mapping.patch 2020-02-11 11:17:38.636005760 +0000 @@ -1,8 +1,10 @@ -From 8f3224f2659e2785d3957e91000c0297fff19b9f Mon Sep 17 00:00:00 2001 +From 737a87c64741d59cb8ff0d29bda7615ff6091495 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 16 Jan 2020 18:34:48 +0530 Subject: [PATCH] net/bnxt: fix IOVA mapping +[ upstream commit 8f3224f2659e2785d3957e91000c0297fff19b9f ] + Use rte_malloc_virt2iova() to obtain the IO address of a virtual address obtained through rte_malloc(). @@ -13,7 +15,6 @@ Removed redundant rte_mem_lock_page() call to lock the pages. Fixes: f55e12f33416 ("net/bnxt: support extended port counters") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur @@ -26,10 +27,10 @@ 4 files changed, 11 insertions(+), 94 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c -index 879ea580fe..a948c78cba 100644 +index c3fec1561d..b2f30de5bf 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c -@@ -4233,18 +4233,6 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp, +@@ -4149,18 +4149,6 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp, memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; @@ -48,7 +49,7 @@ rmem->pg_tbl = mz->addr; rmem->pg_tbl_map = mz_phys_addr; -@@ -4268,22 +4256,8 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp, +@@ -4184,22 +4172,8 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp, memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; @@ -71,7 +72,7 @@ rmem->pg_arr[i] = ((char *)mz->addr) + sz; rmem->dma_arr[i] = mz_phys_addr + sz; -@@ -4460,18 +4434,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) +@@ -4376,18 +4350,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) } memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; @@ -90,7 +91,7 @@ bp->rx_mem_zone = (const void *)mz; bp->hw_rx_port_stats = mz->addr; -@@ -4498,17 +4460,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) +@@ -4414,17 +4376,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp) } memset(mz->addr, 0, mz->len); mz_phys_addr = mz->iova; @@ -109,7 +110,7 @@ bp->tx_mem_zone = (const void *)mz; bp->hw_tx_port_stats = mz->addr; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c -index 50272dcf7d..3b013396ba 100644 +index 3319dee6a1..2becf0fbe6 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -309,8 +309,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, @@ -132,7 +133,7 @@ req.num_vlan_entries = rte_cpu_to_le_32((uint32_t)vlan_count); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); -@@ -1024,9 +1024,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) +@@ -1029,9 +1029,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) rc = -ENOMEM; goto error; } @@ -143,7 +144,7 @@ if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "Unable to map response buffer to physical memory.\n"); -@@ -1061,9 +1060,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) +@@ -1066,9 +1065,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp) rc = -ENOMEM; goto error; } @@ -154,7 +155,7 @@ if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) { rte_free(bp->hwrm_short_cmd_req_addr); PMD_DRV_LOG(ERR, -@@ -2471,11 +2469,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp) +@@ -2476,11 +2474,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp) 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); @@ -167,7 +168,7 @@ if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); -@@ -3421,7 +3418,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp) +@@ -3426,7 +3423,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp) page_getenum(bp->pf.active_vfs * HWRM_MAX_REQ_LEN)); req.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN); req.req_buf_page_addr0 = @@ -176,7 +177,7 @@ if (req.req_buf_page_addr0 == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map buffer address to physical memory\n"); -@@ -3851,10 +3848,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data) +@@ -3856,10 +3853,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data) buflen = dir_entries * entry_length; buf = rte_malloc("nvm_dir", buflen, 0); @@ -188,7 +189,7 @@ if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); -@@ -3885,11 +3881,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index, +@@ -3890,11 +3886,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index, struct hwrm_nvm_read_output *resp = bp->hwrm_cmd_resp_addr; buf = rte_malloc("nvm_item", length, 0); @@ -201,7 +202,7 @@ if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); -@@ -3939,11 +3934,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type, +@@ -3944,11 +3939,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type, uint8_t *buf; buf = rte_malloc("nvm_write", data_len, 0); @@ -214,7 +215,7 @@ if (dma_handle == RTE_BAD_IOVA) { PMD_DRV_LOG(ERR, "unable to map response address to physical memory\n"); -@@ -4006,7 +4000,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf, +@@ -4011,7 +4005,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf, req.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf); req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);