net/bnxt: check representors devargs before probe
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 25 Sep 2020 10:40:44 +0000 (16:10 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:10 +0000 (19:19 +0200)
Check for num_rep before invoking rep port probe. num_rep should be !=0
if representor devargs provided.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/bnxt/bnxt_ethdev.c

index af392bf..b99c712 100644 (file)
@@ -6472,6 +6472,10 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        }
        PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci probe\n",
                    backing_eth_dev->data->port_id);
+
+       if (!num_rep)
+               return ret;
+
        /* probe representor ports now */
        ret = bnxt_rep_port_probe(pci_dev, eth_da, backing_eth_dev,
                                  pci_dev->device.devargs->args);