[dpdk-dev] [PATCH 5/8] net/bnxt: add a null ptr check in bnxt PCI probe
Ferruh Yigit
ferruh.yigit at intel.com
Thu Sep 24 16:47:36 CEST 2020
On 9/22/2020 8:06 AM, Somnath Kotur wrote:
> Check for devargs before invoking rep port probe.
>
> Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
>
> Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
> Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>
> ---
> 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 db2f0dd..84eba0b 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 (!pci_dev->device.devargs)
> + return ret;
> +
There is already a null check at the beginning of the function because
of the same thing (port representors), should they be combined?
And devargs being not NULL does not really mean it has arguments related
to the port representors, it may have other device devargs. Perhaps
'eth_da' can be used to check?
More information about the dev
mailing list