patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	stable@dpdk.org,
	Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Subject: [dpdk-stable] [PATCH 2/2] net/bnxt: pass dev args by reference
Date: Fri, 30 Oct 2020 12:33:04 +0530
Message-ID: <20201030070304.22318-2-somnath.kotur@broadcom.com> (raw)
In-Reply-To: <20201030070304.22318-1-somnath.kotur@broadcom.com>

Pass 'eth_da' pointer instead of pass by value to
bnxt_rep_port_probe()

Coverity issue: 360841

Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 31e94f2..6a77e57 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6288,7 +6288,7 @@ static int bnxt_init_rep_info(struct bnxt *bp)
 }
 
 static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
-			       struct rte_eth_devargs eth_da,
+			       struct rte_eth_devargs *eth_da,
 			       struct rte_eth_dev *backing_eth_dev,
 			       const char *dev_args)
 {
@@ -6299,7 +6299,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
 	int i, ret = 0;
 	struct rte_kvargs *kvlist = NULL;
 
-	num_rep = eth_da.nb_representor_ports;
+	num_rep = eth_da->nb_representor_ports;
 	if (num_rep > BNXT_MAX_VF_REPS) {
 		PMD_DRV_LOG(ERR, "nb_representor_ports = %d > %d MAX VF REPS\n",
 			    num_rep, BNXT_MAX_VF_REPS);
@@ -6329,7 +6329,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
 
 	for (i = 0; i < num_rep; i++) {
 		struct bnxt_representor representor = {
-			.vf_id = eth_da.representor_ports[i],
+			.vf_id = eth_da->representor_ports[i],
 			.switch_domain_id = backing_bp->switch_domain_id,
 			.parent_dev = backing_eth_dev
 		};
@@ -6342,7 +6342,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
 
 		/* representor port net_bdf_port */
 		snprintf(name, sizeof(name), "net_%s_representor_%d",
-			 pci_dev->device.name, eth_da.representor_ports[i]);
+			 pci_dev->device.name, eth_da->representor_ports[i]);
 
 		kvlist = rte_kvargs_parse(dev_args, bnxt_dev_args);
 		if (kvlist) {
@@ -6505,7 +6505,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		return ret;
 
 	/* probe representor ports now */
-	ret = bnxt_rep_port_probe(pci_dev, eth_da, backing_eth_dev,
+	ret = bnxt_rep_port_probe(pci_dev, &eth_da, backing_eth_dev,
 				  pci_dev->device.devargs->args);
 
 	return ret;
-- 
2.7.4


  reply	other threads:[~2020-10-30  7:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  7:03 [dpdk-stable] [PATCH 1/2] net/bnxt: log failure for switch domain free Somnath Kotur
2020-10-30  7:03 ` Somnath Kotur [this message]
2020-11-01  3:19   ` [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bnxt: pass dev args by reference Ajit Khaparde
2020-11-01  3:18 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: log failure for switch domain free Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030070304.22318-2-somnath.kotur@broadcom.com \
    --to=somnath.kotur@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git