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 801D2A0C4E; Tue, 2 Nov 2021 09:54:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67B7D4113C; Tue, 2 Nov 2021 09:54:12 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2044.outbound.protection.outlook.com [40.107.94.44]) by mails.dpdk.org (Postfix) with ESMTP id 41DA741134 for ; Tue, 2 Nov 2021 09:54:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ndR9B5P1/Wms6KzKG2yIuMmAa11f5M6Isz4rDDFPODA9AWbtaYRMsS6FtqkZqfFRV/DTkHMND4y9OMu3AiDJ7m8FJP8grE+sxJea/cZhzhhDeze++ioTzRr+HD2uer4O4OV4IG/gjHMAFjW5NRftCTw12dhMhaleNbwSGGOO+0ZSXxq282tS4C43wUUo/sg9HF9oUuROzTkFLEsaxqJJ1UkQpTISoW2ortdhtL6uvyEkvfrpvAL8C/kOABhOEXqv1/Cr9VARAOjRzJkF/ZRMZXmDcqhb0CzcahlS2WJBlXYy4BdX+UNHeXgdL1U7TH/o+dclu5rZsUwn6PAg+IGvrw== 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=OvSluNBJSienYxhZzftsLJtAQ3mdZ7JJVvd0i57qVj0=; b=bbo6EIQTkuiEI6URG99rAwttXnOI834ljJTDHl4gMkffjxLnbEOjXsIjBUBNdHTTkRJf9OFOMyRI6eNnd3bgPpgXHh8sxIDgUaUAC5holCu+E6865yxFfSz5AwmdpSQgEgR+9oDgQmgin1VMu1m5m2NSBogpuItTd03p1ZnD9DZu9Fax8zl5e1ccbPd4Vky9pbOAtaP+UN/xxIpvI9ebqwzsQpHZcio64VtOAn90l+e/vIB7DZKbOcRVhbZgZTCdYIYKNYEK+q8n3qoUlV39FZELIagT/cRDKp1GsJzIpXJ3YVBkmwBJp9b2/ahptrqEAStTdjRu32auUb1cF6pBCA== 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=OvSluNBJSienYxhZzftsLJtAQ3mdZ7JJVvd0i57qVj0=; b=gHqRDEaV18YbnfwWZVHLGiowqlagnQNX8T+dNBjzCQZ7scYC50pa50xMFhSiXaFZPdku/kDKprEvMDgjke+tRUokQS+Y0xDzv+IeDMS081yP5o7MzQiMXYotHPt3slRh4pK0/wi9V4LHCVOoSnHAY+E/9veIfXalEE7bPngPOc+gIXxA66+pJZMsyp/PfuNuW8BP2bV8tyHg33S5FGRyezFDdJEnqf3dqXRYe1p6PJmxb6bgCjdV6opAoKx5NO/VVhR/i6sb8WbK5+CMunVZ3ycBE0zmlAwdOd5ejxatIJaTFFEOwWmJ5dcoc779dCWADaBZPGVHF91sJBXS6CmczA== Received: from DM5PR13CA0053.namprd13.prod.outlook.com (2603:10b6:3:117::15) by BN6PR12MB1556.namprd12.prod.outlook.com (2603:10b6:405:4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 2 Nov 2021 08:54:09 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:3:117:cafe::45) by DM5PR13CA0053.outlook.office365.com (2603:10b6:3:117::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.4 via Frontend Transport; Tue, 2 Nov 2021 08:54:08 +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 DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4649.14 via Frontend Transport; Tue, 2 Nov 2021 08:54:08 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 2 Nov 2021 08:54:06 +0000 From: Gregory Etelson To: , , CC: Date: Tue, 2 Nov 2021 10:53:41 +0200 Message-ID: <20211102085347.20568-5-getelson@nvidia.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211102085347.20568-1-getelson@nvidia.com> References: <20211101091514.3891-1-getelson@nvidia.com> <20211102085347.20568-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28d4f258-f1de-4dcb-8776-08d99dde5502 X-MS-TrafficTypeDiagnostic: BN6PR12MB1556: 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: eiOl6De8VSbkuUTviW6cexfqMz/xnFQ4TQ+ZaNlfBueEQ3EUK6hUzJKxYVs7JP562bCN9En0fVSv/cu/ocPT5UdtXogpl16xl+Ne/OvEo5x+M3FPrFiguKWgozNhv95PKcTmVasEXKSKFVau3bPjeoMExJn2IGRL0ShM8KmoBn3kWNaFvLIaGM0dZ2eaNanMLCV4bTXhbIyQHQ8Dk1iURoNZmcIRJAtc8LFYC9x7hSasvHcIhGEHpmezyVEmMcXoz39gobLBiqhoGZ6YS2dy3fMuxj7AAr5HCivIIooELTQmsdcnH7ekJTP/u49t0lKGeK2GMa+DpeGfdl3UneVGVM6WpYmlYXKl6KHNsHnyb8TPSGje4AYnTLvAxkgHMNfqpJcGJwamElHZnAdnVYKX6+CWfukGYUnDo+u+VdL8ixbhzaPCrCxYK+2imAodNt+7abdFBf6VFC6d/GW6/7IM8WBImJP0DqZNRdMtFHgA8LrAyxHLuKhpYyLyLgxAl40dAdFuTIeaA7RLFDti432pKnWjqvrGkk2Wm6/yAtqFsXFxvGwg4FLKgw5F0C6P0iSGfLOZNG8j/gDwc+HgjXTwyHDJAQUukLiaJkpc14CzkxJW8+4Te5mcRqHxMZswK9JjrvrR4xie6ZOQP3zWvBWuNVt1ijV5eHYprd+FCvmuTzjrlaldVF8ETDb4tec3XPZe4gilx1HZVEc74RONPaelw0uHXjilNE9YbOO2Prn1xf0= 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)(36840700001)(46966006)(2906002)(47076005)(107886003)(5660300002)(86362001)(6286002)(26005)(83380400001)(110136005)(7636003)(356005)(186003)(508600001)(16526019)(36756003)(1076003)(6636002)(336012)(6666004)(70206006)(70586007)(36860700001)(8676002)(426003)(7696005)(316002)(2616005)(82310400003)(8936002)(55016002)(4326008)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2021 08:54:08.3116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28d4f258-f1de-4dcb-8776-08d99dde5502 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: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1556 Subject: [dpdk-dev] [PATCH v2 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 4ba850af26..cd7bb3f27c 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -866,8 +866,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; } @@ -886,8 +885,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, }; @@ -950,8 +948,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 39c001aa1b..912c4a183b 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -1013,14 +1013,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. */ @@ -1169,7 +1163,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 8962d26c75..8e2714233c 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9892,7 +9892,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