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 52C5D44145; Mon, 3 Jun 2024 12:54:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40B4442E1C; Mon, 3 Jun 2024 12:54:57 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2072.outbound.protection.outlook.com [40.107.220.72]) by mails.dpdk.org (Postfix) with ESMTP id 4B55942E1C for ; Mon, 3 Jun 2024 12:54:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UxJ3bk3azi6RMg08rl36DR5cY9ysnE6WC2IwjnMt3O9dzF2uxMTZWmr7psgpKFqNjNEBBUDJ3qB+X2OPZICUpUHvbtRW6Jp/6pi/EpUnSrSX+ohK6HagcSzXmqHIQBEzKgE9N7FhPwaD7uatSHNMrKo86SnTBSxMUaG3qsqyh3+ILbDwXAyLYMxmLQOjgPt7yMEHk8qAfFWEgahHZROHAawTswxCvg2jdKMgR00DMHEZDv3XB6l6yyDjG6ruOoPs8i01wKbWruIlWkyrAK8rbgL6TqRerDf6bAK0vs4qryfp6JsvVYLqjYS4nZbLI4qHgsFSHl752JmLXu33AiRFlw== 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=2gWPW52vaATj/B1c/7hPjHwgJ/l1JdIMyLCrrBphmxU=; b=C6R53ZrRKq2Boy42DLPikPscBHi1REUXtyryZ082IQW02+vFThqpjbmqCXiyDy61wxtd4psqGruW2r8nX89W2U3FCH+prkEXt5kqEvf1BftG7h+bIy07uZD5TApARDFhh38eX62DFkDLjMNHmnjH6rQJw5dZfvPE5WfhBFM551oVhT3XQ1JYZHqPbnmbSFvygl0KZ4D2VqakLGOtgAUGsDItDucwA8GwuzW6hQvGqW0kKxa8XxpDgHW42o3uYfzJ9eJIQ4VEzcKoYhiPdBg9X9V2kzM5/iG+K3jY098MQKFi0WGp87sVubDxkwD2BL7z8D0Fvxrxoz+GfWj/PDkuJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=2gWPW52vaATj/B1c/7hPjHwgJ/l1JdIMyLCrrBphmxU=; b=kOHyIsYy2ecGx2+3VIRnlUVlEhE83mm7hmXpoq4vItPV5ebbBpczgw44p3CMUnNu6yGq04zpfCsTuHu/6YTKMQzPVP1D3zUJXOK7jJJCsfsd+w0Hvc9FhzABbSDeibXrB1X2f4kmmqYQlEYX6+jR+P6wE7ldQzrHZVW8nnzcrD5Z9fbACar8Cng/9WX/k/tekUSzmOui8JiynJ5TB7whBVFPnv7viAW2U6RRZR5P6KRAaEcf/ZLJzU7ODIZXD9y6K+LKwNdoKZeQqZxj8RI7uBomFOCyTwxNhSPWiso8XfXF35DkVDVpMWo1LaCX82MKVFNCsqFvCJJaCgetZ07hFQ== Received: from SJ0PR03CA0364.namprd03.prod.outlook.com (2603:10b6:a03:3a1::9) by CH3PR12MB8581.namprd12.prod.outlook.com (2603:10b6:610:15d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Mon, 3 Jun 2024 10:54:52 +0000 Received: from SJ1PEPF0000231D.namprd03.prod.outlook.com (2603:10b6:a03:3a1:cafe::e6) by SJ0PR03CA0364.outlook.office365.com (2603:10b6:a03:3a1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.28 via Frontend Transport; Mon, 3 Jun 2024 10:54:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF0000231D.mail.protection.outlook.com (10.167.242.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Mon, 3 Jun 2024 10:54:52 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 3 Jun 2024 03:54:37 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 3 Jun 2024 03:54:37 -0700 Received: from nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Mon, 3 Jun 2024 03:54:34 -0700 From: Maayan Kashani To: CC: , , , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH v3 1/4] net/mlx5: reorganize main structures Date: Mon, 3 Jun 2024 13:54:27 +0300 Message-ID: <20240603105430.10818-1-mkashani@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20240602102908.197054-1-mkashani@nvidia.com> References: <20240602102908.197054-1-mkashani@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231D:EE_|CH3PR12MB8581:EE_ X-MS-Office365-Filtering-Correlation-Id: ee433a72-dfb1-4f1d-ae86-08dc83bb98b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|376005|1800799015|82310400017|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Yt1BG58rJCcyCCILlrL6jvFo2fyFIUc57EZHCTniEVo0hAmjqz5iNuf0Y0Wx?= =?us-ascii?Q?ncq8rqrhEg+P6zP8guhXQbthBbG4ek6XEistFu7IU72oRkBPzLr4J0Z7BhQ+?= =?us-ascii?Q?AkV2YdI0eKYFGKe5Pj3fM2zhAnJmJIUeGe+8WG5tJKHdG7j8rs67DyMSAZ+s?= =?us-ascii?Q?8YGbPbkwJ5uxgWLTr6qdaepY9s6dkpfSiwSqXx3r+OjLXRC3vOJ3Cc935ior?= =?us-ascii?Q?wY/ZrrxN7DJ1at3TAdLu2Y/IcUv3SkxbWisNlk9OA91JHlzWbPAuFjIEDNim?= =?us-ascii?Q?aAfKbYZU6Ke3MJYyJLJsqVPCwcER2QkjenCdhTUxKvDkFpCPcKtPMnGIFDPw?= =?us-ascii?Q?NxYzj1brjuA0TkZz3/U0wAOwRqAfEZK+s0nc06dCtI6dKwtgd5xS9OADilIe?= =?us-ascii?Q?pYi4NETD33TR5TmUaIBhOWepVpnEd2IlE1QR/agEb/qAb/+Kc8fuMfs9knh4?= =?us-ascii?Q?rdSL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= =?us-ascii?Q?3efaQCljLP/Vwd+8KJFIDFFG0whn?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(1800799015)(82310400017)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2024 10:54:52.3243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee433a72-dfb1-4f1d-ae86-08dc83bb98b4 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8581 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 Reorganize rte_flow_hw and rte_flow_nt2hws structures for better performance, and removed packed. Signed-off-by: Maayan Kashani --- drivers/net/mlx5/mlx5_flow.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 7e0f005741..5a3f047968 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1328,12 +1328,12 @@ struct rte_flow_nt2hws { struct rte_flow_hw_aux *flow_aux; /** Modify header pointer. */ struct mlx5_flow_dv_modify_hdr_resource *modify_hdr; + /** Chain NTA flows. */ + SLIST_ENTRY(rte_flow_hw) next; /** Encap/decap index. */ uint32_t rix_encap_decap; uint8_t chaned_flow; - /** Chain NTA flows. */ - SLIST_ENTRY(rte_flow_hw) next; -} __rte_packed; +}; /** HWS flow struct. */ struct rte_flow_hw { @@ -1345,6 +1345,12 @@ struct rte_flow_hw { }; /** Application's private data passed to enqueued flow operation. */ void *user_data; + union { + /** Jump action. */ + struct mlx5_hw_jump_action *jump; + /** TIR action. */ + struct mlx5_hrxq *hrxq; + }; /** Flow index from indexed pool. */ uint32_t idx; /** Resource index from indexed pool. */ @@ -1353,20 +1359,12 @@ struct rte_flow_hw { uint32_t rule_idx; /** Which flow fields (inline or in auxiliary struct) are used. */ uint32_t flags; + /** COUNT action index. */ + cnt_id_t cnt_id; /** Ongoing flow operation type. */ uint8_t operation_type; /** Index of pattern template this flow is based on. */ uint8_t mt_idx; - - /** COUNT action index. */ - cnt_id_t cnt_id; - union { - /** Jump action. */ - struct mlx5_hw_jump_action *jump; - /** TIR action. */ - struct mlx5_hrxq *hrxq; - }; - /** Equals true if it is non template rule. */ bool nt_rule; /** @@ -1377,7 +1375,7 @@ struct rte_flow_hw { uint8_t padding[9]; /** HWS layer data struct. */ uint8_t rule[]; -} __rte_packed; +}; /** Auxiliary data fields that are updatable. */ struct rte_flow_hw_aux_fields { -- 2.25.1