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 5D68A455D7; Tue, 9 Jul 2024 09:30:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E673242F19; Tue, 9 Jul 2024 09:29:55 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2101.outbound.protection.outlook.com [40.107.223.101]) by mails.dpdk.org (Postfix) with ESMTP id DF59142EB9 for ; Tue, 9 Jul 2024 09:29:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=smym/8S65PUKnvaCWnMd6QqTkP8PtURD7RwJkjq9murAEtqOYpkOip2alFp7kKZaUSc7SesH544X+7UY/xvyQhcEH/AMv4VxhITx+dlqMpVZGOaU60qylBjzdRscI4QqaLS3q5LMC8Epfsto1XttKT5MwMMYm1Jw4LZC1sjIaLAYAfKGVs5Q8oZdRWUznbr1MXgbEPmi/atphH6CvaiLr+tIKbwET349xOMZl33/i+eYGm1f1PJXiTlk2BEQK/Gp2b3vigKNMYHOaA9QqlTPraNGEd3KKvd6hW+3FqcH+jrT/+kX7jVcuosN+/vXvtgvNUoocOMSvABsELYzrtEu/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p64hUxkicniOAYwq8iKQMxOI6MhjeHh5BudBbr/9XQA=; b=NRMLEURppvEQbsACMaNrCBpZWnqtc/dwHv/5J/WH633fOEtv3zbHjhtdWcUfg6B8QoTXjBx0V9Tujq7nJYdjazHqO13T/eTZwe6enV29FfNf+QAkDxo7cGFTi89Rt1KH7OV1DxpDV8oRshBfEKfOH40xAFgLhOBn4IBRL3UsSS7MQHM5cxKAWnFz6iJ8EL/wlMLlZoIwNKdFcYtjhKzBvSDgPGup9j4Y4nz2s9cRZK8XOwv3iGVNGVbAoGsBwFCvoAajALYsRFtc+u98aqUD1800rqbLLv6siIrX6JS7pfnjkZCDHL21Nu9c5Y+dqhmdElwE+wyqrZ8nG4UdRWm5qA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p64hUxkicniOAYwq8iKQMxOI6MhjeHh5BudBbr/9XQA=; b=OqCm5x2R3s2XKsNmBd9ZKXZKJ+4Oah+WH4NZxTY7ah1RGXuWD/r1PZEwXXAZua8XLexNuXL5AJpgz1e8jxbp9WXEied5/7c0Yzp1kfLWF1Tr0kwwwW+GOUCdyWTbmHcvGYN5KpjXNS1Ur2l0o4W4b+WM1iGhc5mOuZtKQX/Jokk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SA1PR13MB4958.namprd13.prod.outlook.com (2603:10b6:806:189::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36; Tue, 9 Jul 2024 07:29:50 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7741.033; Tue, 9 Jul 2024 07:29:50 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He Subject: [PATCH v3 4/4] net/nfp: vector Rx function supports parsing ptype Date: Tue, 9 Jul 2024 15:29:21 +0800 Message-Id: <20240709072921.246520-5-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240709072921.246520-1-chaoyong.he@corigine.com> References: <20240708055854.107739-1-chaoyong.he@corigine.com> <20240709072921.246520-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0232.namprd13.prod.outlook.com (2603:10b6:a03:2c1::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB4958:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cf97bf3-3235-4bfb-bd02-08dc9fe8eaa5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wjH70fv9JMdK+nyOjiWL8W54JhRzbNfMktY9ERwZoLt+iA2WmnC9MlKBuAPu?= =?us-ascii?Q?HEJdq4PFECuQGNKMrQJJoErScuULp+u6xO3jVwJ0VcjSVa1ltVLZ3YAZUFXk?= =?us-ascii?Q?ntZ3qgnHACWHG3S8tuSNrwWsimhOMzAvAKCfBv8XrcsOJQaUE8q1KpjJKgl+?= =?us-ascii?Q?RUFiSPKgetkUcBKVu2SDI+QQCaOBMCG/EQKtPj0l3tf2/OIqjw+C5t0RXDcd?= =?us-ascii?Q?OMA8IZiQGsGxukm9LKcuDu9V9WoBA1Se9jaZ6s57qslGarVGDwoSjy1NoJNu?= =?us-ascii?Q?F6fL65qAEi1UqlIhyiehDgESXftkvfJXYK8kfLoclpqu/0bTmbkll+/kFRMe?= =?us-ascii?Q?8P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/5nEtjk?= =?us-ascii?Q?Zzz7NAX9Tr9L5ZWMLa4tQp9HUuQwIQunNgY7ro7aEQMqDHGWMnjUim7loKLC?= =?us-ascii?Q?opUKCZoRnaQ+a8hs1JWn8w5CFNT5R5dlA1h9zPeg6f9yMnr7ckjCKeFIGTJx?= =?us-ascii?Q?0jx2bBxegVx0raUPQybQG+2SOAfxPNbjFDqt6FdX9zyNyRpdLw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(366016)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?D25BlfsNtcSCRUTs0qF22YhsGOLknsqQre8qGJBghAlM0vXf7bdIFuHfm1a3?= =?us-ascii?Q?0pen0YsCebPuRoBQb0me0OOPWsRu0EYPU8kpjhHk2aH7onSo9pZNHk5RoTtq?= =?us-ascii?Q?Mi4xbjWktmMqXWgxngPhXlye/i729PYw4Sh38Ht+QWF+DcYBIms4mn/zATE3?= =?us-ascii?Q?fRhqZ5MkVs+pZECs4ex0I6iczSClshpVoQ1DxWlmzdBF09GBUnKjiVGFGPja?= =?us-ascii?Q?ndngGGCyoDXt1baH3t66MI8MufH+/ODg66bBUAsg4FYQ7GS9gXuUa3hRLzY2?= =?us-ascii?Q?Pl3tmjeijmbZfiMkkNO23wKsGw9lfXukkgsBNztu5OYmgNMFuln9PVVZycQ1?= =?us-ascii?Q?bNAZlM7zzEX9LnpPbMRGUvuXsbheuL5weBnFlOy6ThbiuPSsFiQJGjIx+W/A?= =?us-ascii?Q?GdOdobdd/VTrk63QrBYC5/pJUojRt4okWbH6SIV/a0R1Pye3tesJt74Zxt3e?= =?us-ascii?Q?9nii2BigS/UZjrNAAQAPSPdLavCArmtTT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OIWuK/2Yoo7ulogLVaBQb2T2GCBXpMAUiLmQBMoBrrVX1WSLkCyt?= =?us-ascii?Q?qCS4fh1QDA5ssXyf+OAjqdVIIX6c3j6hol7qlkFQIkoopM9hERI3BycZ5zFU?= =?us-ascii?Q?wNitM7lKOwqqmPFYmBgEHLz2Kyf9kldiGHmF/1lCues33/BbsvnFd1hmZ/r1?= =?us-ascii?Q?8CEMEHj/Dp+CDPqqEdOZn48azkkmscVGtcVazkZ/pnevdMJK9AAEXMIG7O2s?= =?us-ascii?Q?Dw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cf97bf3-3235-4bfb-bd02-08dc9fe8eaa5 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2024 07:29:50.0851 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: REME2tTf1zuSvmsGOvNY3LHn/2pxhSqwjlvehmng1u/dFJwP/rh2g/jiMJRDPRBotwAJdvyLNDPFvvPcu4DNAnwvUXMafsy4FB0LqOyCD98= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB4958 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: Long Wu Vector AVX2 Rx function supports parsing packet type and set it to mbuf. Signed-off-by: Long Wu Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_net_common.c | 2 +- drivers/net/nfp/nfp_rxtx.c | 2 +- drivers/net/nfp/nfp_rxtx.h | 3 +++ drivers/net/nfp/nfp_rxtx_vec_avx2.c | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c index 08693d5fba..3d916cd147 100644 --- a/drivers/net/nfp/nfp_net_common.c +++ b/drivers/net/nfp/nfp_net_common.c @@ -1455,7 +1455,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev, size_t *no_of_elements) RTE_PTYPE_INNER_L4_SCTP, }; - if (dev->rx_pkt_burst != nfp_net_recv_pkts) + if (dev->rx_pkt_burst == NULL) return NULL; net_hw = dev->data->dev_private; diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index 4fc3374987..da41a0e663 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -350,7 +350,7 @@ nfp_net_set_ptype(const struct nfp_ptype_parsed *nfp_ptype, * @param mb * Mbuf to set the packet type. */ -static void +void nfp_net_parse_ptype(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxds, struct rte_mbuf *mb) diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index fff8371991..c717d97003 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -245,5 +245,8 @@ void nfp_net_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo); void nfp_net_recv_pkts_set(struct rte_eth_dev *eth_dev); +void nfp_net_parse_ptype(struct nfp_net_rxq *rxq, + struct nfp_net_rx_desc *rxds, + struct rte_mbuf *mb); #endif /* __NFP_RXTX_H__ */ diff --git a/drivers/net/nfp/nfp_rxtx_vec_avx2.c b/drivers/net/nfp/nfp_rxtx_vec_avx2.c index 7c18213624..508ec7faa5 100644 --- a/drivers/net/nfp/nfp_rxtx_vec_avx2.c +++ b/drivers/net/nfp/nfp_rxtx_vec_avx2.c @@ -111,6 +111,8 @@ nfp_vec_avx2_recv_set_rxpkt1(struct nfp_net_rxq *rxq, nfp_net_meta_parse(rxds, rxq, hw, rx_pkt, &meta); + nfp_net_parse_ptype(rxq, rxds, rx_pkt); + /* Checking the checksum flag */ nfp_net_rx_cksum(rxq, rxds, rx_pkt); } -- 2.39.1