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 4AC6743B7D for ; Tue, 5 Mar 2024 10:59:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F56F4026B; Tue, 5 Mar 2024 10:59:43 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2056.outbound.protection.outlook.com [40.107.237.56]) by mails.dpdk.org (Postfix) with ESMTP id 616F84014F for ; Tue, 5 Mar 2024 10:59:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wm1WbYZoVl+4ctPVA55FGt8RFK5SOln9sI+lBthSbon4yUFp3Fi1fWTfRY3bHlnDajzUZw/poFmOkao90w8s/K3BOgyxKMnBOGa7garjXjYtpk9HVfvEnU1hxetAQF6XuVjZ8qj3gB1EViOfD7NQ3Vxjm2Qsz/zXYYLqr2cx1m/D4W2LyGwCn/6DfmWy2FwMlmKk6CMj3n+TI5ITzsLUQg28SU3DQlDwX7EMuvF56UdWJgkH4p2hokYHYanQ3MgAsKM+5aYpA938jcUARNZ3NrFYkvSUIBdsvzqu9JObnJcfPucljT1tt6h3f896TyhsSIWatxmGND0H084ll5nSDQ== 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=UvGlcejg2PmtLC6JURTmdM4AWJsCtpMB/H/+J7sp85c=; b=jC2ZhNJC/DLXsxbPMa/ayRbQjfwP1hNNVALVBP4xwJAH2eYkckiHqHEWMFctXtT2bn8N6c2xPLZ5APj5uNYO025LButBw+C2Lkk5roGzN7hB1m1J3MtzMM3fYE5kQUHfsfTMoitZwUIcoYFcDMLlKPrq18kATVqZ6UvEUPrBP8az5E5Z2rZeEg18oyGyXa1klsO8g/dirq/zABgb1lo3djpFnaxCvh1m6hgYhhvFPkwPvJS6EXAegG3RST2lm8/9GNuakrauTkBKapyTLiDxzHAlDJYf+pCJCubl+nnz5v/is0omk29QTCoF7YVK1CLIoCbrI03KE59SHYMiSgZ9oA== 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=UvGlcejg2PmtLC6JURTmdM4AWJsCtpMB/H/+J7sp85c=; b=GQcQGM/Om1c8ks5ZlFtt3hwR6GhwgqMzeADJLEjYvAPwQu6D8fgsT8VjaTH5NrPDMm8C5TXGVUVd7RSxKNfGZOS/1FqbE6o+YG6k6wodu2BtDTByy9SvYyaOpySHe6lVa3KlvliNBl89XFKae6aBqPTVDbeQRg5Zpu0i2p419cstTUM8wPV/8N728AR+kKDiilj4rQB1hzkEtd4qha11C3X/G8CCB8VWsFmGc16nXoryK5X9b+qIYDIn8vPiD6Z5Xsz/EFFj1VxC4WJ3m6eQzLEWAUFUQspwO0dpc5KQOZNLz/upM6YlwgRlAL5HUWyJapXVHxEgqw/+QPYcEF+v4Q== Received: from SA9PR10CA0024.namprd10.prod.outlook.com (2603:10b6:806:a7::29) by DS0PR12MB7533.namprd12.prod.outlook.com (2603:10b6:8:132::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:59:39 +0000 Received: from SA2PEPF00001505.namprd04.prod.outlook.com (2603:10b6:806:a7:cafe::f7) by SA9PR10CA0024.outlook.office365.com (2603:10b6:806:a7::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:59:39 +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 SA2PEPF00001505.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:59:38 +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.41; Tue, 5 Mar 2024 01:59:23 -0800 Received: from nvidia.com (10.126.231.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.1258.12; Tue, 5 Mar 2024 01:59:22 -0800 From: Xueming Li To: Michael Baum CC: Suanming Mou , dpdk stable Subject: patch 'common/mlx5: fix duplicate read of general capabilities' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:50 +0800 Message-ID: <20240305094757.439387-130-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] 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: SA2PEPF00001505:EE_|DS0PR12MB7533:EE_ X-MS-Office365-Filtering-Correlation-Id: 0620e607-3a6c-4606-35c0-08dc3cfaf89d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 77DhK8rSlahDYtoEycti/6BOxWz5dC3KuDlqSAzWRvMRp2SwNfx+fyZ3a0ZdJ/tXXEMVX1Yp++dz6gfIYtgAvfbl+Qt3IWdj7ckCzcrR9kRMzbVELZA6pKONHtADl1mqpK/g3COrwWE54h8qxx7nhkDy4XwL8mYDfZlz/saVrcUns0pP8Mlbto8p/DmvkIoPtFyDq7lwDu2j5TYtDYk++aR6ZFcEBPtBT32OvVgR+FsQFpyIAep3hDA4Mxc2yDTc4BEYwvqagPdJQZQpzWx/2LgTA9dlPyESS8dy5q5PxPty9n9oZLwlMFnLv0xVlcN2bHTqmVH3hjWqA64MKJuF+9MGzFig+5mcjHxAgsPuyZ4ph5cq4oE1gGy9cwz+Ty6SdXBhlVoUDDBvV08mFQ8Ls59xaksLSKtvwRn2j3ieAmmSwnBgs3jlksqFT+qR4oRIsoHthAxO6LyUYJYzo+4tZiNkm/sDlgdR2xXSAqDMtL4igSKW4BGi36v36917j1wjeDv9IP3bgKRhlx4hcy+MjHX8j1/+Gu+bS07kYCV/+pcD5qcKg7t8LfE271PqqEkprockYlTLBl/WAYvKyvAHo4ZmvovTt/v84hQvPAG2lCjCbOlU2ahfom1NdFN48hSkXD+cpduXJdeETEsXkORLcJ8LB1UCkKtdVmwugUdM98LUuH2+q2LRJ5d4tK0lj3FvbNSgrXW9qE4G8P2CgZPGrrJklSicxjFgW1c3cMYfRcBnjdb2Cf+SEhMXStAvz1k2 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)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:59:38.9060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0620e607-3a6c-4606-35c0-08dc3cfaf89d 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: SA2PEPF00001505.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7533 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=10061b4047bb006039807526ffec813ae5ead193 Thanks. Xueming Li --- >From 10061b4047bb006039807526ffec813ae5ead193 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Thu, 25 Jan 2024 15:30:21 +0200 Subject: [PATCH] common/mlx5: fix duplicate read of general capabilities Cc: Xueming Li [ upstream commit e8ffd7c26637b9119694368f16d2eb1341767fc6 ] General object types support is indicated in bitmap general_obj_types, which is part of HCA capabilities list. This bitmap was read multiple times, and each time a different bit was extracted. Previous patch optimized the code, reading the bitmap once into a local variable, and then extracting the required bits. However, it missed few of them which still read the bitmap for themselves. In addition, for other readings, it moved them to use local variable without removing the old reading, and they are read twice. This patch moves them all to use the local variable and removes all duplications. Fixes: 876d4702b141 ("common/mlx5: optimize read of general capabilities") Signed-off-by: Michael Baum Acked-by: Suanming Mou --- drivers/common/mlx5/mlx5_devx_cmds.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 4d8818924a..41f6e0a727 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -966,18 +966,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->max_geneve_tlv_option_data_len = MLX5_GET(cmd_hca_cap, hcattr, max_geneve_tlv_option_data_len); attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos); - attr->qos.flow_meter_aso_sup = !!(MLX5_GET64(cmd_hca_cap, hcattr, - general_obj_types) & - MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO); - attr->vdpa.valid = !!(MLX5_GET64(cmd_hca_cap, hcattr, - general_obj_types) & - MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q); - attr->vdpa.queue_counters_valid = !!(MLX5_GET64(cmd_hca_cap, hcattr, - general_obj_types) & - MLX5_GENERAL_OBJ_TYPES_CAP_VIRTIO_Q_COUNTERS); - attr->parse_graph_flex_node = !!(MLX5_GET64(cmd_hca_cap, hcattr, - general_obj_types) & - MLX5_GENERAL_OBJ_TYPES_CAP_PARSE_GRAPH_FLEX_NODE); attr->wqe_index_ignore = MLX5_GET(cmd_hca_cap, hcattr, wqe_index_ignore_cap); attr->cross_channel = MLX5_GET(cmd_hca_cap, hcattr, cd); @@ -1001,6 +989,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, /* Read the general_obj_types bitmap and extract the relevant bits. */ general_obj_types_supported = MLX5_GET64(cmd_hca_cap, hcattr, general_obj_types); + attr->qos.flow_meter_aso_sup = + !!(general_obj_types_supported & + MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO); attr->vdpa.valid = !!(general_obj_types_supported & MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q); attr->vdpa.queue_counters_valid = @@ -1074,8 +1065,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, MLX5_GET(cmd_hca_cap, hcattr, umr_modify_entity_size_disabled); attr->wait_on_time = MLX5_GET(cmd_hca_cap, hcattr, wait_on_time); attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto); - attr->ct_offload = !!(MLX5_GET64(cmd_hca_cap, hcattr, - general_obj_types) & + attr->ct_offload = !!(general_obj_types_supported & MLX5_GENERAL_OBJ_TYPES_CAP_CONN_TRACK_OFFLOAD); attr->rq_delay_drop = MLX5_GET(cmd_hca_cap, hcattr, rq_delay_drop); attr->nic_flow_table = MLX5_GET(cmd_hca_cap, hcattr, nic_flow_table); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.852426329 +0800 +++ 0129-common-mlx5-fix-duplicate-read-of-general-capabiliti.patch 2024-03-05 17:39:31.043566502 +0800 @@ -1 +1 @@ -From e8ffd7c26637b9119694368f16d2eb1341767fc6 Mon Sep 17 00:00:00 2001 +From 10061b4047bb006039807526ffec813ae5ead193 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e8ffd7c26637b9119694368f16d2eb1341767fc6 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -30 +32 @@ -index 3a894f894a..faa38a9f95 100644 +index 4d8818924a..41f6e0a727 100644