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 ADDAA455DF; Tue, 9 Jul 2024 10:25:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22D01432C2; Tue, 9 Jul 2024 10:24:34 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2134.outbound.protection.outlook.com [40.107.237.134]) by mails.dpdk.org (Postfix) with ESMTP id 25F344328F for ; Tue, 9 Jul 2024 10:24:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cwfveUKPSOkDP1eDstFRiNJ3PHk8gtQVl34tZgBUeMGVFN/3o1/AlZdau1jAfAfC9IkpHB8GPqabiIf62acOD9AK+MsP9Trb/UyJO2eqGg2u9szXUZS3wTCtR3qzF1vEB0QU3WLspXf4KTgIqWLFlUcaqDtfgcySf4RsqeuDXFxv9qeipdT4bg0mCiHzuUA2+ArYABbhk34iLw4GwRitlvXmRLYx2hMyym9D3l1FLj/Z+2VMIEthxyb+AzAvafDrAQI7O0yB+WP2/huDOUXIK6cp1BcrGls9j9ZI1g6SENxuKbx3hcH52AKGtg+Ll/fu73znW1vj4e+acUv2I/tzJg== 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=tNTgufuO4VZBcKp8mR74V0RUO3fV38qVmklT9Mr/PBuj9aI9kg1ma5cmmrabbyuivJ9dQwMtzX5hM13w2Vi954YuTvHPj+3HUA7bUGQg+4Wdfk9CKqztxodntA5O3TXnZ9CdwHzVGoGLZRYDCy16S+QW016nFcY9YC4V7MyOXS4XgvJYsatWk2r3Nj/yX0/30xvsqJBSOQRCxxpb6V4euM5WISWkK00Q8KgKBZySIWAutBwByt/beW35eySjAY3wz/uZxqzae1x8GXlvVUecz0MuUGurI+fDh2CrahRpmpmvT/QvefHYs7o2NsOdcoQNNbco0SnpwWlW9bZL6QenbA== 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=jidOxPloGGJ1V144RENJ7sRw0ibafF0Ylg54hN5im4wFe0sCeS4F21hAIiDqBHdaSv19KYzYIy1Z70NO+fNh9p/Stcwlx9TdJpLkXPYxslOBNKB9xGOdDIlyghR44jH9T9XQJZ7f4Yq4UO9EACp5WGNki7kx9ckNTzswlWdKA2k= 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 PH7PR13MB6194.namprd13.prod.outlook.com (2603:10b6:510:245::10) 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 08:24:30 +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 08:24:30 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He Subject: [PATCH v4 5/5] net/nfp: vector Rx function supports parsing ptype Date: Tue, 9 Jul 2024 16:24:05 +0800 Message-Id: <20240709082405.248641-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240709082405.248641-1-chaoyong.he@corigine.com> References: <20240709072921.246520-1-chaoyong.he@corigine.com> <20240709082405.248641-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR05CA0064.namprd05.prod.outlook.com (2603:10b6:a03:74::41) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB6194:EE_ X-MS-Office365-Filtering-Correlation-Id: df402b08-66b7-471c-a294-08dc9ff08e1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DLozjnTb29AkFRMiYqvt+9ptZqNtZJUSdUCjTlw+VB+Vovnw/j3sk5KfJd7y?= =?us-ascii?Q?zcgbOZ2I/qv4k2Jwl5w2OXYR7ApUcrf3hKR9gPirZ5zD6Z55cAMcuAoMIF9w?= =?us-ascii?Q?2es0rxz8C5GaEfYiYUkEn9D8BLXto3RvS4baDNwhfg/W64u/cVoW+7lZETb5?= =?us-ascii?Q?UnSvnEQ2F+qy1ci1qL0Ap0lLsA1/XtsXtl76FfiOE+9dls8gxu+BGQUCDOy2?= =?us-ascii?Q?3iUMbid4OTT/rNwA0dKyn1sMsL24MR/uRu+kaiseN+1QMYmOo9DP7x3gjF1H?= =?us-ascii?Q?5JvYuahqFAl/2sZbjnmWPGXPS6M3hRFwi/bB9ViatXk+w2G+mG7HHyoM9szH?= =?us-ascii?Q?LRradrs2/sTnd3D4Uxw/Ju3/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-ascii?Q?atBnvHC3w5uEWgzwYc4SOmc9NWrJQ4FwcrtP+yevHLF4DHeheMYRFdbMHI+6?= =?us-ascii?Q?srobBqMjPbbtyuVHhobjzceKKDyJfCrjV8N4QvXCDN7BzIWvBZfvZb006T2R?= =?us-ascii?Q?F3CqPCvB5cje5ry13EQhh1FqhocfupaOLLXci8qf07xs8omLxA=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)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5F1qpvAXSmDyjWUjWM9iU9z8sZHX3LOjC5+eHQWduzP+wkMulebdKzjoLY50?= =?us-ascii?Q?e7A+3T94XIwoni4gmDHIOgiRVfO7c7dlEFcfnAt+FLrGENdguJM7oVtH81KD?= =?us-ascii?Q?IZgem7QlY6YYHlDOuBtgojMngKzIAJMkk04YuF47X5L0bJRWii317ph0Q30W?= =?us-ascii?Q?lUhog+UqLaRg5BR+nKIA0C3+oUo3kh4GzH3Hpr/jcfJbGk6lO1YDadKZ9c4A?= =?us-ascii?Q?YsVYm2gjmOu35U2TbfpFPpcYi5hN0hPCFpOlwpsSa/IVktIj2QPCdEEdAp68?= =?us-ascii?Q?w9F0GNvuuytXvmvtWWhSdwrA4uG40FytuCXRcB/IdVcvJetX8IBfHtAFpUkt?= =?us-ascii?Q?zxxjvu/2DLMKCd7t50RXZy1/u0FXnTTFS6ITIvH0XHSQQxDDeU0xXGTmLlYI?= =?us-ascii?Q?MVWqvEHekm/DxRkF3mFZBZXSpu89LOLZ31KV2d2MqpwjmPu8PeJCKZgCEIsT?= =?us-ascii?Q?uajp6UL8h/En0ZaUv/THaPPoPNxLwZjhhDiplLQnw7CyZ+FmLlHQWbV2VPh7?= =?us-ascii?Q?AqowrAjShEFJPOzeHwRkKFDaWQVHDgE8ykYfDWUlQX9HTE9LP+dyICeXyATu?= =?us-ascii?Q?j9JiHbbk3AiMK5XYkAdhpHTMJLjlypIT8AusGQC3n53MUWepbeD1wT/D/cEG?= =?us-ascii?Q?jY3SBsL7WGb8gPy4tASolmgR1wHAzDkTmLyvkz98SAxaYtECsKxrqoVuqAxn?= =?us-ascii?Q?jkSKKhhS2yve6ZR50T24lQ0NcD4qp2/t9xeHPJVxsPL3vqLDsHyQspdDqjfT?= =?us-ascii?Q?KhegueuQ3+slJKa3MThX3Tu3fot0dIgsqnfldUcvjkl+1XUdoi44el43GKUk?= =?us-ascii?Q?CjEAPg5UWJKw329Rl3QvpEsRt3n3pyXVuwy92VGEkyJCwCLgHt59vddee7qd?= =?us-ascii?Q?y8UtECkzIfQJzf8vPVwiWS2tj837qcZV/hwXKbO7XrAjydk4bMUAXEncbt2V?= =?us-ascii?Q?7xcorZvCJUsALT02QH59lZSTK3XTWznYRUJh3xnvZVxOuLYYaJorrBYOukAi?= =?us-ascii?Q?D5rY9xY7I0nqxOuTv6VWjpJ1a2CjLhsZK+BwXT8wSu/2boSBPfU82sVobYgq?= =?us-ascii?Q?smJiflAuUSoPzMKJk01DYOUKJy5pByq9roLUBNya+e05VcC595mwzUatHPG9?= =?us-ascii?Q?g4dAH7QkHfHcuoP+CFhLeWaZilI05Mq+ThbuLTmQfrLjfoEJ3jQcf272S00u?= =?us-ascii?Q?7Im0ui2IJgE5KLaPan0spbslDiwF/dq03y0Jbbnr4z9Dwtaigy8jZiCq2EvC?= =?us-ascii?Q?r7DmA1Eb9lX8/whoeo5kPeN1Ze1TB00KQUngsf92syrmNmXE+7M6/VTRi9Yi?= =?us-ascii?Q?A3uBZuhyC614BAFo2FLZZ0YZL8xmBoh6xfRbdEM/865BRfFdSCnY9jxNsIbR?= =?us-ascii?Q?+n3Q7kAIjMPbs9BCKVtvspELYUkZe+4A+CR9xAlU7M7o3jA8GMkC9WhZ+Cir?= =?us-ascii?Q?ud2oqaBLl7zuDs4rZb6xBdomcLVNR4hl4OUTrWTtqhMAvFe7CnngnxsHzWZB?= =?us-ascii?Q?jBTRf8fhExmlIrQeTYRUfOpmI2HK+CpVb0f6KE8Cs9JZFpXGjSv2k+XsMTTe?= =?us-ascii?Q?iT8AeNMb1Ni8ISdoqhZ+6lDC0b69i132AI64EStDoiulanWDmjU6xS1wX/G0?= =?us-ascii?Q?Xw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: df402b08-66b7-471c-a294-08dc9ff08e1f X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2024 08:24:30.8362 (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: npjUJ5pO9fxZ760+yeD91Dlkn+S5gKvelYKsWvxEfmZEkOTTEQtAeJlDgrzk5a5P3DCMAuAt8j0ggCPrtrdy2xzswbAzwpfbz2iX0OOP35Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6194 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