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 CF79C41C89; Mon, 13 Feb 2023 14:38:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01AB642C76; Mon, 13 Feb 2023 14:38:28 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2043.outbound.protection.outlook.com [40.107.94.43]) by mails.dpdk.org (Postfix) with ESMTP id 6670742C76 for ; Mon, 13 Feb 2023 14:38:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4hLg7kjMU0zj3tfdUVcNcZF04LMJ+vrM0RuLSu4yUn/SjLTJc+iXmO186vcf/ZePoKVg1F3bx/J41DqY3lPqjGn8FivpxvXhYG+EmpciiwvXDAmPM5yzVFc4sFqqHhtcV5+ZPGI2Djxn3IYgAbaKuUTW0tFfILaCJ1EIrkkHPSV7ZYAo8f6Vq0nJngAp+bS4eeKSQK4asgZsKURnE5vSY80ElfdIvb9Z5NoGXbR+aFT1wRl8TbwBBZVlzdKAYrb4ZWCUc0TTH+a53p5nIJWhR7GYTTR0l/ASVPsDzHwz6WvrVfYLA8zq/kbDxSdk9DBBvYFKlkKf6U6Et6PyqXUsA== 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=xeRjVkNA3xpgl1YfnG8gYkN52hc/O1mRS5o6F/ChX20=; b=f4MpDGC8f91SKBv4sI/KQH1zi/FqRvQiE7iCgAfADrLvJ7vedEGgHx8ffYbiohAQRIcoW/HUiU2adF4X9+GMq+Nptg47/NAAiRMVUJYzzR2lBGaQPx9zHH71kGE+Y6T2B0ZOa/hq57aDKJFQUIfyNcNf651A8CaFL70ZXXMWMWlk2vHzSb8mvR+YPs8jG4KjOSPfDu4MgsEXKhFMRGGG+Z7PNSxKGYdlGjBK6AWPc+LnjTT8qu7f2fTWF8HqSkVFkknGmgt+HxvsQ6BJTg8p07ivE/EcTnrCV195eXbV1Y7cGpLzO/RKeq98bAOciQuRgc6zNadFqUVGqPb1XLI+Qw== 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=xeRjVkNA3xpgl1YfnG8gYkN52hc/O1mRS5o6F/ChX20=; b=BIlQ//8ezpg5Q0lChz9f97OTT256GW6b7VAQ91wDVT0lKJ7hCvB2so8gCxeb37S+PQZ2SWsbsRUMymqOqy6Q96cEmSTA/+p6y5eDpEEv6Pb4TkBmkUVIhoa293qKlTt+b7FWMZ7YuqH1rQCVsvyMwHe2Tai47odmMMmVIZq8CRvkV9xrDd5X8Ju+t+XRtkJHtax/gokcVtDZoGmSx8QpvpsyQM/EcCuXQAGleeT9aSS1inw2f0HrbSVAtaDw8G28S0/XIWglRbmhQVpo/1lMe/r9c1keb+ckJn5ZNNj1VYsf3AQnDrRMw1HMV7CFN5ntoqz2GPySRCeUyFEwNMorLg== Received: from DM6PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:333::11) by CH0PR12MB8549.namprd12.prod.outlook.com (2603:10b6:610:182::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23; Mon, 13 Feb 2023 13:38:22 +0000 Received: from DS1PEPF0000E647.namprd02.prod.outlook.com (2603:10b6:5:333:cafe::9c) by DM6PR03CA0078.outlook.office365.com (2603:10b6:5:333::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24 via Frontend Transport; Mon, 13 Feb 2023 13:38:22 +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 DS1PEPF0000E647.mail.protection.outlook.com (10.167.18.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.8 via Frontend Transport; Mon, 13 Feb 2023 13:38:22 +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, 13 Feb 2023 05:38:10 -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; Mon, 13 Feb 2023 05:38:09 -0800 From: Viacheslav Ovsiienko To: CC: , , Subject: [PATCH v4 3/5] common/mlx5: add cross port object sharing capability Date: Mon, 13 Feb 2023 15:37:38 +0200 Message-ID: <20230213133740.27005-4-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230213133740.27005-1-viacheslavo@nvidia.com> References: <20230206095229.23027-1-viacheslavo@nvidia.com> <20230213133740.27005-1-viacheslavo@nvidia.com> MIME-Version: 1.0 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: DS1PEPF0000E647:EE_|CH0PR12MB8549:EE_ X-MS-Office365-Filtering-Correlation-Id: 51ccf26d-bf4f-4c55-53e2-08db0dc7932c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ES7DTNsG9oDSMMa+hBxZtA4xkdL6BOqF4i0+U43rA7yEPaWkfQY2qpIIHdI7vvweMyxkhkZc+agIeXjfFO2rYng5aaFOgfjS1FJfnbhwsbTTU/QTPJnmRk05MQhGZkMpJ4i6xI7lZuoQBWUU9mWF40OSfIE6igkeisQO4EMDCjhY96G3k6QZ8K9QqMqPWtrk7zsMXOLL3uyhe+xwZzWm8osfdkGWZM3cBl9nwllcaj+6rz5bU857wQ9vXPpatbxk3POpIVA+48skIVBFihOtI+YrUNI/k8gktjkaGC2WwQhsAlUCno/J9zTK+tFvZocnSUeBB0/wUFdSssTxVTdRVt1HJAWkt7zBvp8zA38ZMpVlbiLOgNjxUYEPRLWtHfA79PanvffOCzUOXK6dHDyG+9xEffW6caPMzZcAxutwmiFi1Jt6ePdbsAHqkvZckfm+ji539uNl5b3FWTEx7CSYZK4aF5f9F4XfqwsNvT/gFEnAy5LJcFgk5x+VlMootv3LGdyllCcc88b4eyf8b47KFQimc/JikBM5MUs6sCg2O/tqTW4Tf5YZTFRTIOamPEq8WncX+W81Di8B6rKa6vjl6jw1jD6h0iAjbu0Cv/MrT1BjIJ5h/UDeHu3aOwS725WeWVyGbJ5vAJdyLxsOd12iPQIYPjgmCY7zp5yEnA5OImI5dR85itxj2JoWEFwwN1dgIMeTuEKdC23UePhfdPvSkQ== 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)(396003)(39860400002)(346002)(136003)(376002)(451199018)(40470700004)(36840700001)(46966006)(107886003)(2616005)(6666004)(356005)(83380400001)(1076003)(478600001)(186003)(26005)(16526019)(336012)(6286002)(40460700003)(86362001)(7696005)(47076005)(82310400005)(82740400003)(426003)(7636003)(8936002)(5660300002)(2906002)(40480700001)(54906003)(316002)(55016003)(41300700001)(8676002)(36756003)(6916009)(4326008)(36860700001)(70586007)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2023 13:38:22.0459 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51ccf26d-bf4f-4c55-53e2-08db0dc7932c 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: DS1PEPF0000E647.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8549 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 Acked-by: Ori Kam --- 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