patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-04  8:55 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-04  8:55 UTC (permalink / raw)
  To: 277600718; +Cc: root, stable, Junjie Lin

From: root <root@localhost.localdomain>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1


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

* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-07 12:33 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-07 12:33 UTC (permalink / raw)
  To: 277600718; +Cc: Junjie Lin, stable

From: Junjie Lin <linjunjie6@huawei.com>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1



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

* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-07  2:01 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-07  2:01 UTC (permalink / raw)
  To: 277600718; +Cc: root, stable, Junjie Lin

From: root <root@localhost.localdomain>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1



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

* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-04  9:13 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-04  9:13 UTC (permalink / raw)
  To: 277600718; +Cc: root, stable, Junjie Lin

From: root <root@localhost.localdomain>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1


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

* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-04  9:10 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-04  9:10 UTC (permalink / raw)
  To: 277600718; +Cc: root, stable, Junjie Lin

From: root <root@localhost.localdomain>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1


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

* [PATCH] net/hinic: fix Tx mbuf lenght problem
@ 2022-03-04  8:52 Junjie Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Junjie Lin @ 2022-03-04  8:52 UTC (permalink / raw)
  To: 277600718; +Cc: root, stable, Junjie Lin

From: root <root@localhost.localdomain>

The Tx mbuf needs to be ignored if the pkt_len member is zero.

Fixes: 54faba2295bd ("net/hinic:adds Tx queue xstats members")
Cc: stable@dpdk.org

Signed-off-by: Junjie Lin <linjunjie6@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index f09b1a6..99a5e3a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1144,6 +1144,12 @@ u16 hinic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, u16 nb_pkts)
 		mbuf_pkt = *tx_pkts++;
 		queue_info = 0;
 
+		if (unlikely(mbuf_pkt->pkt_len == 0)) {
+			rte_pktmbuf_free(mbuf_pkt);
+			txq->txq_stats.off_errs++;
+			continue;
+		}
+
 		/* 1. parse sge and tx offload info from mbuf */
 		if (unlikely(!hinic_get_sge_txoff_info(mbuf_pkt,
 						       &sqe_info, &off_info))) {
-- 
1.8.3.1


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

end of thread, other threads:[~2022-03-07 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  8:55 [PATCH] net/hinic: fix Tx mbuf lenght problem Junjie Lin
  -- strict thread matches above, loose matches on Subject: below --
2022-03-07 12:33 Junjie Lin
2022-03-07  2:01 Junjie Lin
2022-03-04  9:13 Junjie Lin
2022-03-04  9:10 Junjie Lin
2022-03-04  8:52 Junjie Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).