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 CB91641C30; Tue, 7 Feb 2023 15:03:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CABF4410F6; Tue, 7 Feb 2023 15:03:09 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2043.outbound.protection.outlook.com [40.107.220.43]) by mails.dpdk.org (Postfix) with ESMTP id B9CC8410DF for ; Tue, 7 Feb 2023 15:03:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iiEn0Hr16HURETGT7p1c4LDIsYCyuWC/n+oHXyQeAt3CnVOEli9YHP7BSLmHYbe60JguFwk09Bx96F0+iT8CTgUpx/Xl88SnoaU4iG5UKSkKo15PrBwcgtnQb7SA7FoYKRZluYsKXtEHXCo8pKHQh3BMFvZ8f/WgAACt2oBua5ngYyXNHqNuoS2VzUe3FjLbNoCT4DTzsulaY0sAJ85cTSHs1AO8j9c4CrsKEcchNBVhIL+IzQNwXjF8i3Pn3AE7hv+SARhPWahs69gi0YEsQfWGBixxc64nD+Cysf80nKrZ/vKwqAyyudBaPBuFxTzgeOwVjc3aqbOKqpJWPdfJuw== 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=XDmbPRLeeEMSg0QtWJXiCqksrp+Sf+2jOi8oRTQ64Jf144+p3HfVCW39Skl9ORQJMf4wlfFyoLdCt5mik1oZwsbk/PmYy18DxSav7FQWzfbRtIHSz42cgpQGlGkWj0EWfrDMOdn6lgiskPk+iSs39EjTeb921vH2H+gOUMcNCo1Zkluv8bSDWy4qDIaM3yIas9kJGUNC6u4G45c1IT9Qr4h/Jl5f2kCihBTZPeLxWFJiW+LmeVITdABtwCalYW5di7P664m++Itb8Ux/NVnl+22AHOEh2c/qnoI73Fsh+5psvGMruZlrYJgHLF6SW7BNHr+liw2EtrdgXN5d0vnp1g== 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=ERQ1ZMZZpTEvzhz5hiz5G8dgmZsuKoOUdmTIuReaUXI=; b=h1jvgnz0nREJLEQvWCKwR+tib8OfVUeS+RspDwMU2eSwJqQF0hBE2DyNsl5NyH2bkTMB+Ou3Vba8onrhyB2nP23Prlm/8/BLm0yO8aKUWGdCsGw0Uy9hlyJuf9ZmzvlSIMBwpAdIpWSOr1NQB5MIsQn+Y9ZJaNzo43G4TfvRe/tx7n7HL12vUE2eqf2p28c2j8pse82PJcI4BlNl+YKzqHMq3j7rIYlsvlZH+USeghZ4f+D2TyLRZeexisxwrXECBLTP1Zf43KmuAqq3/tniJU+5dBwqA29tWVGDFCBVZg/gy0ydAwdVzuPKqQb14RWubnDOmi4c239UDJxUtBdskQ== Received: from MW4PR04CA0103.namprd04.prod.outlook.com (2603:10b6:303:83::18) by IA1PR12MB8334.namprd12.prod.outlook.com (2603:10b6:208:3ff::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36; Tue, 7 Feb 2023 14:03:06 +0000 Received: from CO1NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:303:83:cafe::49) by MW4PR04CA0103.outlook.office365.com (2603:10b6:303:83::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.36 via Frontend Transport; Tue, 7 Feb 2023 14:03:06 +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 CO1NAM11FT028.mail.protection.outlook.com (10.13.175.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.35 via Frontend Transport; Tue, 7 Feb 2023 14:03:06 +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.36; Tue, 7 Feb 2023 06:02:54 -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; Tue, 7 Feb 2023 06:02:51 -0800 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH v2 6/9] common/mlx5: add cross port object sharing capability Date: Tue, 7 Feb 2023 16:02:03 +0200 Message-ID: <20230207140206.29139-6-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230207140206.29139-1-viacheslavo@nvidia.com> References: <20230206095229.23027-1-viacheslavo@nvidia.com> <20230207140206.29139-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: CO1NAM11FT028:EE_|IA1PR12MB8334:EE_ X-MS-Office365-Filtering-Correlation-Id: fda38a2b-d2da-4bf4-f5dd-08db09140961 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JQgRQ5oQA74Q8hniqDTzQ5r0moPMTnW1ZQoxvxaX4dArSE/dLgvZJWPuigB7CGa0r3sUSDxEw+f4sC/+4izCsi931TCUQS1YpmVN5xUi/w/t5Sriq7EJLXTkR0/srMfqwdn03+Y0ia395W8vjr+mmMkHouG5XxZktznyAY5pb6FDACx5skuS8i9SZ6ssHaBMUrV29mAc26GIxbxnDcW/ubEXXJ33VMPPm0UfgVKZgyk5B0cggfcuL+1WX60LrwPYJevN9sY0PG7J+F7l/umrF3usLx0uSHu2//GeMlb8R/Vdp1tkUTr4BTRjbBBpIow3BhzljdTKMxLtzyG3EGHPn82XP5Ly9cglqMTRqy7A33to7TZByG11YzN0A7sZKqhRhT6YtM9Vw1RwBp4V9qf2eV/x2jl0h9UGOlYmZal2kzvmAQ/3gfOR11kMDZfe91a8p2bbo76KRuXS0CPmx/Akvtyrf0tOnt07vHkkQypBVvQs4eRtVM7BOtCrLaqSJnNecKicpXuEq/hyr0dfVZW0uDSdTbvTUyJwFJM4A35e8IjosnGvo8jBUkoAGY05YD8qOvvs8WZVjEAhgUsBNgpeC1b+S2LFr8hG2/mAodcxB+qhhx7SdJ8cGxKW8IdanQoxOXBKBJG1SkhbNq9vAmuXpPa53mho0OzTcogErE2dpyg1pat71VOi7nGFI97fWwAcTkA9kUou4xFvIRJ1UJBm1A== 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)(376002)(136003)(396003)(346002)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(40480700001)(336012)(2616005)(83380400001)(36756003)(2906002)(82310400005)(26005)(6286002)(16526019)(478600001)(7696005)(41300700001)(6666004)(4326008)(1076003)(6916009)(36860700001)(55016003)(7636003)(47076005)(86362001)(186003)(426003)(356005)(8936002)(5660300002)(316002)(8676002)(82740400003)(54906003)(70206006)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 14:03:06.3530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fda38a2b-d2da-4bf4-f5dd-08db09140961 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: CO1NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8334 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