From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FAA0A0A0E for ; Mon, 10 May 2021 18:13:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8621340140; Mon, 10 May 2021 18:13:54 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2088.outbound.protection.outlook.com [40.107.92.88]) by mails.dpdk.org (Postfix) with ESMTP id A60CF40140 for ; Mon, 10 May 2021 18:13:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lwaBoXwwh+3X4Jn3Rd+PdVP7R+R/wNQFqGQFmcKnZldpV/r1xrWTTAhlaU1PKq0EqdxSytmp03uldx8lTbUursyRptqydgutwpyOxq11S3XgxQDiJniTtTBLiDPu/mX5UPe2zJ+2SBV0A4Xf6I0EfiV7pqBDPDtgt29n7bOI36f8FVBPAhO7sWAo/QO/AgbOc6/AlpQ0bF0KlfQ65z3KDA2fBjNzc4uNH45YjIi0FIsKR2Zo2n65ZX315twDQACv3HeHyp97R8coKSe/3J8ZVJgFIVQ2DrKlRA5AcvDigl46WslCqHYyje/L7j+hogHrdcHeoWdhXkd489iKD7M1Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9RGwiWwnsSHmdyhnZ1dazpXGrmmzsPOgjVSHXe4k/2Y=; b=jzt0BHcDM87KWXtSH/boW9a0oGBI8JpIi7k1ANdvb6nZOgDun06TmI5rCjAAUVHR2l2q3QjhlbRDh0pQx4ct+QsqIJXRPrOm0brU+71fsEzOrtMrmYKecAfJ45a0wOmP6DWDVQ7CbQjuSoKWC1jnFGQb4lzgC6ZBAZUOfdXXLlFmFtOsi5ChRVyQ9VmhngdnahraMWEZW08LBuwropEvolAcfIwt4WWeBKpXF75GeyszrKsDBnGg6vCep3krP2sZH8v/BlEE39tsMbC4ORtZbqUxgUpB7b7QCljYQmouWmhoOlv/lT6Zt+keUWGJJGCbRuguLUni0LMJK7jHqJqWKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9RGwiWwnsSHmdyhnZ1dazpXGrmmzsPOgjVSHXe4k/2Y=; b=metNuQLtMfVjFLWSxh/eQ7yLr31mKqJpXvfrVHSI1hEqkyJ/d0YTO+DToPGuFxtnvdgg5M0sma99DxoJ7nxYTle9GD4N1V9r+b2Qh2oSnIJlTWhrAFwSbCuCTDOzKWW+zBJ/lnVL+Haj5rb/trSrQebaAkFFMreFF9/rbNHzivK2U9SGBT417/wCtZglmMxRAJ/H3a1kJsBsW5GVQuONfE7ZLpLYDCH4uvLm6kkFTnVSRLY6mM6d/Ub02cWLGUA1W5FcqXzNF69cvMeZGwQZzbXBXvyGA2NvbV2hlAf1rWRzyrB0LUSKo3KRAXbMmRoGOQARw5kZIAhFia55CcYuLA== Received: from CO2PR04CA0116.namprd04.prod.outlook.com (2603:10b6:104:7::18) by MWHPR12MB1712.namprd12.prod.outlook.com (2603:10b6:300:112::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:13:51 +0000 Received: from CO1NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:104:7:cafe::7c) by CO2PR04CA0116.outlook.office365.com (2603:10b6:104:7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:13:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT031.mail.protection.outlook.com (10.13.174.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:13:50 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:13:48 +0000 From: Xueming Li To: Chengchang Tang CC: Luca Boccassi , Min Hu , dpdk stable Date: Tue, 11 May 2021 00:00:55 +0800 Message-ID: <20210510160258.30982-106-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adc9d3cd-1bca-44e8-15f5-08d913ce998b X-MS-TrafficTypeDiagnostic: MWHPR12MB1712: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mlQRwyg3hYQcwMYhv6vFAocDvlZhGd3rawprRtGx7edOePQ2twQSzRx75oTzWjo47rYeR/8NLJila2S5NtsIi7RRDSEO4b8U/I17/aqiA7IoEzqNlgjqEY4skRYGhTHDwSV7SaQlQd4ycjvUnSE43rmMV6b4iZRKhh+fBMuTn2Gx0yjIuiv0Z+bhRNHgPEo3hRkDOEvts+5slbtMf3Fb0i5m4v1+DIFBDnka+dGblBYaCIeGCVAU+n5iHTevyA287zVq4+XgNc5QdwY9yI2mfIP2bBW1bozmemjMbyGPRPxP/PsWPZHOts9JR/Q9zrcDVJaD9YuIlY2v4zZK6SERfFoJ9KXmL1duBocCrp/xUC9V0EBvQUX06yjYIP1idSBAN1idHADIDeaKpR9AJZ7knQIsx9akiSzTZp5OJw+4Gu/mmWHr+leuJqzeLdX22hcNyhAGP9jIbI8+4S2Alm5N+5OOtxPsuhw7lKuBvCK7Z0ADGuGnm6wDE0NLfmmYbxHjzYI+ltwkK+O7pM8d/xrJRyLLgDYMVjczDBWlPRZPbQjHJsINJjk5x5eUP8/QiCUlfRyiByekq3SjmOGB76X1MMgzpSkKqn41RYGWVyEn8FpTLi4zF3wnFfy5LJKnzKA0KlWUYqYwJsa6NA/dDeoKETrFvAa45GL1mSUdyIOOmUrInAZnM7xthOKG+vaR9LTvJpsq6+bBLucWcWHEMeUlMpnu5uH0VARuUprSdV0X3L0= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(36840700001)(46966006)(5660300002)(30864003)(82740400003)(36756003)(36860700001)(6286002)(7696005)(478600001)(186003)(54906003)(6666004)(82310400003)(336012)(316002)(8676002)(70206006)(16526019)(70586007)(55016002)(426003)(26005)(47076005)(53546011)(356005)(6916009)(966005)(8936002)(1076003)(4326008)(36906005)(2906002)(2616005)(83380400001)(7636003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:13:50.8876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: adc9d3cd-1bca-44e8-15f5-08d913ce998b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1712 Subject: [dpdk-stable] patch 'net/hns3: fix Tx checksum for UDP packets with special port' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.2 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/12/21. 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. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/7537fafbc7da45d976cb2327b0dcb3706164d254 Thanks. Xueming Li --- >From 7537fafbc7da45d976cb2327b0dcb3706164d254 Mon Sep 17 00:00:00 2001 From: Chengchang Tang Date: Tue, 23 Mar 2021 21:45:54 +0800 Subject: [PATCH] net/hns3: fix Tx checksum for UDP packets with special port Cc: Luca Boccassi [ upstream commit 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 ] For Kunpeng920 network engine, UDP packets with destination port 6081, 4789 or 4790 will be identified as tunnel packets. If the UDP CKSUM offload is set in the mbuf, and the TX tunnel mask is not set, the CKSUM of these packets will be wrong. In this case, the upper layer user may not identify the packet as a tunnel packet, and processes it as non-tunnel packet, and expect to offload the outer UDP CKSUM, so they may not fill the outer L2/L3 length to mbuf. However, the HW identifies these packet as tunnel packets and therefore offload the inner UDP CKSUM. As a result, the inner and outer UDP CKSUM are incorrect. And for non-tunnel UDP packets with preceding special destination port will also exist similar checksum error. For the new generation Kunpeng930 network engine, the above errata have been fixed. Therefore, the concept of udp_cksum_mode is introduced. There are two udp_cksum_mode for hns3 PMD, HNS3_SPECIAL_PORT_HW_CKSUM_MODE means HW could solve the above problem. And in HNS3_SPECIAL_PORT_SW_CKSUM_MODE, hns3 PMD will check packets in the Tx prepare and perform the UDP CKSUM for such packets to avoid a checksum error. Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 2 + drivers/net/hns3/hns3_ethdev.h | 19 ++++++++++ drivers/net/hns3/hns3_rxtx.c | 68 ++++++++++++++++++++++++++++++++++ drivers/net/hns3/hns3_rxtx.h | 16 ++++++++ 4 files changed, 105 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index d8158cc56e..ab4fb2519a 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -3061,6 +3061,7 @@ hns3_get_capability(struct hns3_hw *hw) hw->min_tx_pkt_len = HNS3_HIP08_MIN_TX_PKT_LEN; pf->tqp_config_mode = HNS3_FIXED_MAX_TQP_NUM_MODE; hw->rss_info.ipv6_sctp_offload_supported = false; + hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE; return 0; } @@ -3079,6 +3080,7 @@ hns3_get_capability(struct hns3_hw *hw) hw->min_tx_pkt_len = HNS3_HIP09_MIN_TX_PKT_LEN; pf->tqp_config_mode = HNS3_FLEX_MAX_TQP_NUM_MODE; hw->rss_info.ipv6_sctp_offload_supported = true; + hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE; return 0; } diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 4c40df1cbb..f9f0e705f6 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -43,6 +43,9 @@ #define HNS3_UNLIMIT_PROMISC_MODE 0 #define HNS3_LIMIT_PROMISC_MODE 1 +#define HNS3_SPECIAL_PORT_SW_CKSUM_MODE 0 +#define HNS3_SPECIAL_PORT_HW_CKSUM_MODE 1 + #define HNS3_UC_MACADDR_NUM 128 #define HNS3_VF_UC_MACADDR_NUM 48 #define HNS3_MC_MACADDR_NUM 128 @@ -535,6 +538,22 @@ struct hns3_hw { */ uint8_t promisc_mode; uint8_t max_non_tso_bd_num; /* max BD number of one non-TSO packet */ + /* + * udp checksum mode. + * value range: + * HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE + * + * - HNS3_SPECIAL_PORT_SW_CKSUM_MODE + * In this mode, HW can not do checksum for special UDP port like + * 4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel + * packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need + * do the checksum for these packets to avoid a checksum error. + * + * - HNS3_SPECIAL_PORT_HW_CKSUM_MODE + * In this mode, HW does not have the preceding problems and can + * directly calculate the checksum of these UDP packets. + */ + uint8_t udp_cksum_mode; struct hns3_port_base_vlan_config port_base_vlan_cfg; /* diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 77038ffe00..2714f28f1d 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -2640,6 +2641,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, HNS3_RING_TX_TAIL_REG); txq->min_tx_pkt_len = hw->min_tx_pkt_len; txq->tso_mode = hw->tso_mode; + txq->udp_cksum_mode = hw->udp_cksum_mode; txq->over_length_pkt_cnt = 0; txq->exceed_limit_bd_pkt_cnt = 0; txq->exceed_limit_bd_reassem_fail = 0; @@ -3293,6 +3295,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m) } #endif +static uint16_t +hns3_udp_cksum_help(struct rte_mbuf *m) +{ + uint64_t ol_flags = m->ol_flags; + uint16_t cksum = 0; + uint32_t l4_len; + + if (ol_flags & PKT_TX_IPV4) { + struct rte_ipv4_hdr *ipv4_hdr = rte_pktmbuf_mtod_offset(m, + struct rte_ipv4_hdr *, m->l2_len); + l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) - m->l3_len; + } else { + struct rte_ipv6_hdr *ipv6_hdr = rte_pktmbuf_mtod_offset(m, + struct rte_ipv6_hdr *, m->l2_len); + l4_len = rte_be_to_cpu_16(ipv6_hdr->payload_len); + } + + rte_raw_cksum_mbuf(m, m->l2_len + m->l3_len, l4_len, &cksum); + + cksum = ~cksum; + /* + * RFC 768:If the computed checksum is zero for UDP, it is transmitted + * as all ones + */ + if (cksum == 0) + cksum = 0xffff; + + return (uint16_t)cksum; +} + +static bool +hns3_validate_tunnel_cksum(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m) +{ + uint64_t ol_flags = m->ol_flags; + struct rte_udp_hdr *udp_hdr; + uint16_t dst_port; + + if (tx_queue->udp_cksum_mode == HNS3_SPECIAL_PORT_HW_CKSUM_MODE || + ol_flags & PKT_TX_TUNNEL_MASK || + (ol_flags & PKT_TX_L4_MASK) != PKT_TX_UDP_CKSUM) + return true; + /* + * A UDP packet with the same dst_port as VXLAN\VXLAN_GPE\GENEVE will + * be recognized as a tunnel packet in HW. In this case, if UDP CKSUM + * offload is set and the tunnel mask has not been set, the CKSUM will + * be wrong since the header length is wrong and driver should complete + * the CKSUM to avoid CKSUM error. + */ + udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *, + m->l2_len + m->l3_len); + dst_port = rte_be_to_cpu_16(udp_hdr->dst_port); + switch (dst_port) { + case RTE_VXLAN_DEFAULT_PORT: + case RTE_VXLAN_GPE_DEFAULT_PORT: + case RTE_GENEVE_DEFAULT_PORT: + udp_hdr->dgram_cksum = hns3_udp_cksum_help(m); + m->ol_flags = ol_flags & ~PKT_TX_L4_MASK; + return false; + default: + return true; + } +} + static int hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m) { @@ -3337,6 +3402,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m) return ret; } + if (!hns3_validate_tunnel_cksum(tx_queue, m)) + return 0; + hns3_outer_header_cksum_prepare(m); return 0; diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index 5650a97c3a..f7c60adc2e 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -387,6 +387,22 @@ struct hns3_tx_queue { * not need to recalculate it. */ uint8_t tso_mode; + /* + * udp checksum mode. + * value range: + * HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE + * + * - HNS3_SPECIAL_PORT_SW_CKSUM_MODE + * In this mode, HW can not do checksum for special UDP port like + * 4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel + * packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need + * do the checksum for these packets to avoid a checksum error. + * + * - HNS3_SPECIAL_PORT_HW_CKSUM_MODE + * In this mode, HW does not have the preceding problems and can + * directly calculate the checksum of these UDP packets. + */ + uint8_t udp_cksum_mode; /* * The minimum length of the packet supported by hardware in the Tx * direction. -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.369384800 +0800 +++ 0107-net-hns3-fix-Tx-checksum-for-UDP-packets-with-specia.patch 2021-05-10 23:59:26.500000000 +0800 @@ -1 +1 @@ -From 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 Mon Sep 17 00:00:00 2001 +From 7537fafbc7da45d976cb2327b0dcb3706164d254 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 ] @@ -27 +29,0 @@ -Cc: stable@dpdk.org @@ -39 +41 @@ -index 73b96c18d1..9a57cc6b62 100644 +index d8158cc56e..ab4fb2519a 100644 @@ -42 +44 @@ -@@ -3129,6 +3129,7 @@ hns3_get_capability(struct hns3_hw *hw) +@@ -3061,6 +3061,7 @@ hns3_get_capability(struct hns3_hw *hw) @@ -50 +52 @@ -@@ -3148,6 +3149,7 @@ hns3_get_capability(struct hns3_hw *hw) +@@ -3079,6 +3080,7 @@ hns3_get_capability(struct hns3_hw *hw) @@ -59 +61 @@ -index d9cd96fa8a..ac255a3ff9 100644 +index 4c40df1cbb..f9f0e705f6 100644 @@ -62 +64 @@ -@@ -47,6 +47,9 @@ +@@ -43,6 +43,9 @@ @@ -72,3 +74,3 @@ -@@ -567,6 +570,22 @@ struct hns3_hw { - uint8_t drop_stats_mode; - +@@ -535,6 +538,22 @@ struct hns3_hw { + */ + uint8_t promisc_mode; @@ -96 +98 @@ -index ff9cb158d7..5bb35e14a1 100644 +index 77038ffe00..2714f28f1d 100644 @@ -105 +107 @@ - #include + #include @@ -107 +109 @@ -@@ -2845,6 +2846,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, +@@ -2640,6 +2641,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, @@ -112,4 +114,4 @@ - memset(&txq->basic_stats, 0, sizeof(struct hns3_tx_basic_stats)); - memset(&txq->dfx_stats, 0, sizeof(struct hns3_tx_dfx_stats)); - -@@ -3548,6 +3550,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m) + txq->over_length_pkt_cnt = 0; + txq->exceed_limit_bd_pkt_cnt = 0; + txq->exceed_limit_bd_reassem_fail = 0; +@@ -3293,6 +3295,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m) @@ -185 +187 @@ -@@ -3592,6 +3657,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m) +@@ -3337,6 +3402,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m) @@ -196 +198 @@ -index f9b30485fe..6689397605 100644 +index 5650a97c3a..f7c60adc2e 100644 @@ -199 +201 @@ -@@ -464,6 +464,22 @@ struct hns3_tx_queue { +@@ -387,6 +387,22 @@ struct hns3_tx_queue {