[dpdk-stable] patch 'net/hinic: fix TSO' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 27 11:24:11 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From bea8e15b59df75a267edf0eed907de8b03a0fc45 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
Date: Wed, 20 May 2020 19:52:59 +0800
Subject: [PATCH] net/hinic: fix TSO

[ upstream commit c6f9f0b7d495b27833077b7904f290f4a69e36ad ]

When TSO MSS is smaller than 80, and the sum length of continuous
sge num is larger than a MSS, which may cause hardware failed,
so in this scenarios pmd driver should adjust the tso_segsz with
the same with the value of hardware supported.

Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 33d8ae2102..05b23d9924 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -423,7 +423,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 					  *poff_info,
 					  struct hinic_wqe_info *sqe_info)
 {
-	u32 total_len, limit_len, checked_len, left_len;
+	u32 total_len, limit_len, checked_len, left_len, adjust_mss;
 	u32 i, first_mss_sges, left_sges;
 	struct rte_mbuf *mbuf_head, *mbuf_pre;
 
@@ -433,7 +433,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 	/* tso sge number validation */
 	if (unlikely(left_sges >= HINIC_NONTSO_PKT_MAX_SGE)) {
 		checked_len = 0;
-		limit_len = mbuf->tso_segsz + poff_info->payload_offset;
+		adjust_mss = mbuf->tso_segsz >= TX_MSS_MIN ?
+				mbuf->tso_segsz : TX_MSS_MIN;
+		limit_len = adjust_mss + poff_info->payload_offset;
 		first_mss_sges = HINIC_NONTSO_PKT_MAX_SGE;
 
 		/* each continues 17 mbufs segmust do one check */
@@ -447,7 +449,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 				mbuf_pre = mbuf;
 				mbuf = mbuf->next;
 				if (total_len >= limit_len) {
-					limit_len = mbuf_head->tso_segsz;
+					limit_len = adjust_mss;
 					break;
 				}
 			}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.922944285 +0100
+++ 0008-net-hinic-fix-TSO.patch	2020-05-27 10:23:31.635933795 +0100
@@ -1,15 +1,16 @@
-From c6f9f0b7d495b27833077b7904f290f4a69e36ad Mon Sep 17 00:00:00 2001
+From bea8e15b59df75a267edf0eed907de8b03a0fc45 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
 Date: Wed, 20 May 2020 19:52:59 +0800
 Subject: [PATCH] net/hinic: fix TSO
 
+[ upstream commit c6f9f0b7d495b27833077b7904f290f4a69e36ad ]
+
 When TSO MSS is smaller than 80, and the sum length of continuous
 sge num is larger than a MSS, which may cause hardware failed,
 so in this scenarios pmd driver should adjust the tso_segsz with
 the same with the value of hardware supported.
 
 Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
-index bd39f9364f..4d999678fa 100644
+index 33d8ae2102..05b23d9924 100644
 --- a/drivers/net/hinic/hinic_pmd_tx.c
 +++ b/drivers/net/hinic/hinic_pmd_tx.c
-@@ -455,7 +455,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -423,7 +423,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  					  *poff_info,
  					  struct hinic_wqe_info *sqe_info)
  {
@@ -29,7 +30,7 @@
  	u32 i, first_mss_sges, left_sges;
  	struct rte_mbuf *mbuf_head, *mbuf_pre;
  
-@@ -465,7 +465,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -433,7 +433,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  	/* tso sge number validation */
  	if (unlikely(left_sges >= HINIC_NONTSO_PKT_MAX_SGE)) {
  		checked_len = 0;
@@ -40,7 +41,7 @@
  		first_mss_sges = HINIC_NONTSO_PKT_MAX_SGE;
  
  		/* each continues 17 mbufs segmust do one check */
-@@ -479,7 +481,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -447,7 +449,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  				mbuf_pre = mbuf;
  				mbuf = mbuf->next;
  				if (total_len >= limit_len) {


More information about the stable mailing list