From patchwork Tue Jul 11 10:24:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 129442 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 659EE42E44; Tue, 11 Jul 2023 12:28:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E484642BAC; Tue, 11 Jul 2023 12:27:57 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 947C740A7D; Tue, 11 Jul 2023 12:27:55 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R0cWD2F9Mz1FDml; Tue, 11 Jul 2023 18:27:20 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 11 Jul 2023 18:27:53 +0800 From: Dongdong Liu To: , , , CC: Subject: [PATCH 1/5] net/hns3: fix incorrect index to look up table in NEON Rx Date: Tue, 11 Jul 2023 18:24:44 +0800 Message-ID: <20230711102448.11627-2-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20230711102448.11627-1-liudongdong3@huawei.com> References: <20230711102448.11627-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 From: Huisong Li In hns3_recv_burst_vec(), the index to get packet length and data size are reversed. Fortunately, this doesn't affect functionality because the NEON Rx only supports single BD in which the packet length is equal to the date size. Now this patch fixes it to get back to the truth. Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rxtx_vec_neon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h index 6c49c70fc7..564d831a48 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_neon.h +++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h @@ -142,8 +142,8 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq, /* mask to shuffle from desc to mbuf's rx_descriptor_fields1 */ uint8x16_t shuf_desc_fields_msk = { 0xff, 0xff, 0xff, 0xff, /* packet type init zero */ - 22, 23, 0xff, 0xff, /* rx.pkt_len to rte_mbuf.pkt_len */ - 20, 21, /* size to rte_mbuf.data_len */ + 20, 21, 0xff, 0xff, /* rx.pkt_len to rte_mbuf.pkt_len */ + 22, 23, /* size to rte_mbuf.data_len */ 0xff, 0xff, /* rte_mbuf.vlan_tci init zero */ 8, 9, 10, 11, /* rx.rss_hash to rte_mbuf.hash.rss */ };