From patchwork Tue Jul 9 08:24:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142254 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 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> 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: DLozjnTb29AkFRMiYqvt+9ptZqNtZJUSdUCjTlw+VB+Vovnw/j3sk5KfJd7yzcgbOZ2I/qv4k2Jwl5w2OXYR7ApUcrf3hKR9gPirZ5zD6Z55cAMcuAoMIF9w2es0rxz8C5GaEfYiYUkEn9D8BLXto3RvS4baDNwhfg/W64u/cVoW+7lZETb5UnSvnEQ2F+qy1ci1qL0Ap0lLsA1/XtsXtl76FfiOE+9dls8gxu+BGQUCDOy23iUMbid4OTT/rNwA0dKyn1sMsL24MR/uRu+kaiseN+1QMYmOo9DP7x3gjF1H5JvYuahqFAl/2sZbjnmWPGXPS6M3hRFwi/bB9ViatXk+w2G+mG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-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: 5F1qpvAXSmDyjWUjWM9iU9z8sZHX3LOjC5+eHQWduzP+wkMulebdKzjoLY50e7A+3T94XIwoni4gmDHIOgiRVfO7c7dlEFcfnAt+FLrGENdguJM7oVtH81KDIZgem7QlY6YYHlDOuBtgojMngKzIAJMkk04YuF47X5L0bJRWii317ph0Q30WlUhog+UqLaRg5BR+nKIA0C3+oUo3kh4GzH3Hpr/jcfJbGk6lO1YDadKZ9c4AYsVYm2gjmOu35U2TbfpFPpcYi5hN0hPCFpOlwpsSa/IVktIj2QPCdEEdAp68w9F0GNvuuytXvmvtWWhSdwrA4uG40FytuCXRcB/IdVcvJetX8IBfHtAFpUktzxxjvu/2DLMKCd7t50RXZy1/u0FXnTTFS6ITIvH0XHSQQxDDeU0xXGTmLlYIMVWqvEHekm/DxRkF3mFZBZXSpu89LOLZ31KV2d2MqpwjmPu8PeJCKZgCEIsTuajp6UL8h/En0ZaUv/THaPPoPNxLwZjhhDiplLQnw7CyZ+FmLlHQWbV2VPh7AqowrAjShEFJPOzeHwRkKFDaWQVHDgE8ykYfDWUlQX9HTE9LP+dyICeXyATuj9JiHbbk3AiMK5XYkAdhpHTMJLjlypIT8AusGQC3n53MUWepbeD1wT/D/cEGjY3SBsL7WGb8gPy4tASolmgR1wHAzDkTmLyvkz98SAxaYtECsKxrqoVuqAxnjkSKKhhS2yve6ZR50T24lQ0NcD4qp2/t9xeHPJVxsPL3vqLDsHyQspdDqjfTKhegueuQ3+slJKa3MThX3Tu3fot0dIgsqnfldUcvjkl+1XUdoi44el43GKUkCjEAPg5UWJKw329Rl3QvpEsRt3n3pyXVuwy92VGEkyJCwCLgHt59vddee7qdy8UtECkzIfQJzf8vPVwiWS2tj837qcZV/hwXKbO7XrAjydk4bMUAXEncbt2V7xcorZvCJUsALT02QH59lZSTK3XTWznYRUJh3xnvZVxOuLYYaJorrBYOukAiD5rY9xY7I0nqxOuTv6VWjpJ1a2CjLhsZK+BwXT8wSu/2boSBPfU82sVobYgqsmJiflAuUSoPzMKJk01DYOUKJy5pByq9roLUBNya+e05VcC595mwzUatHPG9g4dAH7QkHfHcuoP+CFhLeWaZilI05Mq+ThbuLTmQfrLjfoEJ3jQcf272S00u7Im0ui2IJgE5KLaPan0spbslDiwF/dq03y0Jbbnr4z9Dwtaigy8jZiCq2EvCr7DmA1Eb9lX8/whoeo5kPeN1Ze1TB00KQUngsf92syrmNmXE+7M6/VTRi9YiA3uBZuhyC614BAFo2FLZZ0YZL8xmBoh6xfRbdEM/865BRfFdSCnY9jxNsIbR+n3Q7kAIjMPbs9BCKVtvspELYUkZe+4A+CR9xAlU7M7o3jA8GMkC9WhZ+Cirud2oqaBLl7zuDs4rZb6xBdomcLVNR4hl4OUTrWTtqhMAvFe7CnngnxsHzWZBjBTRf8fhExmlIrQeTYRUfOpmI2HK+CpVb0f6KE8Cs9JZFpXGjSv2k+XsMTTeiT8AeNMb1Ni8ISdoqhZ+6lDC0b69i132AI64EStDoiulanWDmjU6xS1wX/G0Xw== 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); }