From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 407FEA04A4 for ; Wed, 27 May 2020 11:24:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 39FC91D8F2; Wed, 27 May 2020 11:24:54 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 5AC041D8E1 for ; Wed, 27 May 2020 11:24:52 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id s8so23223880wrt.9 for ; Wed, 27 May 2020 02:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cIgbicFA8g/o4U9EqHqWV9ffEg9lswQ/F9ryZbEFhVQ=; b=bCEVQ3R4RB6u0KkdO5D1/WN/K2zJyFk81bEVLCC/8oEARfP6khPfgJGc65tMnZnKFP FFzWbG89/H9A/je/29k7vO8/YM4O2JJcsqYmVwAkCNMu8s1z/gQWZS4lowsfiTHRIgkE qQ1M6lR3eRoCBh6okTRW3oV2d+wU6jqpm9TGwVepjnNxyLDrzThqeKF+Y6aHpVJfUhBy Ezjng2Ed3XVVnN6fSTErls1+NM3p3fe88lHw/T8E1M0tlZbBK/vc7R0LsHSqBWxvw/b0 aL5nTPcg79zIROBf6Bm03WJg2Vvi/6dbt5v4B1fmAxTFzKaR6+AEK+sleJsv9ibFz0vO y1ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cIgbicFA8g/o4U9EqHqWV9ffEg9lswQ/F9ryZbEFhVQ=; b=Mr6/ssbpa+Z3gU8ZAaWXcKMbtuqDL0/cl+cGbzVajPy3vhJHv41SvKR5mI7uMWbW1v fkxMG2ZA0ELgfHK2lje7A9prvINTjbgHoJGmj6fI+BYJ0DhGbILK8E5iBmEZxbOF3wK2 SFJFUhLiJ9gMPQ9OybzQeb6qwlUNJGK5Fj6K1G1xkFxyWNp0r5fDdpGOCxmqcGtmPT2l Ch9qm8J92THU9Y3eHMbP9fyskKZFyRLZ5/SPWO3BYls40dRgkoVVXPKCLGMLplHQclxd gb6XEDMydfAWqNRIjkninhexwGp3MeOG/iHl9CEv0tIjjQFcSAFx25i02WBYzGoHP7x4 zfAQ== X-Gm-Message-State: AOAM532vKmPY8lkwiTQs0IEXuAVwtHwY6b0a4ZDJbVkMG6wyVjD94D0P EH5UhPLoohvvbaaTO+ZT0yw= X-Google-Smtp-Source: ABdhPJygdtGNZDuX0h4bo8INWLLphTO4L/TaISsvgsdu7OOkXNSRHoHC1zAy71PbfXNaZCE4oCGXBA== X-Received: by 2002:a5d:4488:: with SMTP id j8mr16682529wrq.242.1590571492079; Wed, 27 May 2020 02:24:52 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n9sm2181723wmj.5.2020.05.27.02.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 02:24:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Xiaoyun Wang Cc: dpdk stable Date: Wed, 27 May 2020 10:24:11 +0100 Message-Id: <20200527092422.258652-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527092422.258652-1-luca.boccassi@gmail.com> References: <20200522094022.1025696-43-luca.boccassi@gmail.com> <20200527092422.258652-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hinic: fix TSO' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 --- 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 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@dpdk.org Signed-off-by: Xiaoyun Wang --- @@ -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) {