patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: remove logically dead code
       [not found] <cover.1599292452.git.wangyunjian@huawei.com>
@ 2020-09-05  9:36 ` wangyunjian
  2020-09-05  9:36 ` [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bnxt: fix a wrong use of rte_free when freeing mbuf wangyunjian
  1 sibling, 0 replies; 2+ messages in thread
From: wangyunjian @ 2020-09-05  9:36 UTC (permalink / raw)
  To: dev
  Cc: ajit.khaparde, somnath.kotur, jerry.lilijun, xudingke,
	Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

This patch removes logically dead code reported by coverity.

Coverity issue: 360824
Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 6fa9a30d2..e924025cf 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -44,8 +44,6 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 	uint8_t que;
 
 	vfr_eth_dev = &rte_eth_devices[port_id];
-	if (!vfr_eth_dev)
-		return 1;
 	vfr_bp = vfr_eth_dev->data->dev_private;
 	/* If rxq_id happens to be > max rep_queue, use rxq0 */
 	que = queue_id < BNXT_MAX_VF_REP_RINGS ? queue_id : 0;
-- 
2.18.1



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

* [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bnxt: fix a wrong use of rte_free when freeing mbuf
       [not found] <cover.1599292452.git.wangyunjian@huawei.com>
  2020-09-05  9:36 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: remove logically dead code wangyunjian
@ 2020-09-05  9:36 ` wangyunjian
  1 sibling, 0 replies; 2+ messages in thread
From: wangyunjian @ 2020-09-05  9:36 UTC (permalink / raw)
  To: dev
  Cc: ajit.khaparde, somnath.kotur, jerry.lilijun, xudingke,
	Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

We should use rte_pktmbuf_free() instead of rte_free() to free the mbuf.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index e924025cf..26bd0f626 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -61,7 +61,7 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 	} else {
 		vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
 		vfr_bp->rx_drop_pkts[que]++;
-		rte_free(mbuf); /* Representor Rx ring full, drop pkt */
+		rte_pktmbuf_free(mbuf); /* Representor Rx ring full, drop pkt */
 	}
 
 	return 0;
-- 
2.18.1



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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1599292452.git.wangyunjian@huawei.com>
2020-09-05  9:36 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] net/bnxt: remove logically dead code wangyunjian
2020-09-05  9:36 ` [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bnxt: fix a wrong use of rte_free when freeing mbuf wangyunjian

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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