From: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>

When IOMMU is available, EAL picks IOVA as VA as the default IOVA mode.
This causes the bnxt driver to log warning messages saying
"Memzone physical address same as virtual." and "Using rte_mem_virt2iova()"
during load.

Reduce the verbosity of logs to DEBUG.

Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>
Reviewed-by: Lance Richardson <lance.richard...@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.ko...@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 21 +++++++++------------
 drivers/net/bnxt/bnxt_ring.c   |  7 +++----
 drivers/net/bnxt/bnxt_vnic.c   |  7 +++----
 3 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 76f9e197f..b94c9a122 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3890,10 +3890,9 @@ 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(WARNING,
-                               "Memzone physical address same as virtual.\n");
-                       PMD_DRV_LOG(WARNING,
-                                   "Using rte_mem_virt2iova()\n");
+                       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,
@@ -3926,10 +3925,9 @@ 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(WARNING,
+               PMD_DRV_LOG(DEBUG,
                            "Memzone physical address same as virtual.\n");
-               PMD_DRV_LOG(WARNING,
-                           "Using rte_mem_virt2iova()\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);
@@ -4117,9 +4115,9 @@ 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(WARNING,
+               PMD_DRV_LOG(DEBUG,
                            "Memzone physical address same as virtual.\n");
-               PMD_DRV_LOG(WARNING,
+               PMD_DRV_LOG(DEBUG,
                            "Using rte_mem_virt2iova()\n");
                mz_phys_addr = rte_mem_virt2iova(mz->addr);
                if (mz_phys_addr == RTE_BAD_IOVA) {
@@ -4155,10 +4153,9 @@ 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(WARNING,
+               PMD_DRV_LOG(DEBUG,
                            "Memzone physical address same as virtual\n");
-               PMD_DRV_LOG(WARNING,
-                           "Using rte_mem_virt2iova()\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,
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index f19865c83..2f57e038a 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -212,10 +212,9 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
        mz_phys_addr_base = mz->iova;
        mz_phys_addr = mz->iova;
        if ((unsigned long)mz->addr == mz_phys_addr_base) {
-               PMD_DRV_LOG(WARNING,
-                       "Memzone physical address same as virtual.\n");
-               PMD_DRV_LOG(WARNING,
-                       "Using rte_mem_virt2iova()\n");
+               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);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 98415633e..9ea99388b 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -150,10 +150,9 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
        }
        mz_phys_addr = mz->iova;
        if ((unsigned long)mz->addr == mz_phys_addr) {
-               PMD_DRV_LOG(WARNING,
-                       "Memzone physical address same as virtual.\n");
-               PMD_DRV_LOG(WARNING,
-                       "Using rte_mem_virt2iova()\n");
+               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,
-- 
2.20.1 (Apple Git-117)

Reply via email to