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 6332AA0C57; Mon, 1 Nov 2021 10:16:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89A0A41124; Mon, 1 Nov 2021 10:15:51 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2079.outbound.protection.outlook.com [40.107.237.79]) by mails.dpdk.org (Postfix) with ESMTP id 8EB2F40DF6 for ; Mon, 1 Nov 2021 10:15:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ILShFLwtMobMf/k3J9aw4M5Ru4RTY+97Ba4DLFkv8cdyL+SDEzgL0lD4XnMKlDx2QdvHLxxFH9glRBeE9vtJCr6WVR41kvwQT5Su4vwOlX7vG8/sqK1hP+9M0XQcy2P5L8688+tPe2rCcNiqCk3npXSHwdlaJjkU6ELIca2OHDOdhgCfr1C5dhxGQEDIgRyJjCrmkCN+x+gEoqcGZZchCQSwnU9JE853WO/CKNKsW2cyTL0y1odJVdD3x/UvBRxobSvOtpz8clS0r0/MGHbzMrU0NVmYuthXA8BEOEk/XrYu4pv3y735N2foumFK6KIK5IRmDINE+7tlp4+wVhFrJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=3EarEKVqLBOyw8pasGse3nX/YC1pBHLGI0UaPVmTyn4=; b=V6N8XmHX4+d7vIi8ZyflUGBfniepR8i0c9+cZYiKx95BZQe5AroTdTfffPWw2qiEfehNWzU7NjhuLCmrugswQlJF0H8I1chquDhFG+jsp3qrHPXfxSGQd4aFTBnfBwhV9IQ+2oBqXMFso4SthV6+n49sKDklGbXntUu4wpdWVsOYHg72FqCvmYJK1reK/eGstslh68FkN+/3kOTd4S2V42oChm9PQdH3Mx/NVv8YsbNI1nvF1SQSIJ2qqgze/A9Xh6iet6yYdNGxbpp31NtzwFeU/u17DUeOM15FmHyHG+fJfuN+SOyGvmItcMoGvK39E1cLhn9N4rvK/yvl/ORqLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3EarEKVqLBOyw8pasGse3nX/YC1pBHLGI0UaPVmTyn4=; b=FPFjzree2+Z/3Ojyv8GLpwJAVJIgtgTWxGzDlb4DKpOmTyPXt49NBFnz9IuyCf064gy8cqwoBmvL4nHVNpSq59IWEsrV+UWoSRJSUFwfuVVntMzmpP1pPkFdZ2ZfSUUcfay7yeVGRa9fkVHGx43vHk2roDpgyBibiZNsflya4WOrMGCyz0GPZD76aivHvLLU++GX5qPTHC6Ah4RIruAoXO8mURic0DciLWLIBP3TYwcyhDV8OgHsVibPqSlzhMMKwAUl5oXmQJPkQ7CCID3Tyn9uvTZCFn5DgOLu7iMgJFYlLu3r5rKatgmBmaHAKF8VWHFXAq9hIs44yG+c8bqRow== Received: from BN9PR03CA0272.namprd03.prod.outlook.com (2603:10b6:408:f5::7) by BY5PR12MB4835.namprd12.prod.outlook.com (2603:10b6:a03:1fd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Mon, 1 Nov 2021 09:15:47 +0000 Received: from BN8NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::71) by BN9PR03CA0272.outlook.office365.com (2603:10b6:408:f5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Mon, 1 Nov 2021 09:15:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT029.mail.protection.outlook.com (10.13.177.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4649.14 via Frontend Transport; Mon, 1 Nov 2021 09:15:46 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 1 Nov 2021 09:15:36 +0000 From: Gregory Etelson To: , , CC: Date: Mon, 1 Nov 2021 11:15:09 +0200 Message-ID: <20211101091514.3891-5-getelson@nvidia.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101091514.3891-1-getelson@nvidia.com> References: <20211101091514.3891-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4022c13c-367d-4210-4bd0-08d99d1830d5 X-MS-TrafficTypeDiagnostic: BY5PR12MB4835: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z0dHxRMAZivZBvYXjR3w2wS65bhA2yenozrBsQFE2bQNGE68tnXlqDoM2elHeSY6KRmnm9i0ntoyyGKajVSHYQVkScmpSKMQAdjE0HH5BbZwd5+vnmnftOv34dGXCJIEtMu84Nri7Nxy5m36vcTmo4OdUGXtwQKgpraFxHK9HOIpzX2nWngK6zzIGUXfwdpt1uZBVeBDeqrqmJjq1wwf00pjH2u8b77EucbmtUwpf36QozwQHhw8PzlVMXQQ2fkpaFxf4Ayz2LPTnAKZCSc96t+tbQB/qrkaPoNXXrGsc+IlFEBLncKjukKZ5utsJGeQpFnEvNNnOUVuVvbq+XFS10+/YVLGrK8R26r04jXyIjtL1YQDhWltEZIiG+CP2D0u+KR3JHOtdOK5YzIWangR+bLwmaB0qb/eralJ080Byc0KCRSt+RHAgl6YvkDAzgx0jrvwZYzis6pWvnQlu8HSWWe6xtn1M2RMPBTbxaFcnrplzBcip9QTADPnE6nlccsIFG0G2wTBqk6rrzAMAsIYF1MLiz35zVqaBLwZynoscTJcKGY16xfxHHIpzhEx4DS1B9oLJY4LEla7K8BPpMz/IsUIcSrrc1GnEs9GOZLiQGmbIuLAF5l49VowK69G+ax0NWW8dV4YylP4jK2i9dwyxvlmJm8CPcbIt0uUnWgq/2HS+L+IDiqQtV7zrNNatD7jWhRUmg9LzK3SNCSpSp0R8AF2tcAwtQ3nU8YNYmauNLU= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(186003)(55016002)(36756003)(8936002)(6636002)(16526019)(2906002)(1076003)(83380400001)(508600001)(8676002)(6666004)(7696005)(2616005)(36860700001)(336012)(7636003)(6286002)(86362001)(36906005)(70206006)(4326008)(426003)(316002)(26005)(110136005)(82310400003)(107886003)(5660300002)(70586007)(47076005)(356005)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2021 09:15:46.9349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4022c13c-367d-4210-4bd0-08d99d1830d5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4835 Subject: [dpdk-dev] [PATCH 4/9] net/mlx5: update eCPRI flex parser structures 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 Sender: "dev" From: Viacheslav Ovsiienko To handle eCPRI protocol in the flows the mlx5 PMD engages flex parser hardware feature. While we were implementing eCPRI support we anticipated the flex parser usage extension, and all related variables were named accordingly, containing flex syllabus. Now we are preparing to introduce more common approach of flex item, in order to avoid naming conflicts and improve the code readability the eCPRI infrastructure related variables are renamed as preparation step. Later, once we have the new flex item implemented, we could consider to refactor the eCPRI protocol support to move on common flex item basis. Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5.c | 9 +++------ drivers/net/mlx5/mlx5.h | 12 +++--------- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 4fe7e34578..aee4fbb5ed 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -865,8 +865,7 @@ bool mlx5_flex_parser_ecpri_exist(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_flex_parser_profiles *prf = - &priv->sh->fp[MLX5_FLEX_PARSER_ECPRI_0]; + struct mlx5_ecpri_parser_profile *prf = &priv->sh->ecpri_parser; return !!prf->obj; } @@ -885,8 +884,7 @@ int mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_flex_parser_profiles *prf = - &priv->sh->fp[MLX5_FLEX_PARSER_ECPRI_0]; + struct mlx5_ecpri_parser_profile *prf = &priv->sh->ecpri_parser; struct mlx5_devx_graph_node_attr node = { .modify_field_select = 0, }; @@ -949,8 +947,7 @@ static void mlx5_flex_parser_ecpri_release(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_flex_parser_profiles *prf = - &priv->sh->fp[MLX5_FLEX_PARSER_ECPRI_0]; + struct mlx5_ecpri_parser_profile *prf = &priv->sh->ecpri_parser; if (prf->obj) mlx5_devx_cmd_destroy(prf->obj); diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 5768b82935..8ae66c4f34 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1015,14 +1015,8 @@ struct mlx5_dev_txpp { uint64_t err_ts_future; /* Timestamp in the distant future. */ }; -/* Supported flex parser profile ID. */ -enum mlx5_flex_parser_profile_id { - MLX5_FLEX_PARSER_ECPRI_0 = 0, - MLX5_FLEX_PARSER_MAX = 8, -}; - -/* Sample ID information of flex parser structure. */ -struct mlx5_flex_parser_profiles { +/* Sample ID information of eCPRI flex parser structure. */ +struct mlx5_ecpri_parser_profile { uint32_t num; /* Actual number of samples. */ uint32_t ids[8]; /* Sample IDs for this profile. */ uint8_t offset[8]; /* Bytes offset of each parser. */ @@ -1167,7 +1161,7 @@ struct mlx5_dev_ctx_shared { struct mlx5_devx_obj *td; /* Transport domain. */ struct mlx5_lag lag; /* LAG attributes */ void *tx_uar; /* Tx/packet pacing shared UAR. */ - struct mlx5_flex_parser_profiles fp[MLX5_FLEX_PARSER_MAX]; + struct mlx5_ecpri_parser_profile ecpri_parser; /* Flex parser profiles information. */ void *devx_rx_uar; /* DevX UAR for Rx. */ struct mlx5_aso_age_mng *aso_age_mng; diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 9cba22ca2d..ff8f2b75e1 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9935,7 +9935,7 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher, */ if (!ecpri_m->hdr.common.u32) return; - samples = priv->sh->fp[MLX5_FLEX_PARSER_ECPRI_0].ids; + samples = priv->sh->ecpri_parser.ids; /* Need to take the whole DW as the mask to fill the entry. */ dw_m = MLX5_ADDR_OF(fte_match_set_misc4, misc4_m, prog_sample_field_value_0); -- 2.33.1