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 8A4ECA034F; Sat, 16 Oct 2021 10:08:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD37E4115F; Sat, 16 Oct 2021 10:08:09 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2071.outbound.protection.outlook.com [40.107.243.71]) by mails.dpdk.org (Postfix) with ESMTP id C3143410F0 for ; Sat, 16 Oct 2021 10:08:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YVYvQPxRByvGQ4WpXwjB/iw1LK9YyrFucmedKo4lNLs1IxoC1E/Q2/Zz/4X6skt7RhwxQ6zrEFTH9GYflzRmEHS0AtZRy+LYAgM4Ylk52l2bWt8gfvMW0tYP3YEK7o9dju3oKiPF6lTGZyw2ovhrUQfRysv5jGSEnhFQI1ZRMmqav7MabUv+xm9YjkGQPFSLCKhpIi0lta2FlqXdrDDeyNLGxjNzyF20dE7MZgs1U9Dx/eyJE6lZywXyMO6gycpOCf6/M2BMJMaL/f8MCqFHDt9nwK5b63pW8bFRDRF2VTQfE8fjz7JnPDPMLhtviXUaqF0BKq8gy4MktD5iJskLXQ== 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=M43+299ZStLGXJTCf+QJrqvtIK9x7QwK3LR0rK3toSc=; b=BUBCEDmKHHQeM3mNMLJJQqrOGfz6GHkj6KVg+TpZF9WVnWD8hq4JnJqV3WV0hVWORbd+YQEnFYs+saxFp2rULue6X5ypuPBtpt5suWyxPhe09ufegzZHXBy10d+zxwXNfVNAs0RQrflr//qRg3sLDYFEZNkG0thkTPkKKWsquQbBsxq4NZNWcltmaFGTlS+gLXioDfaSP+CNxIYbwWWUXKcjwfhwhJ7YjaAdRAIl9J7RQsXjIHhoTF6HzGWwSUK5w1PqMolwl7LZAfFVhFxEXaG6llbaozg/KgsOluxTJf6GrNoFpbKfqwXbfE6AOAlwJYUUyGRKB1lF8F1xUNAOFg== 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=M43+299ZStLGXJTCf+QJrqvtIK9x7QwK3LR0rK3toSc=; b=IhpvUI6aSr+97mpGfXTgCqwcwogb9qUKCcf6hzJZwbfWAkBn43I1ln0U4dTilcbLaPbwEVTKcozXye/pFdoD1oMC4CN0OyCAtsFs+9TrtF5dnwK3Nj9d12jR9voAZJzzUWlV8pHh7fbyoTJFmw4DhP9X2UOdEBIb/zXdN2kyL02d9CYYglMX16cISVNiE7o4+Ukg7ioRkk0FEuzV63X6t9q9Fdz919tdA8dIMW9zi8T827cayCre6GvAaCWY1vmF8Iwfo3KrG4ZQQpktil5LiZb+RO7b6Ym519vE5xKbSh9+5aZmBWxHhSESn/u4DqdyYUOw1vVFYxeIybv7kmOaKQ== Received: from MWHPR19CA0074.namprd19.prod.outlook.com (2603:10b6:320:1f::12) by DM6PR12MB4043.namprd12.prod.outlook.com (2603:10b6:5:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Sat, 16 Oct 2021 08:08:06 +0000 Received: from CO1NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:320:1f:cafe::47) by MWHPR19CA0074.outlook.office365.com (2603:10b6:320:1f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Sat, 16 Oct 2021 08:08:06 +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 CO1NAM11FT029.mail.protection.outlook.com (10.13.174.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Sat, 16 Oct 2021 08:08:05 +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; Sat, 16 Oct 2021 08:08:03 +0000 From: Xueming Li To: CC: , Viacheslav Ovsiienko , "Lior Margalit" , Matan Azrad Date: Sat, 16 Oct 2021 16:07:27 +0800 Message-ID: <20211016080732.1781622-4-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211016080732.1781622-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> <20211016080732.1781622-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: 0c05d820-c51e-49bb-b20c-08d9907c154f X-MS-TrafficTypeDiagnostic: DM6PR12MB4043: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5BXO2TMSYFvj86ikg1rD3FVT7E0Sw54L9e/rBV9lkVKPLAhUYQZ8ny4s29WKdZPxtu3BmZztWrES0BhFIYstCw5a+u8XqXk3e4Vu9VWIpS4zpQCUOO3Xa5YbEcCYIcsLukaUhNr+gnunZsYZzQWnhTUnY8B5K47hYoF9sU0U8N2taX6ZYmWY3q2VkSqUCoTFe0qtL8xCDMcF0ekDQ9MgxqQiBxkCxImHj7XYv+9nTa67tRX6mA893OrKUxjlSgY4OJQ5OjZyh0K59+sHGMYo7sxRDg4XqxXz+AVvxG37DZe1KKW9zzeVffTMTT7m8V+vAjrTJ2qEfjQl6MuxBfz+QicLaC2JQLeYKQyXEa9GBEgBG2ABm+IHy40peGkYUwVul98ZpcK7RFmpKk9Sz53nuxH+bYqwE76fSH+5IYw3ZS5OT7EJ5JyH41aph82H4F5Xl72JBu7GXzHLCZQf4+Nm8ASmZ1SQr7F2BxpCkiPpQGYLLb12QTrUYBq5tPm+Fj41uP3dCZiBVYpvn4Nh+ZTRY0vuR1EBD6Owsk9+klkIbmHBOCy4+94IetaQSqVODFap7XphFuRj4Ta13xJM3ugRTgUJs8LUswv5hqgiGo2JxnCImO4NIJ8LcKRSvlpmx3AXg+JHP4y12GmVbtYzfw7ui83hqfRCmLr5TlCoKQ0Z0KTRMkU6pzFHiUI6AvxAo1JjBKxJS4u3+il0xdp9wge8PQ== 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)(36840700001)(46966006)(82310400003)(8676002)(2616005)(8936002)(36860700001)(7696005)(70586007)(6916009)(508600001)(55016002)(1076003)(6286002)(336012)(70206006)(26005)(2906002)(47076005)(83380400001)(316002)(356005)(4326008)(36756003)(186003)(6666004)(5660300002)(54906003)(426003)(86362001)(107886003)(7636003)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2021 08:08:05.5755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c05d820-c51e-49bb-b20c-08d9907c154f 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: CO1NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4043 Subject: [dpdk-dev] [PATCH v2 3/8] net/mlx5: improve Verbs flow priority discover for scalable 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" To detect number flow Verbs flow priorities, PMD try to create Verbs flows in different priority. While Verbs is not designed to support ports larger than 255. When DevX supported by kernel driver, 16 Verbs priorities must be supported, no need to create Verbs flows. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index b93fd4d2c96..178eabed163 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -83,6 +83,11 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev) int i; int priority = 0; +#if defined(HAVE_MLX5DV_DR_DEVX_PORT) || defined(HAVE_MLX5DV_DR_DEVX_PORT_V35) + /* If DevX supported, driver must support 16 verbs flow priorities. */ + priority = RTE_DIM(priority_map_5); + goto out; +#endif if (!drop->qp) { rte_errno = ENOTSUP; return -rte_errno; @@ -109,6 +114,9 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev) dev->data->port_id, priority); return -rte_errno; } +#if defined(HAVE_MLX5DV_DR_DEVX_PORT) || defined(HAVE_MLX5DV_DR_DEVX_PORT_V35) +out: +#endif DRV_LOG(INFO, "port %u supported flow priorities:" " 0-%d for ingress or egress root table," " 0-%d for non-root table or transfer root table.", -- 2.33.0