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 B8BD54240D; Wed, 18 Jan 2023 13:56:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5247410DD; Wed, 18 Jan 2023 13:56:30 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id A976A40DFD for ; Wed, 18 Jan 2023 13:56:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQjB6E8jeO3xH6CTT2Rk6Bt2ryPqjI0s2Gkv/SL9354tPb/ZqhYtVCbukwtgR2LZz1D9pTxsFpwxp4muvx8DPphpVlpPfMCZhv7FH6nAkzgRDyQ7oFFDfy7wDhhH9bCBO/WoekZEyiorp5bvRtell3KSKwFIPJEgtauFNIVqM7lBduOXaZ+/hF17LdoqvFyihlgiBGWaE3T9o6RGIh4gQOjWZuzMk+JMNYCTAXNjFUye3GtY+DahrrvOxyXYNiKhL8LXhfciyOTVAmDZXrLKLlWw3325EpaV+upuCK51hB2a0QJYrMS4jHFtFoxGKugzPfCoE3/GY/rKLSLMY9oTpw== 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=bpiUnhKFYmr6ZTArUIdpOhGtzrFCyOR9OzzcZAIPLZ0=; b=CDfqHQh+KXVHW6R64o9VGQP2ivbC/d5yB/XTxVrTr1NvEgSdrCq2BGpg79slDdLGHRIiDA+d3UZNC/wOTW7HRB7cJqxn+liqCK0AWBU8fPMGL75RgR1qPM/SM79J3ICBZDEarClNX8SDdrdYdp9ZRGCcmYXJ+OfPJ7Fhq5GIbeQwkOl5MuqfrNEIKdBJyS15HzpWEJCY9PPPYOC0b/pcy6FHsiXLHc9jlvRuvrGocdLPZXxW0ABUJOFchLpsBDUcTzFCHnLeVEIlv3syXmmc1EESEhSIa4Q2IPNdIX27nQluGxXpcR3+hbbhNl6lSlPYu8FcfDaWIJlZeuQO1U0v9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=bpiUnhKFYmr6ZTArUIdpOhGtzrFCyOR9OzzcZAIPLZ0=; b=V7iId3OKpJQeg3POD/3EE4iytOUszZFcqr7KlK5UZzVXyewtq+MsYiNucH8hr/7YoRXIjwFlZAaVAr7IRKaPPG4xJazaj+UJ45Rm5Mf0D/cH5cnLdmCs7x01CLfmh9NipuEF3xyuPbpdNOrGDjuBIKL8QTnG5wqxjY9mazx/R/m92En7VrwyoKqd9X3eZoqgdcgWpqig7P1Da62mMWb/LCblgjdBbFnLGDA1sO+TUD4CVSFs9YNNKEVcbXolie+NrLYsLbbu1Prn5dHnqZ2ufiIryey+Z2QYVLl4GCL3+i7OepTfoOG4Qh5WJhQEenRXhj8RI9kJbGscNcyZdhLzyQ== Received: from BN0PR04CA0124.namprd04.prod.outlook.com (2603:10b6:408:ed::9) by DM6PR12MB5519.namprd12.prod.outlook.com (2603:10b6:5:1b5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Wed, 18 Jan 2023 12:56:26 +0000 Received: from BN8NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ed:cafe::9) by BN0PR04CA0124.outlook.office365.com (2603:10b6:408:ed::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 12:56:26 +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 BN8NAM11FT051.mail.protection.outlook.com (10.13.177.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Wed, 18 Jan 2023 12:56:26 +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.36; Wed, 18 Jan 2023 04:56:14 -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.36; Wed, 18 Jan 2023 04:56:12 -0800 From: Gregory Etelson To: CC: , , , Viacheslav Ovsiienko Subject: [PATCH 1/5] net/mlx5: update query fields in async job structure Date: Wed, 18 Jan 2023 14:55:52 +0200 Message-ID: <20230118125556.23622-2-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230118125556.23622-1-getelson@nvidia.com> References: <20230118125556.23622-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: 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: BN8NAM11FT051:EE_|DM6PR12MB5519:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f29cd2d-e035-493c-daa2-08daf95368f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v6VGSvgcowvmmC4DtKBFOh0Tp+M71tQefKK6RfOBisbcU/kNGs48gpMuRk0Dj/5ssJ66jlVNl0P5R2O0PXI6BGD+9ye2ltHDlUJL36wT0H2X8or1PXMgPqQQZjrBt2DjFu5vZiYfwtgvgL02sRUtBRZ1xqgD9vHAxqwve2P/cdviVLxcQirwknz1N2qb/dfDLvU5bOj4qMOhtBEnBpaTeXnV7rHG379Bl/IenjVNMJlFN06MhE8E2Ezq/xt5L0a//ur9SbqAzkFL9VzgFw/JD2LjvkjuxBBPNXMyJB9QrsA4nyHCSUPZuy+RkRyPrvOP992Q4iS3k40ueDllO5H4s8+wQUOWricRks7gy0qEdSFCn31F5RHAb8/8n1fdy61wiPo9BJGmlEeB2b3PpT0uhYO6Qo3MqXhF3Jz63lN77yWVYR+y+utXlCj86+/ftMg0agmEPvdJ8mvKuNbWRrELDAYoAeFRmwVjooSUkKoz7Z/yYDVx0YUH5pxwt0h7db2A6lg0hR1X2/eFgv46YwZvXL+GB3wZOhozA/M7tNfUs5TRcgLU3ss8Pr+svXJrwkHMVNFqHtKdIAOzS0cynpS5MTN4xsEPMwrG+EPpJCLogYP/qOCA5q0KuoQLMu8ViiyT3cEzUKwx8gHBi2s1L2ATc0dfDZgcEqewL6UVeg1xOV9cYnXO4/cx5O75X2mK3+IyjP3W6GJ4oVJJVytRHzLJUw== 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:(13230022)(4636009)(396003)(39860400002)(136003)(346002)(376002)(451199015)(40470700004)(46966006)(36840700001)(83380400001)(82310400005)(40460700003)(6286002)(16526019)(7696005)(54906003)(36756003)(55016003)(478600001)(40480700001)(186003)(36860700001)(7636003)(356005)(2616005)(1076003)(70586007)(86362001)(47076005)(336012)(82740400003)(426003)(107886003)(8936002)(2906002)(26005)(15650500001)(6666004)(70206006)(6916009)(8676002)(4326008)(316002)(41300700001)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 12:56:26.2925 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f29cd2d-e035-493c-daa2-08daf95368f6 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: BN8NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5519 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 16b33e1548..eaf2ad69fb 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 20c71ff7f0..df5883f340 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -2730,8 +2730,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; } } @@ -8179,7 +8179,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