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 BE43341BE9; Mon, 6 Feb 2023 10:53:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DC9442D49; Mon, 6 Feb 2023 10:53:16 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2040.outbound.protection.outlook.com [40.107.220.40]) by mails.dpdk.org (Postfix) with ESMTP id 51B4142D48 for ; Mon, 6 Feb 2023 10:53:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gEwtYY0vxTdqkPF/cuFsu8NQWq0WKKsLydLBEiDCkvRWr/TmG+8GsR+WTGBWRHDwoNKJe3yoY6A5tMmvY7GtjIRWZHwFTNuAHPMxF81kRH7A4mXhpPkvYJ9P99/6NoS1F7TXEMw1/9kGn8dPiPD/rYz5Sz/3hZ0PTtwVxyY+dk8b93N8ZRst5+/M1TqCHVWXk5DZ+KSngWKCjj/gAUrcZ7A2/YNlBbKFKVPwtQt19SAj1PwbfCY3KsryTkGhoKwhXKpNBtO7GrOBvd8w97+aGNtkxVEdYjxxr6///rlCFG8I9xBaCb8PcoRi/GX62PkrOb9lOtSKe+dB28teAKn7KA== 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=ERQ1ZMZZpTEvzhz5hiz5G8dgmZsuKoOUdmTIuReaUXI=; b=L7+9v7AU1JBQrLuH/tZcUFBeD7RvMe5nGFBR83zFTNvZQcLgSVE8J97OZxkFEGivLjJLrRv17p0rQhGPftwMXfzqkjhgbrtDAXgovierTivSeTT38PPdFdpJwBAjBEM75d3eg9HNeeBF6y2+JuHHLjzVQpQQh4bP04EgDqphhwaX0mKruOkSa/gGGF2M8vTcOKa/DDx1tlMMzhwdVnePHyMIPOHUF2dP28K6GtZbL691WGwbsYDDa/+Is5EffG81HlB53sXAe4Wqex2IwbxylIxvoU3U5HvVqy9YOhmzFJ6/siXku9U5iUitjtGHoD3X+lqt2xmZN4lBxXmnGVKehQ== 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=ERQ1ZMZZpTEvzhz5hiz5G8dgmZsuKoOUdmTIuReaUXI=; b=h/JXhWgwX4Bwa2BirPbf/+9hIO6KYvE7LOkCeQPSiVZKHxOYwCJ+4Fr+gZnvsRrK9thaCXWG24NQLwBV3fV3YqOgENgInkrR1S+chdLgjAFSPkeb8Wckcx4yEtoei7oB3AK+jig4qnZPckfUgxgFcDUnJzzGfUZXm2DUIqm7++JPLfLuPkB1z23cvZhC3LZZsCKFKqeitq0d6jAGeABWU5TDHYDO6lR2lUOOvsZfoXl3D1xNs3Mg/392JXAUM91SlKskAPsuda/esw5Rrjyk4PCCAFoYCVN5RaCZE3WdO697MtAGplt09FIetZewd2BXQBAKEfbpN39RDLc+Dx3WIQ== Received: from CY5PR13CA0024.namprd13.prod.outlook.com (2603:10b6:930::14) by DS0PR12MB7899.namprd12.prod.outlook.com (2603:10b6:8:149::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 09:53:13 +0000 Received: from CY4PEPF0000C96F.namprd02.prod.outlook.com (2603:10b6:930:0:cafe::a6) by CY5PR13CA0024.outlook.office365.com (2603:10b6:930::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.15 via Frontend Transport; Mon, 6 Feb 2023 09:53:13 +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 CY4PEPF0000C96F.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.20 via Frontend Transport; Mon, 6 Feb 2023 09:53:13 +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; Mon, 6 Feb 2023 01:53:03 -0800 Received: from nvidia.com (10.126.230.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; Mon, 6 Feb 2023 01:53:00 -0800 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH 4/9] common/mlx5: add cross port object sharing capability Date: Mon, 6 Feb 2023 11:52:24 +0200 Message-ID: <20230206095229.23027-4-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230206095229.23027-1-viacheslavo@nvidia.com> References: <20221228165433.18185-1-viacheslavo@nvidia.com> <20230206095229.23027-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.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: CY4PEPF0000C96F:EE_|DS0PR12MB7899:EE_ X-MS-Office365-Filtering-Correlation-Id: fc0dac76-6081-49e9-d9e0-08db0827f675 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U5zA5o4dysxzZyYSwc1Rn7GFRfQiRrWR1+Qt350JPNvzgDx0VMHweJ5kP2DTSX2p34uMasmLWJLyCBOmWR2b6qMpUumq7Qs39YGeGyIe7rn89F0ys6cTYQ7/EtB10Jurm0QteknuGB/Ka2U4KdW0awaRgSQfIO1GHsQUQaHufkrfRux2OgUu+J8mVPP/sJdYwSdDKoEuYPu9ZbW9rU8q4A8HezVW05vsVqhXpb+XujYIemPzYutDBPWiRCwv22A1kpy5BubHC8dbExzTx7A9e0scaunmfYgI8ONwHORWE/NVc4FOKxJjWY0/JshYPETZeChdcEQqGF8S5qZjS1XBRzduVa5tN2uo5pp++KfXnRvUDx3CH/VrIeSESNdnyFpE5GRYSxVVxBGyWjES/Wnq/LZkheuLaACz6Kg2CYfPD5ouPYgPjvNMueyXJnCoD+xpMZZ+8wDMusBcVAtx0YqZn80sslD5YsvNkkJqY24hmuFAd3mhH0Sw5UCAQWHI1FYBr6XHrsK3MDtAHiixnOPOVp6WtcHHeUJMkJ85MZw65c0nZhVJN3w1pjg8F5lhIYOjW+B/pa+A9Ju2hL5x55EHzsifwlJGLdm6GYXvcxC+swsUxHh1nrH+ucakHPDnu4cOrpjgiakERQgOp4OYVV9p95Qb8GoRZWILtX3AnBRrrC8pkouMK3pT23wQRh45LR+Gwd3rbk/hypPC1avq31WdwA== 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:(13230025)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199018)(40470700004)(36840700001)(46966006)(47076005)(82310400005)(40460700003)(7696005)(36756003)(336012)(356005)(40480700001)(86362001)(55016003)(82740400003)(36860700001)(7636003)(2616005)(26005)(426003)(6286002)(186003)(83380400001)(16526019)(8936002)(1076003)(8676002)(54906003)(6666004)(316002)(70206006)(478600001)(70586007)(41300700001)(4326008)(6916009)(2906002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 09:53:13.3316 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc0dac76-6081-49e9-d9e0-08db0827f675 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: CY4PEPF0000C96F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7899 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 Add query port capabilities to share steering objects between multiple ports of the same physical NIC. Signed-off-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_devx_cmds.c | 13 +++++++++++++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index e3a4927d0f..17128035ec 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -1047,6 +1047,19 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->flow_counter_bulk_log_granularity = MLX5_GET(cmd_hca_cap_2, hcattr, flow_counter_bulk_log_granularity); + rc = MLX5_GET(cmd_hca_cap_2, hcattr, + cross_vhca_object_to_object_supported); + attr->cross_vhca = + (rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_STC_TO_TIR) && + (rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_STC_TO_FT) && + (rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_FT_TO_FT) && + (rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_FT_TO_RTC); + rc = MLX5_GET(cmd_hca_cap_2, hcattr, + allowed_object_for_other_vhca_access); + attr->cross_vhca = attr->cross_vhca && + (rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_TIR) && + (rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_FT) && + (rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_RTC); } if (attr->log_min_stride_wqe_sz == 0) attr->log_min_stride_wqe_sz = MLX5_MPRQ_LOG_MIN_STRIDE_WQE_SIZE; diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index c94b9eac06..b65ba569bc 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -288,6 +288,7 @@ struct mlx5_hca_attr { uint32_t alloc_flow_counter_pd:1; uint32_t flow_counter_access_aso:1; uint32_t flow_access_aso_opc_mod:8; + uint32_t cross_vhca:1; }; /* LAG Context. */ -- 2.18.1