From patchwork Tue Mar 23 13:45:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 89707 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE263A09E4; Tue, 23 Mar 2021 14:46:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 071EE140ECF; Tue, 23 Mar 2021 14:45:44 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id 8823C140EAA for ; Tue, 23 Mar 2021 14:45:38 +0100 (CET) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F4XdP5y0Sz92M7 for ; Tue, 23 Mar 2021 21:43:37 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Tue, 23 Mar 2021 21:45:31 +0800 From: "Min Hu (Connor)" To: , Date: Tue, 23 Mar 2021 21:45:53 +0800 Message-ID: <1616507156-35880-4-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1616507156-35880-1-git-send-email-humin29@huawei.com> References: <1616507156-35880-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 3/6] net/hns3: fix TCP SEG and TCP CKSUM flag set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengchang Tang Currently, if the PKT_TX_TCP_SEG and PKT_TX_TCP_CKSUM set in the same time, hns3 PMD can not process the descriptors correctly. This patch fix it by adding the processing of this situation. Fixes: fb6eb9009f41 ("net/hns3: fix Tx checksum with fixed header length") Cc: stable@dpdk.org Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index ba30086..a76dfa5 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -3372,6 +3372,7 @@ hns3_parse_l4_cksum_params(struct rte_mbuf *m, uint32_t *type_cs_vlan_tso_len) uint32_t tmp; /* Enable L4 checksum offloads */ switch (ol_flags & (PKT_TX_L4_MASK | PKT_TX_TCP_SEG)) { + case PKT_TX_TCP_CKSUM | PKT_TX_TCP_SEG: case PKT_TX_TCP_CKSUM: case PKT_TX_TCP_SEG: tmp = *type_cs_vlan_tso_len;