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 E667F42A81; Sun, 7 May 2023 09:40:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED73842D1A; Sun, 7 May 2023 09:40:34 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57]) by mails.dpdk.org (Postfix) with ESMTP id BF62942BC9 for ; Sun, 7 May 2023 09:40:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SQwDev2aWBM4CzZPQTol+nH5XdE7Nf8MTG8rK/05aBMFVO3nQ0AZ8d0mljCEpAIsjJwTitPOxClXfW3s9cEdksdipxo4jOHrNBEslv5WWZlS7bnO6deLA7qDjhx64k0eZi+gJjvIzRSlaYuMuOx1GkQpkLmKAoYdto7PBtYiyi28mOJLpPy4SrUQYuoQrJyjZJsvAr8HMFcAdItKtoWdrNKjhvTxUddyYx8RbocikG88Vu+r9Coi8g6tIOwP4VNBE7GpQXGhG75RtW8FclpxoTMAtgB2XZtoy42D6z8suSDaNUbG9blyArcJE7sgkld8bKpb5ljlEuy/CEGs1eS/eQ== 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=ANDrAE+cT5SEi3f05x9YWtCkXyxbp2w8Pwnk9VWE3fk=; b=fZRwuSEaMemDm3ZQgR0GF3+6LQTzA/B8yo6QSJkwWcDO3XSB9DLVRZZae8alF5h9QS7MiwQKbSquNPq57XGWcBrvo4BqQzkXy/sSnHo/7+AshtbDDmcptnwd0aWicg9+CGuvc3EgxN/tUkwYVAyeu0VAvZywW+dV3CDcBJmChMTB66KItt87fpAEZOGX2AxVxXzh2Gh0T+WLadoVImnRskxh4VnSnlWzqg7CL+PsC5P1wZLYAW7FKN9vOxE+vFLAgh2fk51mbT5ojJRoiqIMWouw8+Qo8zXmbJsx6gv4pLgNIslPPoxH80cUTBLm5ML4T6vrAbvtB7fXDZTskGybuA== 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=ANDrAE+cT5SEi3f05x9YWtCkXyxbp2w8Pwnk9VWE3fk=; b=A1Q7iuma0IUEahNQaGilee9+6oGiD1cJRhyX5opR5Aha6R8UANXFCGCRdKVkOcdbgIEH+DhRs7YsCuQP7rs/J+hNVcMh4mr1MdlCwHzXnFyGvsQwaGicb9wdCwuiANLKKTAOv/WKvyRsdfI3ODphEU8Mb1hQEVE3HYgZIJBdRGIYAaHG9CTOLRsGVQPtMxUq3B+0RgOD1oVQCRtBZQVEFW3OaHovKP6ZlOzywlX5l5vWTiLy9EK4s010Ty9HuL0P60wONeyEdfzfeUJ63xLrsosZn0X8zVmrN65en8R8eShOvyrF0i8WobbhTnJv+aSMNM5qxuvOlfJW1xdFQZgA1A== Received: from BL0PR01CA0034.prod.exchangelabs.com (2603:10b6:208:71::47) by SJ2PR12MB8652.namprd12.prod.outlook.com (2603:10b6:a03:53a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.29; Sun, 7 May 2023 07:40:31 +0000 Received: from BL02EPF000145B9.namprd05.prod.outlook.com (2603:10b6:208:71:cafe::d5) by BL0PR01CA0034.outlook.office365.com (2603:10b6:208:71::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.31 via Frontend Transport; Sun, 7 May 2023 07:40:31 +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 BL02EPF000145B9.mail.protection.outlook.com (10.167.241.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.14 via Frontend Transport; Sun, 7 May 2023 07:40:30 +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.5; Sun, 7 May 2023 00:40:14 -0700 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; Sun, 7 May 2023 00:40:12 -0700 From: Gregory Etelson To: CC: , , , Viacheslav Ovsiienko , Matan Azrad Subject: [PATCH v3 1/5] net/mlx5: update query fields in async job structure Date: Sun, 7 May 2023 10:39:48 +0300 Message-ID: <20230507073952.4061-2-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230507073952.4061-1-getelson@nvidia.com> References: <20230118125556.23622-1-getelson@nvidia.com> <20230507073952.4061-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: BL02EPF000145B9:EE_|SJ2PR12MB8652:EE_ X-MS-Office365-Filtering-Correlation-Id: 0658ee30-599f-45c9-5082-08db4ece559f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tLBL09rnAYGAHmR0sLoP5ZHRVczRBd6OIxSvWyjXKtwZxvtobnxggARz+OfzxW8HREB2mxWmd3kp1iIDi7pApaArRXM067rFVb5NkGV2vFngwbw1a3sARaeDkYy1y0rUQOma+rXc6qq64fk+T7dc6npRdqa1ExdcS6q0nWusBS+cYT/dwmy/pQmw1iXBcHI1gJBh7uqztG2nfTaIDFPWS6pVwS8t0xH3fDnVpsjKV0ooMrCDi+SV6YuQ+1WOsYhLN/7XmkQ3Gbaa1/QVcvaOAm6wYnutuImxP9LYxOvYNz2d9/g3uhrXf1kf85Vj4V9t7QroX/ZKeCZGm+xwVZ3GF/pKTHtEuF7jx85+83IRZ9CafVj3s+PiVpr9tYSPMTIyFqnZrwiMpDoYKEAfrFvWeAHGXaHTqCCMwlOTa1zBOxRrMTcpsyjGTILbO4/swWDbIDPf9ocoGYx36WjnuQKs79Y48ukZAsd5UeR9morT18zoq49b+JZXZ+kLp0ThgWpABj+zlSvZQ7Ln8rgOR30zb6ClldfVlR5loOE6+Fq2WBYQJl0juDnRC3JpYRvHjIS62nEG+OnZCm9V4ZvgESHeoz1BrTvPaE05UIPNwUxQSOW0WBks/mcDlosfbKhJGBBmcHe9iexFE4KDdhKiQw2zjZWin87saYq8niNMigwFQJhuJxiXx1KY2eL7qmHtEwEkk+I9815UchiHxrc6YfU1hQ== 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:(13230028)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199021)(40470700004)(46966006)(36840700001)(5660300002)(8936002)(41300700001)(8676002)(2906002)(54906003)(15650500001)(4326008)(70586007)(70206006)(6916009)(478600001)(316002)(7696005)(6666004)(40460700003)(107886003)(83380400001)(26005)(1076003)(36860700001)(186003)(40480700001)(55016003)(426003)(36756003)(47076005)(336012)(86362001)(82310400005)(16526019)(6286002)(356005)(7636003)(2616005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2023 07:40:30.8072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0658ee30-599f-45c9-5082-08db4ece559f 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: BL02EPF000145B9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8652 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 Acked-by: Viacheslav Ovsiienko --- 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 9eae692037..18ac90dfe2 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -368,11 +368,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 853c94af9c..2a51d3ee19 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -2876,8 +2876,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; } } @@ -8619,7 +8619,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