diff mbox series

[v2] net/bnxt: add a check in bnxt PCI probe

Message ID 20200925104044.24872-1-somnath.kotur@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series [v2] net/bnxt: add a check in bnxt PCI probe | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Somnath Kotur Sept. 25, 2020, 10:40 a.m. UTC
Check for num_rep before invoking rep port probe.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
v2: Check against num_rep instead of devargs ptr
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ferruh Yigit Sept. 25, 2020, 11:56 a.m. UTC | #1
On 9/25/2020 11:40 AM, Somnath Kotur wrote:
> Check for num_rep before invoking rep port probe.
> 
> Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
> 
> 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>

Applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index db2f0dde4..ab25dd1b1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6147,6 +6147,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);