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 24B19A0C43; Fri, 22 Oct 2021 11:12:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE7994119F; Fri, 22 Oct 2021 11:12:18 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2042.outbound.protection.outlook.com [40.107.92.42]) by mails.dpdk.org (Postfix) with ESMTP id D6F2A41193 for ; Fri, 22 Oct 2021 11:12:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZydowzQAF761X1GKB35ohGT+oLbJ2QSZqxk3EEHqOdvCr7ZeZThBHjDIOdTlIlrq4jrOKc8XAV8OklIdcLtFsI0qjLitHvRAlQ4NTUHVcqGfMBye6ljIh6xLmidnVqyXtvLuPuEv2oGUI8vLCUDq3+6UksfdU0yXqE1wJs92x/goiviQaJMqyAqPw8LuXVwmKBrkKMcvFNWAu8TBd4P480PhJh+qCH6UV25G3ROa602TbuYLSUlT76SFbKir21TUpmIhdc91JVLl3WGgQi0A9EmA1hFH2nuuuQqEnp0v9IBi+JJx0zuHvjWmFpjD5gSjFwfdXlPr+YRpc/F/8XJ69A== 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=YIa8Dc1Rpuk4wAM7pIPTtTWBgrujlPaj90v/hvfhuPQ=; b=k3e4k+gqDGQ+O61DMIyBETLyfNgMVk8i1p8IyLypqlxsnNAlM5SuDVKLmlsNSHl+qXzenBaEk3vtbNWHyRWdBz42UXbu6U0aI4/ih4jm6V+nDVjiprOGcO1H3ebo0Ix8kfomCBqo1APNwbK6ZUBwqJccEZHF2D8JE5i0zmnE+3488OITw/nxGW12ER+yLHYjxdxF03LAU+a/nZ/qtzMdirmMmIHv30gA1vHk1Y8QGDPdKePKBC/EKHtHqOSYIRy9xvlfrvxJ66vyDvNJR7CZFtAd/j1BVeyXgbvXDW5NjNRcKNqaj9TptjynWCDaQKuZwZ4efli8XoyjxKANhWDy6Q== 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=YIa8Dc1Rpuk4wAM7pIPTtTWBgrujlPaj90v/hvfhuPQ=; b=gYH5Bcj+5YoQLOXsGhFfYzWETGFVQOYRCsmYNrRFfOLvmtLeaDoeHC1H5aWb8nXWktrQDbrWBYh2zEHvnjymmEMesCar/VChOpOIXl5DruwWXtkGDDqPCjD/GQp4VeS9drXyDHsbBAXVbfirfC0BSWTUW83w2SbP3DWq/uetYPF6O3lLy7aIiik0f6UJ1VwyB7UbyVqnqAoTWtpVxa491SMb+IlScrxcnRCr04fgVNuH++QG/JcbCS0tP095KPgv4j+s8UD1lPIJ2vaH9XnDT17ALXIUP2RQXPXNtFz9Q3fxWXaJlTZrGJwQ2lYVYzyh8Su8FjubUzozcZ4dwmRWiQ== Received: from MW4PR03CA0297.namprd03.prod.outlook.com (2603:10b6:303:b5::32) by BY5PR12MB3649.namprd12.prod.outlook.com (2603:10b6:a03:1ad::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Fri, 22 Oct 2021 09:12:14 +0000 Received: from CO1NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::e5) by MW4PR03CA0297.outlook.office365.com (2603:10b6:303:b5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 09:12:14 +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 CO1NAM11FT038.mail.protection.outlook.com (10.13.174.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 09:12:14 +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; Fri, 22 Oct 2021 09:12:09 +0000 From: Xueming Li To: CC: , Viacheslav Ovsiienko , Lior Margalit , Matan Azrad Date: Fri, 22 Oct 2021 17:11:37 +0800 Message-ID: <20211022091142.51397-4-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211022091142.51397-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> <20211022091142.51397-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: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75950b97-a5a4-4bbd-7c04-08d9953c09b9 X-MS-TrafficTypeDiagnostic: BY5PR12MB3649: 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: bUErqO/UOgjiAujJJ4SPwwJQ0Nnlg2WkNg3MpFMZpA3N7JMDXTk56GK7o9yXZC8s99QTcqB8TOzErWrsc5iIXC8mTEybZ8vCYXWc2gAYFgUbub1JPE5hykEfODrs9+u9lzQ7hKZOkKE6awveXtDghGmF2np6ogDkj/0jqve6eOpO8RdM13CRpGJXyJy/wNcQBTNQNbCUyyZTWC3dwT6YTj48b3kdO9FGUaS+YjTvyloNckZUQSn3k13bEHyikpdeIdfOxkKslZe69olbBEclkiN5QiPRvW0hPAU5yiuQR6jWLKGL5bkRXl9StuKgulNq57E576+VBv0WM5eVGvQbaPH8PG0X0fAoNjkl344QlFfIIStSj0v8MnxUk7zFrV1c90lN6nme3+d1AcMSChrTYKKca2kXrmIzdEnezctdjBKkbIQ5Ob1xj8hRv1hImDylQVqy7+ktiUiWbMnzvx8bjhBZbMxFcpVgDph8XBLX1vK/3RDUhXMlbGCxm2k2JvtO4US3ivDxk3789DXBc5v1nYFjxNwit6cDTdaB3ux4iab0tKrm7ESNIUGOtwL3/Op7+FJ0O7l+Vd/whST/o3xSlzI4OWP88eCug4QwjJgtPJgiIyTYGKX7SHtk6QHZLLzT1LyHTeTQRBjwdx9ao4jjZCXRRlJ4RU58doiIpyBzhQQZ1F6BvKqgqkInPAbN9FEsKpcxpMzs+LkgjQr8gaYMLg== 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)(508600001)(356005)(6916009)(8676002)(82310400003)(55016002)(86362001)(70206006)(4326008)(70586007)(54906003)(83380400001)(7636003)(107886003)(6286002)(47076005)(6666004)(7696005)(5660300002)(16526019)(26005)(8936002)(186003)(426003)(336012)(2906002)(316002)(36860700001)(1076003)(2616005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 09:12:14.2163 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 75950b97-a5a4-4bbd-7c04-08d9953c09b9 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: CO1NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3649 Subject: [dpdk-dev] [PATCH v4 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 Acked-by: Viacheslav Ovsiienko --- 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 60029f71178..3f5aaa885fb 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