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 E3B38A0547; Mon, 27 Sep 2021 10:33:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61F324111C; Mon, 27 Sep 2021 10:33:40 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2048.outbound.protection.outlook.com [40.107.237.48]) by mails.dpdk.org (Postfix) with ESMTP id EDF2D410FF for ; Mon, 27 Sep 2021 10:33:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y2WRvPKTCbLxSdlAqZ8ohGbzzhd18LVFOv6HSzX414ayx0gYQoAFSZra2hrxPPmFzQJF12dW92MOCV17gLhslLuo00xo/g/zaTCCF6hHLYcXP2wKQQ5gOXzyZfafPNKYQQV0Jq4dKYTXWcG6+X5ncrTNNtnXdQxBEqoAdBYmxoBZ/zNCvy8qtA/lCh3dIx8oNo+bWeJCDdtJFFzrWGZW9sq2LON4Eo1vrFN0FAhCyOJt13WhrpEKMOhh8Mjt6c1dqFtnqdFsooFt462J2Os4tXNGLS2HiKyxJVzEzyGw9xhbNXLCZMNz1d7J0jiOnhs3K4lha/sOs37GgAakd9qQJA== 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; bh=1E7IA9diiJin4UKDJWqiNg2Wc6NlD/laOag1BFtfdlk=; b=fmL4zvYn5krOsYjOU82M4Nvq3u3HlZg0F60y+VfNIN+agwuAAYfWJumIr3KbllSHYGbT1+ARB+XSYburS1jSXH0Z0DnHpfEMQQh75H3KCDKgBIh8YOEVom+nksrgih9EivKiMn3uYE10qqVE3TXNLgh8jVp3ZptKhh+qz0CCMVI9hQ5zqc197YIAINpTyTqxVpvf2jv8IqS8LHzLpPqLSYWtzOmPt0EtlZZ6M1BMS6P8Yz328M2p729OtkPGIPLT/SW13OoyC9i0lTjEq9wBgSt/9SaJo+YKoz0IUFH6jzhlp+T4H5+9cjrFXAKNMuVMRqVxiUgN67hYdioVGGJxoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none 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=1E7IA9diiJin4UKDJWqiNg2Wc6NlD/laOag1BFtfdlk=; b=aWyk61JTKgF/H1+CzbSn1fOmq1+8UQ+1JOW4yBmKyEeh4rN5m32129krcaejZZLs2/7OtjMzD25kFto27IhbkV+YiGRbMz6gzkJffDCU17xpDVuE7LGUnPopqWzMSGGL294id7VA+g20+1oB29f/ovcWb8DVeZabLKsBBLt8fdKIaMsIe7L3xOwEdXCBAPvCOV00WWUKv41CkPjmn9HQraVLoHk34j/LlWPJbsgM2QLSJ9Ny/MGp8oppUSXO5P7YkYZhUPfaupWkRyqhcoe29TWnprkSyohfV5F4iU6BYda6cO1RMB89hwmXbPrXh95uJKt3uHOF2bM5gmAkKikVXg== Received: from BN6PR12CA0032.namprd12.prod.outlook.com (2603:10b6:405:70::18) by CY4PR12MB1448.namprd12.prod.outlook.com (2603:10b6:910:f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Mon, 27 Sep 2021 08:33:36 +0000 Received: from BN8NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:405:70:cafe::e) by BN6PR12CA0032.outlook.office365.com (2603:10b6:405:70::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Mon, 27 Sep 2021 08:33:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by BN8NAM11FT024.mail.protection.outlook.com (10.13.177.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4544.13 via Frontend Transport; Mon, 27 Sep 2021 08:33:36 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 27 Sep 2021 01:33:35 -0700 Received: from nvidia.com (172.20.187.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 27 Sep 2021 08:33:33 +0000 From: Xueming Li To: CC: , Matan Azrad , "Viacheslav Ovsiienko" Date: Mon, 27 Sep 2021 16:32:52 +0800 Message-ID: <20210927083256.337450-5-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927083256.337450-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1b39cdc-9010-4860-b219-08d981917fe6 X-MS-TrafficTypeDiagnostic: CY4PR12MB1448: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rrs98k4oZblpZELNJs/etMDSWfLoRqlgpvEo2J8vCecq0tBdPkcyIQp4owsyy5LW2BgUMYxF8HP29xorl7tF/l8HWP6aHw0Jb+QGFzQ+hXoav/6seESeCXcI1xq+IZr+hbbv/n0ajIH4xL8KSxHQcoVTLJWIs92nkdnD+nrc05oxy/4uLGdlUPCKg47cXHZBh0mLz64z4XHtG931wmgfx7dSwR4DfnMaNsra/nA6SSQ0uoz9EdALOF/G5WPciBLNEyx6bUvCFyxQZVYLAGWHQKtfBgg7h/O3BdG46Ui+w6BEVcvyMXJOaI2UOulvDhO4aAtUZqEoMjcETyaVlf6gejd8s24Cuy3tBclNOFm4TAW1169z9+yedPjAGZlWF1pzEuaF1cIFkvR9WboH3q6uLrCBPiVWIfL0qmaxo/31WLFvlU6S/3x+sdkdy9EGSjczwbGG0jesG8ZIXTq0Qpc6kRusmxds5yTcNa//kOKquaTEsIKe7ywC5Q6Hff/ePLZ8EY9zzpfAYB4cUv8bMblh1SqBJ55sFLd5zwv8jQaz0fiN5lC5x305gi+FK0OxLNJWkonUTy1IRMD3k3c1LZndyweV3hV5ajDeKbDRY/BMZmi7slLSklrwg4uc7Iby1u+MdJxZsZ8L0TPJDGwGSxsju5lpPVqkLvTeHorbPwIeXH7ltCvvgWFTV1Q1ZUR4jv5dSCL96aJu+Nx2v82uVXQr6w== X-Forefront-Antispam-Report: CIP:216.228.112.32; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid01.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(16526019)(186003)(70206006)(8936002)(83380400001)(2616005)(6916009)(26005)(86362001)(336012)(47076005)(2906002)(55016002)(508600001)(7696005)(8676002)(82310400003)(426003)(6286002)(6666004)(36756003)(7636003)(1076003)(107886003)(316002)(356005)(70586007)(5660300002)(36860700001)(54906003)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2021 08:33:36.1064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1b39cdc-9010-4860-b219-08d981917fe6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.32]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1448 Subject: [dpdk-dev] [PATCH 4/8] net/mlx5: check DevX to support more Verb ports 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 Sender: "dev" Verbs API doesn't support device port number larger than 255 by design. To support more VF or SubFunction port representors, forces DevX api check when max ports larger than 255. Signed-off-by: Xueming Li --- drivers/net/mlx5/linux/mlx5_os.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 79ab789df43..e9256ad5245 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1344,9 +1344,16 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, #endif if (spawn->max_port > UINT8_MAX) { /* Verbs can't support ports larger than 255 by design. */ - DRV_LOG(ERR, "can't support IB ports > UINT8_MAX"); - err = EINVAL; - goto error; +#ifdef HAVE_MLX5DV_DEVX_UAR_OFFSET + if (!config->dv_flow_en || !config->dv_esw_en) { + DRV_LOG(INFO, "must enable DV and ESW when IB ports > 255"); +#else + { + DRV_LOG(ERR, "DevX does not provide UAR offset, can't support IB ports > UINT8_MAX"); +#endif + err = EINVAL; + goto error; + } } config->ind_table_max_size = sh->device_attr.max_rwq_indirection_table_size; -- 2.33.0