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 87C17A0547; Mon, 27 Sep 2021 10:33:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43F4C410FF; Mon, 27 Sep 2021 10:33:39 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by mails.dpdk.org (Postfix) with ESMTP id 96A90410EF for ; Mon, 27 Sep 2021 10:33:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXIGrzmcFNGPoM3PfFZu/1VRSX2K1Fe091lkb50WiRH67/m8zck2Q6xB1G3WKxdlnJtipuf+kh+AUnXfkfb3S8QTbCPGScJUDa8QwONH/SkBk6FQ+yns9Auw7tR8Aak6U7BthvrbTxSqKOAFzo4VrlWCd72jkeYD55HqRHYB1/M5TjELaPSWbyyEY8SNAPofsP4MixvB7v2ZaMYJTmeSxNBj+oMzCglL6V6xdGFKxV/F0aKYPlh4h836GVw4Diou8WZzAjhHJowQBX3KDtKZ1BGkDyoVKtn42cHDcs8CgJE4vxMt5NCHvmUmJ9m227GHRX1mAhVR8kR1OrMZQHi3Cw== 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=jQVU4iisSoVaiGUx8oCjdEPCOZpzfwhzZdyOuwsHJpg=; b=iAqX4FLBfgmvuGfF4wBBCAXHLHSI43iAY1FeOyBo9RVzvCIbBwXdPvI9ngKu8WI3xvvi8GULzFgmpXklDpgeDThFMbsXGPBOUS/2BPYvJPn4mRNn0ve6eKSEvqKfXBAHmkYC49HcOJlFQJBXKqrFCblQ4nWuv+Wd+XHJw39G3XveC+4NegnL7gvmoZQUzBn2VLuT/IfW4+3/14zecnEIo+UJrCfDwyYvqb0YUnQNsV7zsWdV80b44cg34p7Oux5FAGnpP/ZyfzW8emI9ICqXYXCxWvay65p4cTY2Px4l987/HrCuj0AWAlOeFiVFF+fy9j6iRgxlmcwM3YKjCWkC8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) 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=jQVU4iisSoVaiGUx8oCjdEPCOZpzfwhzZdyOuwsHJpg=; b=UKv8pG86QZb6w8+WH14Rz9o6dyQnneI83F3l9P7PE0XFAnL4TQHeGSwF48mnQyjUftofv0MWprNxLTLZAbPgEgCdL+p3WxMQV/Oz6c67qKfLeS1nbIshq7MBo+5QFrNUpzhSQ3QUCxGAEJo60j64W1yDKxYY3S3eCetreEbunr1K6Z12l6zbcNUwgIxu7rupSMdgpdRVcOnGPmYxhwd054cmwm5Xcm7yZJ2THtkheqnu0MkMRFyxU4J4dc134Qejzxe80K8ecyq/H+Ci4zjXpGG6XQwCLGF7BUAba5RPgqef1zxjT6iJsQMfqfXQOIiJ2kMLs1CU4kUYKsnNYqcM+w== Received: from BN0PR02CA0020.namprd02.prod.outlook.com (2603:10b6:408:e4::25) by BN9PR12MB5067.namprd12.prod.outlook.com (2603:10b6:408:134::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Mon, 27 Sep 2021 08:33:35 +0000 Received: from BN8NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e4:cafe::23) by BN0PR02CA0020.outlook.office365.com (2603:10b6:408:e4::25) 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:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) 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.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by BN8NAM11FT029.mail.protection.outlook.com (10.13.177.68) 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:34 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 27 Sep 2021 08:33:33 +0000 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:31 +0000 From: Xueming Li To: CC: , Matan Azrad , "Viacheslav Ovsiienko" Date: Mon, 27 Sep 2021 16:32:51 +0800 Message-ID: <20210927083256.337450-4-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: 4133bcb0-0d43-4878-2137-08d981917eb7 X-MS-TrafficTypeDiagnostic: BN9PR12MB5067: 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: KFmYn4C8BuTIWTrliPGfTRZuvJqRvcSMITmvpEPFsRcDjfXriZiG1NE2wR+GOUyK4SPIgS89nsbzW2z2x4LdoiDT3I99gckgWXEIPfCLyrG9W1lFU+hgQ44V44GbRC1sQtnwoxjalsIdPjHiByJPdHphgcSpMMYmlKuHaF/Fjlm3FT4NyRMov4lRYCRQ24q/hNknB/Vb6jqEI+v9RPcQLrWzgBv9R8Y/8kvUFb6gIvTcVt1kzhYW7CFX+/eF2Ivp/V68O0Y5LywIdn4zKYFaQIl7r9fKpedBvzL1B/iFUNLsnIiQOxinzdzhrlqvF+HfmyXsUBHv2cBZPuFFQx/cy07ANCiY4jGS7nPQUrSfCzA2kzRzbTJUGg+7qhwgt9kfUdmCNkq1D+OfWdZG4xssN74EZfZUDPb5AdYl378Dk6N4HjYf9X4GS6h2gL6xWd9E6+TR+ux3Jzvr0RglL5jctYGF7Vf87av+OyT/htcvnNmC/LwjxjjJrRp0U+D0g50Frym8HU9kjJtrr6OP+N6CVXY3V6rXICRWWNngM7AKz8MT2splml8g+GO3S4Z4wYVV9IeWEL0SJNrl5K9Fj4Uc3xAxRAEzinK1ZoqfzKqsN8CBSk+yb8TJhbwNGn/DVF46S+n7XK03ptU0/1VIVust3nSxD2xCr6Za2sFlfc69bTLeorgGpfBn1QfJu6gLkYwd87KtXwA7Ljy0q08Qs9PdIA== X-Forefront-Antispam-Report: CIP:216.228.112.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid02.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(16526019)(54906003)(86362001)(47076005)(70206006)(6666004)(83380400001)(36906005)(5660300002)(107886003)(26005)(356005)(316002)(186003)(36860700001)(508600001)(8936002)(55016002)(70586007)(82310400003)(1076003)(8676002)(2616005)(4326008)(36756003)(7696005)(7636003)(6286002)(336012)(426003)(2906002)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2021 08:33:34.1120 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4133bcb0-0d43-4878-2137-08d981917eb7 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.35]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5067 Subject: [dpdk-dev] [PATCH 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..93bffa4a0b9 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; +#ifdef HAVE_MLX5DV_DR_DEVX_PORT + /* 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; } +#ifdef HAVE_MLX5DV_DR_DEVX_PORT +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