patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] net/bnxt: log failure for switch domain free
@ 2020-10-30  7:03 Somnath Kotur
  2020-10-30  7:03 ` [dpdk-stable] [PATCH 2/2] net/bnxt: pass dev args by reference Somnath Kotur
  2020-11-01  3:18 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: log failure for switch domain free Ajit Khaparde
  0 siblings, 2 replies; 4+ messages in thread
From: Somnath Kotur @ 2020-10-30  7:03 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Somnath Kotur, stable, Kalesh Anakkur Purayil

Check and log an error message if switch domain free API fails

Coverity issue: 362757

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, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b2f72ea..31e94f2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1343,8 +1343,14 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
 
 static void bnxt_free_switch_domain(struct bnxt *bp)
 {
-	if (bp->switch_domain_id)
-		rte_eth_switch_domain_free(bp->switch_domain_id);
+	int rc = 0;
+
+	if (bp->switch_domain_id) {
+		rc = rte_eth_switch_domain_free(bp->switch_domain_id);
+		if (rc)
+			PMD_DRV_LOG(ERR, "free switch domain:%d fail: %d\n",
+				    bp->switch_domain_id, rc);
+	}
 }
 
 /* Unload the driver, release resources */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-01  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-stable] [PATCH 2/2] net/bnxt: pass dev args by reference Somnath Kotur
2020-11-01  3:19   ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
2020-11-01  3:18 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: log failure for switch domain free Ajit Khaparde

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