From 9160c5663e6280e082ff24ec883ad88260498b6f Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Fri, 25 Sep 2020 16:10:44 +0530 Subject: [PATCH] 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 --- drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.20.1