From: Somnath Kotur Date: Fri, 25 Sep 2020 10:40:44 +0000 (+0530) Subject: net/bnxt: check representors devargs before probe X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9160c5663e6280e082ff24ec883ad88260498b6f;p=dpdk.git net/bnxt: check representors devargs before probe 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 Reviewed-by: Venkat Duvvuru Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index af392bffc1..b99c712acb 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -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);