get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/136411/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 136411,
    "url": "https://patches.dpdk.org/api/patches/136411/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240206011030.2007689-1-haijie1@huawei.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240206011030.2007689-1-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240206011030.2007689-1-haijie1@huawei.com",
    "date": "2024-02-06T01:10:30",
    "name": "net/hns3: fix Rx packet truncation when KEEP CRC enabled",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "42a24b6711ce0119d3ed89af6e2b4ef17a0da5de",
    "submitter": {
        "id": 2935,
        "url": "https://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240206011030.2007689-1-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 31004,
            "url": "https://patches.dpdk.org/api/series/31004/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31004",
            "date": "2024-02-06T01:10:30",
            "name": "net/hns3: fix Rx packet truncation when KEEP CRC enabled",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31004/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/136411/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/136411/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 859CF43A29;\n\tTue,  6 Feb 2024 02:15:12 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1120F4025D;\n\tTue,  6 Feb 2024 02:15:12 +0100 (CET)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id 76C784003C\n for <dev@dpdk.org>; Tue,  6 Feb 2024 02:15:09 +0100 (CET)",
            "from mail.maildlp.com (unknown [172.19.163.44])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TTQGv6Xsxz29kvZ;\n Tue,  6 Feb 2024 09:13:11 +0800 (CST)",
            "from kwepemd100004.china.huawei.com (unknown [7.221.188.31])\n by mail.maildlp.com (Postfix) with ESMTPS id 4796D140444;\n Tue,  6 Feb 2024 09:15:07 +0800 (CST)",
            "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.28; Tue, 6 Feb 2024 09:15:06 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<lihuisong@huawei.com>, <fengchengwen@huawei.com>,\n <liuyonglong@huawei.com>, <huangdengdui@huawei.com>, <ferruh.yigit@amd.com>,\n <haijie1@huawei.com>",
        "Subject": "[PATCH] net/hns3: fix Rx packet truncation when KEEP CRC enabled",
        "Date": "Tue, 6 Feb 2024 09:10:30 +0800",
        "Message-ID": "<20240206011030.2007689-1-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.2]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemd100004.china.huawei.com (7.221.188.31)",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Dengdui Huang <huangdengdui@huawei.com>\n\nWhen KEEP_CRC offload is enabled, some packets will be truncated and\nthe CRC is still be stripped in following cases:\n1. For HIP08 hardware, the packet type is TCP and the length\n   is less than or equal to 60B.\n2. For other hardwares, the packet type is IP and the length\n   is less than or equal to 60B.\n\nSo driver has to recaculate positively the CRC of these packets\non above cases.\n\nIn addition, to avoid impacting performance, KEEP_CRC is not\nsupported when NEON or SVE algorithm is used.\n\nFixes: 8973d7c4ca12 (\"net/hns3: support keeping CRC\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\nSigned-off-by: Jie Hai <haijie1@huawei.com>\n---\n drivers/net/hns3/hns3_rxtx.c          | 116 ++++++++++++++++++++------\n drivers/net/hns3/hns3_rxtx.h          |   9 ++\n drivers/net/hns3/hns3_rxtx_vec.c      |   3 +-\n drivers/net/hns3/hns3_rxtx_vec_neon.h |  19 -----\n drivers/net/hns3/hns3_rxtx_vec_sve.c  |   3 +-\n 5 files changed, 103 insertions(+), 47 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 7e636a0a2e99..6e9b6db843f9 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -11,6 +11,7 @@\n #include <rte_io.h>\n #include <rte_net.h>\n #include <rte_malloc.h>\n+#include <rte_net_crc.h>\n #if defined(RTE_ARCH_ARM64)\n #include <rte_cpuflags.h>\n #include <rte_vect.h>\n@@ -1732,8 +1733,9 @@ hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len)\n }\n \n static int\n-hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,\n-\t\t\t\tuint16_t nb_desc)\n+hns3_rxq_conf_runtime_check(struct hns3_hw *hw,\n+\t\t\t    const struct rte_eth_rxconf *conf,\n+\t\t\t    uint16_t buf_size, uint16_t nb_desc)\n {\n \tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n \teth_rx_burst_t pkt_burst = dev->rx_pkt_burst;\n@@ -1766,6 +1768,14 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,\n \t\t\treturn -EINVAL;\n \t\t}\n \t}\n+\n+\tif ((conf->offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC) &&\n+\t    pkt_burst != hns3_recv_pkts_simple &&\n+\t    pkt_burst != hns3_recv_scattered_pkts) {\n+\t\thns3_err(hw, \"KEEP_CRC offload is not supported in the current rx function.\");\n+\t\treturn -EINVAL;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -1802,7 +1812,7 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,\n \t}\n \n \tif (hw->data->dev_started) {\n-\t\tret = hns3_rxq_conf_runtime_check(hw, *buf_size, nb_desc);\n+\t\tret = hns3_rxq_conf_runtime_check(hw, conf, *buf_size, nb_desc);\n \t\tif (ret) {\n \t\t\thns3_err(hw, \"Rx queue runtime setup fail.\");\n \t\t\treturn ret;\n@@ -1917,6 +1927,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,\n \tmemset(&rxq->err_stats, 0, sizeof(struct hns3_rx_bd_errors_stats));\n \tmemset(&rxq->dfx_stats, 0, sizeof(struct hns3_rx_dfx_stats));\n \n+\tif (hw->revision < PCI_REVISION_ID_HIP09_A)\n+\t\trxq->keep_crc_fail_only_tcp = true;\n \t/* CRC len set here is used for amending packet length */\n \tif (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC)\n \t\trxq->crc_len = RTE_ETHER_CRC_LEN;\n@@ -2400,6 +2412,47 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,\n \tpf->rx_timestamp = timestamp;\n }\n \n+static inline bool\n+hns3_need_recalculate_crc(struct hns3_rx_queue *rxq, struct rte_mbuf *m)\n+{\n+\tuint32_t ptype = m->packet_type;\n+\n+\tif (m->pkt_len > HNS3_KEEP_CRC_OK_MIN_PKT_LEN)\n+\t\treturn false;\n+\n+\tif (!(RTE_ETH_IS_IPV4_HDR(ptype) || RTE_ETH_IS_IPV6_HDR(ptype)))\n+\t\treturn false;\n+\n+\tif (rxq->keep_crc_fail_only_tcp)\n+\t\treturn (ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP;\n+\n+\treturn true;\n+}\n+\n+static inline void\n+hns3_recalculate_crc(struct hns3_rx_queue *rxq, struct rte_mbuf *m)\n+{\n+\tchar *append_data;\n+\tuint32_t crc;\n+\n+\tcrc = rte_net_crc_calc(rte_pktmbuf_mtod(m, void *),\n+\t\t\t       m->data_len, RTE_NET_CRC32_ETH);\n+\n+\t/*\n+\t * The hns3 driver requires that mbuf size must be at least 512B.\n+\t * When CRC is stripped by hardware, the pkt_len must be less than\n+\t * or equal to 60B. Therefore, the space of the mbuf is enough\n+\t * to insert the CRC.\n+\t *\n+\t * In addition, after CRC is stripped by hardware, pkt_len and data_len\n+\t * do not contain the CRC length. Therefore, after CRC data is appended\n+\t * by PMD again, both pkt_len and data_len add the CRC length.\n+\t */\n+\tappend_data = rte_pktmbuf_append(m, rxq->crc_len);\n+\t/* The CRC data is binary data and does not care about the byte order. */\n+\trte_memcpy(append_data, (void *)&crc, rxq->crc_len);\n+}\n+\n uint16_t\n hns3_recv_pkts_simple(void *rx_queue,\n \t\t      struct rte_mbuf **rx_pkts,\n@@ -2470,8 +2523,7 @@ hns3_recv_pkts_simple(void *rx_queue,\n \t\trxdp->rx.bd_base_info = 0;\n \n \t\trxm->data_off = RTE_PKTMBUF_HEADROOM;\n-\t\trxm->pkt_len = (uint16_t)(rte_le_to_cpu_16(rxd.rx.pkt_len)) -\n-\t\t\t\trxq->crc_len;\n+\t\trxm->pkt_len = rte_le_to_cpu_16(rxd.rx.pkt_len);\n \t\trxm->data_len = rxm->pkt_len;\n \t\trxm->port = rxq->port_id;\n \t\trxm->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);\n@@ -2492,10 +2544,16 @@ hns3_recv_pkts_simple(void *rx_queue,\n \t\t\tgoto pkt_err;\n \n \t\trxm->packet_type = hns3_rx_calc_ptype(rxq, l234_info, ol_info);\n-\n \t\tif (rxm->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC)\n \t\t\trxm->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;\n \n+\t\tif (unlikely(rxq->crc_len > 0)) {\n+\t\t\tif (hns3_need_recalculate_crc(rxq, rxm))\n+\t\t\t\thns3_recalculate_crc(rxq, rxm);\n+\t\t\trxm->pkt_len -= rxq->crc_len;\n+\t\t\trxm->data_len -= rxq->crc_len;\n+\t\t}\n+\n \t\thns3_rxd_to_vlan_tci(rxq, rxm, l234_info, &rxd);\n \n \t\t/* Increment bytes counter  */\n@@ -2662,10 +2720,10 @@ hns3_recv_scattered_pkts(void *rx_queue,\n \n \t\trxm->data_off = RTE_PKTMBUF_HEADROOM;\n \t\trxm->data_len = rte_le_to_cpu_16(rxd.rx.size);\n+\t\trxm->next = NULL;\n \n \t\tif (!(bd_base_info & BIT(HNS3_RXD_FE_B))) {\n \t\t\tlast_seg = rxm;\n-\t\t\trxm->next = NULL;\n \t\t\tcontinue;\n \t\t}\n \n@@ -2679,23 +2737,6 @@ hns3_recv_scattered_pkts(void *rx_queue,\n \t\t */\n \t\tfirst_seg->pkt_len = rte_le_to_cpu_16(rxd.rx.pkt_len);\n \n-\t\t/*\n-\t\t * This is the last buffer of the received packet. If the CRC\n-\t\t * is not stripped by the hardware:\n-\t\t *  - Subtract the CRC length from the total packet length.\n-\t\t *  - If the last buffer only contains the whole CRC or a part\n-\t\t *  of it, free the mbuf associated to the last buffer. If part\n-\t\t *  of the CRC is also contained in the previous mbuf, subtract\n-\t\t *  the length of that CRC part from the data length of the\n-\t\t *  previous mbuf.\n-\t\t */\n-\t\trxm->next = NULL;\n-\t\tif (unlikely(rxq->crc_len > 0)) {\n-\t\t\tfirst_seg->pkt_len -= rxq->crc_len;\n-\t\t\trecalculate_data_len(first_seg, last_seg, rxm, rxq,\n-\t\t\t\trxm->data_len);\n-\t\t}\n-\n \t\tfirst_seg->port = rxq->port_id;\n \t\tfirst_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);\n \t\tfirst_seg->ol_flags = RTE_MBUF_F_RX_RSS_HASH;\n@@ -2721,10 +2762,35 @@ hns3_recv_scattered_pkts(void *rx_queue,\n \n \t\tfirst_seg->packet_type = hns3_rx_calc_ptype(rxq,\n \t\t\t\t\t\tl234_info, ol_info);\n-\n \t\tif (first_seg->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC)\n \t\t\trxm->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;\n \n+\t\t/*\n+\t\t * This is the last buffer of the received packet. If the CRC\n+\t\t * is not stripped by the hardware:\n+\t\t *  - Subtract the CRC length from the total packet length.\n+\t\t *  - If the last buffer only contains the whole CRC or a part\n+\t\t *  of it, free the mbuf associated to the last buffer. If part\n+\t\t *  of the CRC is also contained in the previous mbuf, subtract\n+\t\t *  the length of that CRC part from the data length of the\n+\t\t *  previous mbuf.\n+\t\t *\n+\t\t * In addition, the CRC is still stripped for a kind of packets:\n+\t\t * 1. All IP-TCP packet whose the length is less than and equal\n+\t\t *    to 60 Byte (no CRC) on HIP08 hardware.\n+\t\t * 2. All IP packet whose the length is less than and equal to\n+\t\t *    60 Byte (no CRC) on other hardware.\n+\t\t * In this case, the PMD calculates the CRC and appends it to\n+\t\t * mbuf.\n+\t\t */\n+\t\tif (unlikely(rxq->crc_len > 0)) {\n+\t\t\tif (hns3_need_recalculate_crc(rxq, first_seg))\n+\t\t\t\thns3_recalculate_crc(rxq, first_seg);\n+\t\t\tfirst_seg->pkt_len -= rxq->crc_len;\n+\t\t\trecalculate_data_len(first_seg, last_seg, rxm, rxq,\n+\t\t\t\trxm->data_len);\n+\t\t}\n+\n \t\thns3_rxd_to_vlan_tci(rxq, first_seg, l234_info, &rxd);\n \n \t\t/* Increment bytes counter */\ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex e2ad42bb8e30..8b70a8238ae0 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -178,6 +178,8 @@\n \t\t(HNS3_TXD_VLD_CMD | HNS3_TXD_FE_CMD | HNS3_TXD_DEFAULT_BDTYPE)\n #define HNS3_TXD_SEND_SIZE_SHIFT\t16\n \n+#define HNS3_KEEP_CRC_OK_MIN_PKT_LEN\t60\n+\n enum hns3_pkt_l2t_type {\n \tHNS3_L2_TYPE_UNICAST,\n \tHNS3_L2_TYPE_MULTICAST,\n@@ -328,6 +330,13 @@ struct hns3_rx_queue {\n \t/* 4 if RTE_ETH_RX_OFFLOAD_KEEP_CRC offload set, 0 otherwise */\n \tuint8_t crc_len;\n \n+\t/*\n+\t * Indicate the range of packet type that fail to keep CRC.\n+\t * For HIP08 hardware, only the IP-TCP packet type is included.\n+\t * For other hardwares, all IP packet type is included.\n+\t */\n+\tuint8_t keep_crc_fail_only_tcp:1;\n+\n \t/*\n \t * Indicate whether ignore the outer VLAN field in the Rx BD reported\n \t * by the Hardware. Because the outer VLAN is the PVID if the PVID is\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c\nindex 9708ec614e02..bf37ce51b1ad 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec.c\n+++ b/drivers/net/hns3/hns3_rxtx_vec.c\n@@ -185,7 +185,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)\n \tstruct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;\n \tuint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |\n \t\t\t\t RTE_ETH_RX_OFFLOAD_VLAN |\n-\t\t\t\t RTE_ETH_RX_OFFLOAD_TIMESTAMP;\n+\t\t\t\t RTE_ETH_RX_OFFLOAD_TIMESTAMP |\n+\t\t\t\t RTE_ETH_RX_OFFLOAD_KEEP_CRC;\n \n \tif (dev->data->scattered_rx)\n \t\treturn -ENOTSUP;\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h\nindex 0dc6b9f0a22d..60ec501a2ab6 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h\n+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h\n@@ -148,14 +148,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,\n \t\t8, 9, 10, 11,\t         /* rx.rss_hash to rte_mbuf.hash.rss */\n \t};\n \n-\tuint16x8_t crc_adjust = {\n-\t\t0, 0,         /* ignore pkt_type field */\n-\t\trxq->crc_len, /* sub crc on pkt_len */\n-\t\t0,            /* ignore high-16bits of pkt_len */\n-\t\trxq->crc_len, /* sub crc on data_len */\n-\t\t0, 0, 0,      /* ignore non-length fields */\n-\t};\n-\n \t/* compile-time verifies the shuffle mask */\n \tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=\n \t\t\t offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4);\n@@ -171,7 +163,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,\n \t\tuint8x16_t pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4;\n \t\tuint64x2_t mbp1, mbp2;\n \t\tuint16x4_t bd_vld = {0};\n-\t\tuint16x8_t tmp;\n \t\tuint64_t stat;\n \n \t\t/* calc how many bd valid */\n@@ -225,16 +216,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,\n \t\tpkt_mb3 = vqtbl2q_u8(pkt_mbuf3, shuf_desc_fields_msk);\n \t\tpkt_mb4 = vqtbl2q_u8(pkt_mbuf4, shuf_desc_fields_msk);\n \n-\t\t/* 4 packets remove crc */\n-\t\ttmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb1), crc_adjust);\n-\t\tpkt_mb1 = vreinterpretq_u8_u16(tmp);\n-\t\ttmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb2), crc_adjust);\n-\t\tpkt_mb2 = vreinterpretq_u8_u16(tmp);\n-\t\ttmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb3), crc_adjust);\n-\t\tpkt_mb3 = vreinterpretq_u8_u16(tmp);\n-\t\ttmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb4), crc_adjust);\n-\t\tpkt_mb4 = vreinterpretq_u8_u16(tmp);\n-\n \t\t/* save packet info to rx_pkts mbuf */\n \t\tvst1q_u8((void *)&sw_ring[pos + 0].mbuf->rx_descriptor_fields1,\n \t\t\t pkt_mb1);\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c\nindex 8aa4448558cf..67c87f570e8a 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c\n+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c\n@@ -36,8 +36,7 @@ hns3_desc_parse_field_sve(struct hns3_rx_queue *rxq,\n \t\t/* init rte_mbuf.rearm_data last 64-bit */\n \t\trx_pkts[i]->ol_flags = RTE_MBUF_F_RX_RSS_HASH;\n \t\trx_pkts[i]->hash.rss = rxdp[i].rx.rss_hash;\n-\t\trx_pkts[i]->pkt_len = rte_le_to_cpu_16(rxdp[i].rx.pkt_len) -\n-\t\t\t\t\trxq->crc_len;\n+\t\trx_pkts[i]->pkt_len = rte_le_to_cpu_16(rxdp[i].rx.pkt_len);\n \t\trx_pkts[i]->data_len = rx_pkts[i]->pkt_len;\n \n \t\tl234_info = rxdp[i].rx.l234_info;\n",
    "prefixes": []
}