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 7D9BB41E33; Wed, 8 Mar 2023 18:02:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA2A7427E9; Wed, 8 Mar 2023 18:02:13 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2059.outbound.protection.outlook.com [40.107.102.59]) by mails.dpdk.org (Postfix) with ESMTP id AA98A41143 for ; Wed, 8 Mar 2023 18:02:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UxumR6qBg1idn3X4H/xYXSS2k8SseyeMKc9uRpGWhQigjVML+RQMVZztX6tNztEis4ZtYGmv2O6RI4dSJ+/+73CvrAcanaP2rwJLPgUJpkqKl5ACrhKn29341AWhJbx4qocEfpZ1cKuprsMo9/HThdHctbBibYWCG1AHTC5slWoQm8GWb5wqxV8oB2r8+KtyXFFs63BORHORwgJP+iScxFTpCBsiDN3aM8r4v48OSYncVlrGHq56sU6uYsOIrcJujp/n3Ef/7313nS4loDRBmc1yE6UzpI07GzYtwNBac6rliA85LQVGDchf12QjxWWz6ob7WCKwbaLIOfBw2ym9ZA== 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=khicVZrPr3USjeQZ9Z2HLmu89tMOfFXB0GcXnGWfHv8=; b=SmObgqAt4exjxNfC8vfWbQ9p63llACj6BQjeKwTtPFDF3xZeP3sULIGgwuHz9ckmK/SpigN6q4tdN/uf0xSXTPMeDWXsbnlNJkPDWwJmTAIEsNfskGZv0nD4j9fiFeialjfL1cOn9pbe3WHtACF5Iw7mKMgOq45FdRzBChWvtugTyzsp+aAVba0AIeCOD+fzzMvJwI8WJvO3zEnh7hH1a8E03cPmvNTkgFWtQMyBMnS0qylV4JQMvWLQ55jP5X2ojLY3Lb2ZBbM9lr9iDmm3txz5Q5Rs5YFAbPJ1smG2pRjBA41e/2S5yV950mkZNVTookr7GzeUX2bw/H+L++314g== 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 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=khicVZrPr3USjeQZ9Z2HLmu89tMOfFXB0GcXnGWfHv8=; b=arlyq1Y7Gt7FSQAfVRk6I6ucJ4EM/Wc8Usn8rOBcmc1didtjLuSCLLzqyJYxHpWNMszU6u7q+soW2Qwu7Yz4SkHgX7ftak0/y8HQ13Iy6TgNX7ZufGpV8Lc8zWO+wYvUUi9SDjCAF6p/DJ4F1HLQaRft5l4BJp8TTwi9QemmORBgQTrh/L9sXc2N4IFhp7SRjwgWMNaXkJQTwoSMaFws+nWrHeDEa4Pm3WIabnT5drs1rYI2o/52XgXkE/CCbdmDJyiUeR/KFANSr0FmhkQ62apx65pS7CbI4eE/mcnrstIYzboifUz6/49CIUxEuyM3D+HfRXAnCfy/2U/lWEdYXQ== Received: from BL1PR13CA0431.namprd13.prod.outlook.com (2603:10b6:208:2c3::16) by BY5PR12MB4196.namprd12.prod.outlook.com (2603:10b6:a03:205::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.29; Wed, 8 Mar 2023 17:02:09 +0000 Received: from BL02EPF0000EE3C.namprd05.prod.outlook.com (2603:10b6:208:2c3:cafe::14) by BL1PR13CA0431.outlook.office365.com (2603:10b6:208:2c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17 via Frontend Transport; Wed, 8 Mar 2023 17:02:09 +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 BL02EPF0000EE3C.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.12 via Frontend Transport; Wed, 8 Mar 2023 17:02:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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.986.5; Wed, 8 Mar 2023 09:01:47 -0800 Received: from nvidia.com (10.126.231.37) 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.37; Wed, 8 Mar 2023 09:01:45 -0800 From: Gregory Etelson To: CC: , , , Viacheslav Ovsiienko Subject: [PATCH v2 1/5] net/mlx5: update query fields in async job structure Date: Wed, 8 Mar 2023 19:01:27 +0200 Message-ID: <20230308170131.3195-2-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230308170131.3195-1-getelson@nvidia.com> References: <20230118125556.23622-1-getelson@nvidia.com> <20230308170131.3195-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3C:EE_|BY5PR12MB4196:EE_ X-MS-Office365-Filtering-Correlation-Id: 238922a1-35b1-4ca9-d923-08db1ff6da68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kbmZBEDiG3Ojgw0i+s5JYyxcfelJQ6UledF3ehyHGgWbd20FMUYYRn/+7v8yOCzsLlj75Ikp8KXMDghVzXaNdJ+dxnpeNxxOPekpulQOdNUyQMk+w/d5TTJagmvrZ9SHXBC0KsYXN7/IaZB4FDv4HuRWfp+eSxdnD1TxW903QyCtz8dZ6EI+6jvrLQtHHw3b+397qwu37Mo9xL0O5R52m3GjGqJHgMeKtY3r5teBfrj1gX9y02ATrnHctqot1Cz68NeH7uSwLAMcVPSuU3A/Lm9ahpdsqFIGT6ya+JRdkxM/ikLBz9LUj1gF1utOE+7MLzrOBmzxPRK3rSoyfZD4sWmJN0V+HMo9mjlTDsXZ0y1ACX8wDuQRxd0HjEBYJ8cFruSITFMk5NapXuxtwoL5ubUYpnG+vLnC1VAtkJJVQBT5zx7v6S+ccS2jIXV80u8au44rGVrEcUnWLN1vj3MGgn/IMt/NAcw1uo/TGd3dCJdP3nTaR1VSrfnlyS/3/r5gZxjxm6YlkE6Y+s9R1gTxqFrMvcp1E6by5Do58YBT7Le+EQKrhZclZR5BACrrzRhjxq5h6QZT039FxY2qcEE4XR1lSXCdqaceuG8NEv68DumH0VbaxTqfe0dfiB85Zt1CqlXbu2nWm2Nhxv2hEcOuwqFJBGBFRjFP+pf884HuWmg= 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:(13230025)(4636009)(39860400002)(396003)(136003)(346002)(376002)(451199018)(36840700001)(46966006)(70206006)(70586007)(4326008)(8676002)(6916009)(2616005)(6666004)(107886003)(47076005)(426003)(86362001)(36756003)(5660300002)(7696005)(316002)(83380400001)(54906003)(82310400005)(356005)(478600001)(36860700001)(8936002)(40480700001)(2906002)(55016003)(336012)(16526019)(186003)(6286002)(7636003)(82740400003)(15650500001)(41300700001)(26005)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 17:02:08.7121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 238922a1-35b1-4ca9-d923-08db1ff6da68 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: BL02EPF0000EE3C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4196 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 Query fields defined in `mlx5_hw_q_job` target CT type only. The patch updates `mlx5_hw_q_job` for other query types as well. Signed-off-by: Gregory Etelson --- drivers/net/mlx5/mlx5.h | 10 +++++----- drivers/net/mlx5/mlx5_flow_aso.c | 2 +- drivers/net/mlx5/mlx5_flow_hw.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index a766fb408e..aa956ec1b7 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -366,11 +366,11 @@ struct mlx5_hw_q_job { struct rte_flow_item *items; union { struct { - /* Pointer to ct query user memory. */ - struct rte_flow_action_conntrack *profile; - /* Pointer to ct ASO query out memory. */ - void *out_data; - } __rte_packed; + /* User memory for query output */ + void *user; + /* Data extracted from hardware */ + void *hw; + } __rte_packed query; struct rte_flow_item_ethdev port_spec; struct rte_flow_item_tag tag_spec; } __rte_packed; diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c index 29bd7ce9e8..0eb91c570f 100644 --- a/drivers/net/mlx5/mlx5_flow_aso.c +++ b/drivers/net/mlx5/mlx5_flow_aso.c @@ -1389,7 +1389,7 @@ mlx5_aso_ct_sq_query_single(struct mlx5_dev_ctx_shared *sh, struct mlx5_hw_q_job *job = (struct mlx5_hw_q_job *)user_data; sq->elts[wqe_idx].ct = user_data; - job->out_data = (char *)((uintptr_t)sq->mr.addr + wqe_idx * 64); + job->query.hw = (char *)((uintptr_t)sq->mr.addr + wqe_idx * 64); } else { sq->elts[wqe_idx].query_data = data; sq->elts[wqe_idx].ct = ct; diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index a9c7045a3e..cd951019de 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -2738,8 +2738,8 @@ __flow_hw_pull_indir_action_comp(struct rte_eth_dev *dev, idx = MLX5_ACTION_CTX_CT_GET_IDX ((uint32_t)(uintptr_t)job->action); aso_ct = mlx5_ipool_get(priv->hws_ctpool->cts, idx); - mlx5_aso_ct_obj_analyze(job->profile, - job->out_data); + mlx5_aso_ct_obj_analyze(job->query.user, + job->query.hw); aso_ct->state = ASO_CONNTRACK_READY; } } @@ -8275,7 +8275,7 @@ flow_hw_action_handle_query(struct rte_eth_dev *dev, uint32_t queue, case MLX5_INDIRECT_ACTION_TYPE_CT: aso = true; if (job) - job->profile = (struct rte_flow_action_conntrack *)data; + job->query.user = data; ret = flow_hw_conntrack_query(dev, queue, act_idx, data, job, push, error); break; -- 2.34.1