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 B12EEA0C43; Tue, 19 Oct 2021 12:36:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19BF440683; Tue, 19 Oct 2021 12:36:26 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 4C66F41152 for ; Tue, 19 Oct 2021 12:36:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYeOp5/OyW3cVsg7UNiSi0rkLtS8wiU15nRe4jpmkaUwPXZ5IQAoCSm03Su4ADpvzBYLbsWxSKRQF51qeYs7a0vqsjrAHNwxCBfAQFhDgvw/wSqYfalh0xJ4qoVu09yXag42ePOf+7umzQV96Yl8O7wUvWMuST8SPWAzZIJeTiYGiI8OWzFzovnQ6sQ+D20l9dB9cy1/eJIDBtYog9XdgxeC1vsxLMLbiO1NlBs6Qxb2j/MWopSO+3QChkQ7C5sDrZJ0Y8bEmuaDbzB0Py5Y32zmsSJRD7NpSlA3kn938eJAzcfiNiYBBOD4qaQmZ7Ps+dBT5b/8vIjs+pfg3wTZ7A== 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=0AP+V9J8aNkqbY1QT8RsrgotZDZKP1MEEsCgjUuYrM0=; b=Wkm5EzPLlAo6OklGzO/KKkzLXUpVEHsZ/kVAJipbd7Fd03OPrITa2tKPFwPYUxSi0yfYRIZuoLRTCIGVYtAeziJhyIhCLwoAMqWIiVZzpNu6Hj4j/Wojo0JQGg7e7PWUePcWfhMs36bi4Q4/eW8hTv+3KYrR8tuWrkkgAHd4CX1iiOhon3ilWIbWqGOf1bVjaTEqsRLJYTAfNuTu5byr8fmsRoLheS6SCS0JnRYi/qISJ30ILSi9w5fcbhu4QvUrM6UZjR1IQc6tnVlj4wuVg+jCgt8bO6vMvwnj17Svn7IHMfh+XC2oLPYiEMZb12v72WZoruZBreEmTwAsf3v+EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=0AP+V9J8aNkqbY1QT8RsrgotZDZKP1MEEsCgjUuYrM0=; b=owJu6V+kuj+uMvLawq1rPWBDcyBu0RkpxYjcU5OwkEzBa/InVUetKzP+yS6M75WwI9p1OOiC9z7EeSAdsCERO3h/v3v+UhUkJyktNLzIMl0HCg10pUz4tZ+wOAmfI8Sz643x76ty7LK2Z+p8v0DJTw1Q/R5I0Xmx6Rq/7YqL+5ctXkRXYa+gyEztc5d7ShJsDApdtcuxd3DH9a/0JUKRdxiQBGICz2NZAfbYsbUMkhFNlnB6ZKFf7frRp01s8jLaqSER4+PKLu/LjLbUhrFPa6U6QVZ/XccA/4ZUbLulmaczf3p+5K1aN7wXggq1ZMxuk1BBW56y4Cet27hj1a74LA== Received: from DM5PR04CA0066.namprd04.prod.outlook.com (2603:10b6:3:ef::28) by PH0PR12MB5452.namprd12.prod.outlook.com (2603:10b6:510:d7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 10:36:21 +0000 Received: from DM6NAM11FT030.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ef:cafe::19) by DM5PR04CA0066.outlook.office365.com (2603:10b6:3:ef::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Tue, 19 Oct 2021 10:36:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT030.mail.protection.outlook.com (10.13.172.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Tue, 19 Oct 2021 10:36:21 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 19 Oct 2021 10:36:18 +0000 From: Xueming Li To: CC: , Viacheslav Ovsiienko , Lior Margalit , Matan Azrad Date: Tue, 19 Oct 2021 18:35:01 +0800 Message-ID: <20211019103501.2216840-9-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019103501.2216840-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> <20211019103501.2216840-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: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a24072d-6960-46dc-b429-08d992ec4a9f X-MS-TrafficTypeDiagnostic: PH0PR12MB5452: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:346; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 14g4nrcsjRVXlHTwwXT7fxOfvxxBr4LFAt+nJmLXlh5LE0o16bRJOy1x7fh6eInyGZVE/SfYGuZ73cqwdnulZrc4/2I9i0YZF+PEC3oPEIOAz/obOSyaMVaIwpRNUGaRdGLuMaBziAdqJRszKQ3gzu7abvBNqspOeggXdCCXZBz4Z/oHMSWgE+5dFSL7yRPkWJWuKe6te+bAnu/xnM5U2Y0KjMIIyTABOuWUMnrdENKY3tSx8x6MZ16g4QscrbjeuwBFGYAuIZ2rSo9s/h4iKU/aCMYPCW7oZpp+BQTFIAlGY0ZGqQfBY/gDxNKzKUZzm4mTIH0k8T58ZL/Cw2SYcpD37IgB2vPg+euuzOT/RH3A74u6X7/aUODLpSLZ9nCt4vFW9acYSAaTlCQwaudOlJVeZXiERl2i9JDbQv1lJy9WhOiB43BkCqFN7gpRrcvb4JO9yp4JAfAQxnN8yxV5mkxxKZFH6aM9ronl6T5xPPJufEPKGMa+W6KJmfyOHSlAYOM0ehkSDGgfsh/JdGCPTuxideM21UGm4M8sJIe5s7S+y6s6EI8vXMCJBHCvrwTms3at1tX2aw6NzaeYXnMpxrJgjRr/DDWz5mApIGKP+NksPAf/HWObTMjxWLmug2BUwoZbFJyuSwMCkhzID1h8AJ5br+FJzsJtuhY5LYTRzfnIhnDCVYtcIyGosqlDMBB6uBfuKazSjuFGjPMd/COlDQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(82310400003)(356005)(47076005)(83380400001)(508600001)(36756003)(7636003)(54906003)(316002)(36860700001)(70206006)(8676002)(4326008)(6916009)(107886003)(70586007)(86362001)(2616005)(8936002)(6666004)(26005)(55016002)(6286002)(16526019)(2906002)(426003)(336012)(5660300002)(7696005)(186003)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 10:36:21.0184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a24072d-6960-46dc-b429-08d992ec4a9f 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.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT030.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5452 Subject: [dpdk-dev] [PATCH v3 8/8] net/mlx5: check DevX to support more Verbs 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 Verbs device link ports larger than 255. Signed-off-by: Xueming Li Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_os.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 93ee9318ebc..39a9722d869 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1299,12 +1299,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, config->dv_flow_en = 0; } #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; - } config->ind_table_max_size = sh->device_attr.max_rwq_indirection_table_size; /* @@ -1767,6 +1761,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, mlx5_rxq_ibv_obj_dummy_lb_create; priv->obj_ops.lb_dummy_queue_release = mlx5_rxq_ibv_obj_dummy_lb_release; + } else if (spawn->max_port > UINT8_MAX) { + /* Verbs can't support ports larger than 255 by design. */ + DRV_LOG(ERR, "must enable DV and ESW when RDMA link ports > 255"); + err = ENOTSUP; + goto error; } else { priv->obj_ops = ibv_obj_ops; } -- 2.33.0