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 10E7F438CD; Mon, 15 Jan 2024 10:14:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF1E740689; Mon, 15 Jan 2024 10:13:59 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 16F97402E7 for ; Mon, 15 Jan 2024 10:13:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hHag71kvrbrPwQmhI3+pbOPxaJX6tEp86fywaJ2ZPUnft2elBX6npySjWSSw5M/R+I+BRTszJtPIJRbqw/7F4hB92qlyQoz0bRVLeduC9Zg8MwuRkExmiicu3C82HXLY6qAXmaRgBkzO/nH4PYX5gAMLP0fOZHDLV7P66GFEDUXWVTGnraOF2gntz77Oyrkha1XYP9FpsZig+pAS8R5/WENZ8tFZkNKOLq114M2nfBfNi9a/w6I8zyxyd5ZjG0rMTrT0NjzPbvefnjWodws4pVMX8Uia7Y8mqeVrCnuXfI8KXNCMVc67H3hQUQESfODF6eB7yTFcS5pvAQ1U3fD2Qw== 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=GOsDJOlhYfzxzuO0fawkIfN23FyXF9LgVcKPikqCePU=; b=A5SM7IUinhoHyHAxNHwFURFcfgOzpRttINPZZh66heJ0IDpPoRtOBgEbYyRtQiH4kqEWeDihHWB+9FzXNP/gwVNloMbl7gR7ta/HMIB8YI8Lq8j1UZqMdFEFauNzCkzhetK+s0cX8mh7fCGPcvmPgzdVFLPJ9XPXQAb1GM47GmIfVjrSqTUd+pRj0Vc7VtdYz8E4563zFSXTEwmg7Io/M8g5BBVvuYRbaUmJn4Uh8aOVlN6LRF/RWgQlcHSMpfcUJWVxIO5z8OcES2Ln/y4QMJmcjTnk3BhwsWXdsmfa8QnKij8ovUo6sCFriZBDWcK8/t5s2SRLg1m6y2xXYO/1jw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=GOsDJOlhYfzxzuO0fawkIfN23FyXF9LgVcKPikqCePU=; b=Lo3EKKj1SrvX8HLelnd2I2tAsSxdv8gcPZ8r8PUGxpTmgXcIILK71SU7cMZl7D3kWpzSJlxGfQhwbR88JgIMSq+jhI35a+Tj+XVJw4nj5ArHDId/2rVDDmYc/+y5ezpuIBM1I2qLbL+s4Rf2JpnXkX/H8JdwjJH9LLCalG6bDif1Mma+861rYhnhcPZaA/0tVfNqBDa1nQP6xvOp9nAjjXx0IBQvRpGwDHlJnLOTVP5wGpxjDkbaS4hR3+6kNke8uH5Z1qw3RAkLdIDHjjwMLq6tiEpe3vVXNeeWpwf0Tf7+fzM1mPWojYkE8l4gIt0OFhHovPxuyjRPyrr2KXaDbA== Received: from CY5PR22CA0092.namprd22.prod.outlook.com (2603:10b6:930:65::7) by PH8PR12MB6986.namprd12.prod.outlook.com (2603:10b6:510:1bd::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.18; Mon, 15 Jan 2024 09:13:52 +0000 Received: from CY4PEPF0000EE3B.namprd03.prod.outlook.com (2603:10b6:930:65:cafe::b1) by CY5PR22CA0092.outlook.office365.com (2603:10b6:930:65::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.26 via Frontend Transport; Mon, 15 Jan 2024 09:13:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EE3B.mail.protection.outlook.com (10.167.242.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Mon, 15 Jan 2024 09:13:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 15 Jan 2024 01:13:40 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 15 Jan 2024 01:13:36 -0800 From: Suanming Mou To: , Aman Singh , Yuying Zhang , Dariusz Sosnowski , Viacheslav Ovsiienko , Matan Azrad , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko CC: Subject: [PATCH v3 1/3] ethdev: rename action modify field data structure Date: Mon, 15 Jan 2024 17:13:16 +0800 Message-ID: <20240115091318.1053433-2-suanmingm@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240115091318.1053433-1-suanmingm@nvidia.com> References: <20231219013337.531548-1-suanmingm@nvidia.com> <20240115091318.1053433-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3B:EE_|PH8PR12MB6986:EE_ X-MS-Office365-Filtering-Correlation-Id: 466a4286-a034-47b6-101a-08dc15aa4af0 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1cJd8l4xkFVCvD/m78rqup4NNNuEeCQg6x9eqPfCSk5ODmkoSD0VekmC+FWBbRCqcImnGB/+lE0SCkiMYVIKN6SHze7+ynz0i1MgWo5IO7V3Ba1IHXI73y6FS5sxBZEXRn6woYeAewZCa9RLAQenb4Xp4nSks10sfGHkag0mFgMPLhEhi5E1HgGR1J+McTeNYo/CLBjGHCny0iWEZJfGYamWsn8FjCHXZ0ij8wmHE206qCeMFQ1b4Ooww7cYFn1TryrE1envgbgEtzvhoFyb9m8XJoqefI0AlHqvBzJ/+x2bfnnSG1m5Uh9CXuCO04QCEsBj720TyYwAE9RDU4auK/zQaqu1DKHIwa88Jigf0GX3dmKzFCwSFbEtMbKAC8rpEhWQ2efaCiBCyig05Yn2hdU2yabA81ZUrttU5Q5lok4TLXio/twwqbea9s7VREj/426bdZXdwBETFaRmyihgNL2OvqCJoN/yORIOvxezcQzeSjTlfUZnWxCAo5qmaHidbR2yZ3bjUNrJMqnsm5W+AsrY7sPDvf6Fng14iXpKEY6sW2w4yyv8VUP5zXdApxIoIob818oUgbfAb8GrQF8O8Vw7Tgo/LZ3e/0YeNHjMcZIr+wxV6Non4YveQz4rho2zWAaB4XvkgV4E+GLhCyWLxZhH/HVyFmmfmHJd+RkGMSJvcDMA+o69uj4AZIuEmgyHo1ffzh/9CXeveqDW04ntE0no3w07/Bt6593fQkc9GbinQ9ImJHFniUCecoH6nEiMlBO7SjG0ikVEPWaL+/vAHdrlrsJmXJf0mbthYNSGoyc= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(396003)(376002)(346002)(39860400002)(230922051799003)(230173577357003)(230273577357003)(186009)(1800799012)(451199024)(82310400011)(64100799003)(46966006)(40470700004)(36840700001)(55016003)(40480700001)(40460700003)(16526019)(82740400003)(6286002)(478600001)(336012)(7696005)(26005)(426003)(1076003)(2616005)(86362001)(356005)(2906002)(6666004)(36756003)(7636003)(41300700001)(83380400001)(5660300002)(47076005)(36860700001)(70206006)(8936002)(70586007)(110136005)(316002)(4326008)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2024 09:13:52.4544 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 466a4286-a034-47b6-101a-08dc15aa4af0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6986 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 Current rte_flow_action_modify_data struct describes the pkt field perfectly and is used only in action. It is planned to be used for item as well. This commit renames it to "rte_flow_field_data" making it compatible to be used by item. Signed-off-by: Suanming Mou Acked-by: Ori Kam Acked-by: Andrew Rybchenko --- app/test-pmd/cmdline_flow.c | 2 +- doc/guides/prog_guide/rte_flow.rst | 2 +- doc/guides/rel_notes/release_24_03.rst | 1 + drivers/net/mlx5/mlx5_flow.c | 4 ++-- drivers/net/mlx5/mlx5_flow.h | 6 +++--- drivers/net/mlx5/mlx5_flow_dv.c | 10 +++++----- lib/ethdev/rte_flow.h | 8 ++++---- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index ce71818705..3725e955c7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -740,7 +740,7 @@ enum index { #define ITEM_RAW_SIZE \ (sizeof(struct rte_flow_item_raw) + ITEM_RAW_PATTERN_SIZE) -/** Maximum size for external pattern in struct rte_flow_action_modify_data. */ +/** Maximum size for external pattern in struct rte_flow_field_data. */ #define ACTION_MODIFY_PATTERN_SIZE 32 /** Storage size for struct rte_flow_action_modify_field including pattern. */ diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 627b845bfb..bf25c849fb 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -3171,7 +3171,7 @@ destination offset as ``48``, and provide immediate value ``0xXXXX85XX``. | ``width`` | number of bits to use | +---------------+-------------------------+ -.. _table_rte_flow_action_modify_data: +.. _table_rte_flow_field_data: .. table:: destination/source field definition diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 2c0e2930cc..a691e794f4 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -106,6 +106,7 @@ ABI Changes * No ABI change that would break compatibility with 23.11. +* ethdev: Rename the experimental ``struct rte_flow_action_modify_data`` to be ``struct rte_flow_field_data`` Known Issues ------------ diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 85e8c77c81..5788a7fb57 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2493,7 +2493,7 @@ mlx5_validate_action_ct(struct rte_eth_dev *dev, * Validate the level value for modify field action. * * @param[in] data - * Pointer to the rte_flow_action_modify_data structure either src or dst. + * Pointer to the rte_flow_field_data structure either src or dst. * @param[out] error * Pointer to error structure. * @@ -2501,7 +2501,7 @@ mlx5_validate_action_ct(struct rte_eth_dev *dev, * 0 on success, a negative errno value otherwise and rte_errno is set. */ int -flow_validate_modify_field_level(const struct rte_flow_action_modify_data *data, +flow_validate_modify_field_level(const struct rte_flow_field_data *data, struct rte_flow_error *error) { if (data->level == 0) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 120609c595..8e2034473c 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1121,7 +1121,7 @@ flow_items_to_tunnel(const struct rte_flow_item items[]) * Tag array index. */ static inline uint8_t -flow_tag_index_get(const struct rte_flow_action_modify_data *data) +flow_tag_index_get(const struct rte_flow_field_data *data) { return data->tag_index ? data->tag_index : data->level; } @@ -2523,7 +2523,7 @@ int mlx5_flow_validate_action_default_miss(uint64_t action_flags, const struct rte_flow_attr *attr, struct rte_flow_error *error); int flow_validate_modify_field_level - (const struct rte_flow_action_modify_data *data, + (const struct rte_flow_field_data *data, struct rte_flow_error *error); int mlx5_flow_item_acceptable(const struct rte_flow_item *item, const uint8_t *mask, @@ -2828,7 +2828,7 @@ size_t flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type); int flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf, size_t *size, struct rte_flow_error *error); void mlx5_flow_field_id_to_modify_info - (const struct rte_flow_action_modify_data *data, + (const struct rte_flow_field_data *data, struct field_modify_info *info, uint32_t *mask, uint32_t width, struct rte_eth_dev *dev, const struct rte_flow_attr *attr, struct rte_flow_error *error); diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 97f55003c3..e4bfcc76f7 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1446,7 +1446,7 @@ flow_modify_info_mask_32_masked(uint32_t length, uint32_t off, uint32_t post_mas } static __rte_always_inline enum mlx5_modification_field -mlx5_mpls_modi_field_get(const struct rte_flow_action_modify_data *data) +mlx5_mpls_modi_field_get(const struct rte_flow_field_data *data) { return MLX5_MODI_IN_MPLS_LABEL_0 + data->tag_index; } @@ -1454,7 +1454,7 @@ mlx5_mpls_modi_field_get(const struct rte_flow_action_modify_data *data) static void mlx5_modify_flex_item(const struct rte_eth_dev *dev, const struct mlx5_flex_item *flex, - const struct rte_flow_action_modify_data *data, + const struct rte_flow_field_data *data, struct field_modify_info *info, uint32_t *mask, uint32_t width) { @@ -1578,7 +1578,7 @@ mlx5_modify_flex_item(const struct rte_eth_dev *dev, void mlx5_flow_field_id_to_modify_info - (const struct rte_flow_action_modify_data *data, + (const struct rte_flow_field_data *data, struct field_modify_info *info, uint32_t *mask, uint32_t width, struct rte_eth_dev *dev, const struct rte_flow_attr *attr, struct rte_flow_error *error) @@ -5329,8 +5329,8 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, struct mlx5_sh_config *config = &priv->sh->config; struct mlx5_hca_attr *hca_attr = &priv->sh->cdev->config.hca_attr; const struct rte_flow_action_modify_field *conf = action->conf; - const struct rte_flow_action_modify_data *src_data = &conf->src; - const struct rte_flow_action_modify_data *dst_data = &conf->dst; + const struct rte_flow_field_data *src_data = &conf->src; + const struct rte_flow_field_data *dst_data = &conf->dst; uint32_t dst_width, src_width, width = conf->width; ret = flow_dv_validate_action_modify_hdr(action_flags, action, error); diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index affdc8121b..40f6dcaacd 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3910,9 +3910,9 @@ enum rte_flow_field_id { * @warning * @b EXPERIMENTAL: this structure may change without prior notice * - * Field description for MODIFY_FIELD action. + * Field description for packet field. */ -struct rte_flow_action_modify_data { +struct rte_flow_field_data { enum rte_flow_field_id field; /**< Field or memory type ID. */ union { struct { @@ -4021,8 +4021,8 @@ enum rte_flow_modify_op { */ struct rte_flow_action_modify_field { enum rte_flow_modify_op operation; /**< Operation to perform. */ - struct rte_flow_action_modify_data dst; /**< Destination field. */ - struct rte_flow_action_modify_data src; /**< Source field. */ + struct rte_flow_field_data dst; /**< Destination field. */ + struct rte_flow_field_data src; /**< Source field. */ uint32_t width; /**< Number of bits to use from a source field. */ }; -- 2.34.1