From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8190AA0524; Sun, 26 Jul 2020 16:57:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CE281C10E; Sun, 26 Jul 2020 16:56:05 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) by dpdk.org (Postfix) with ESMTP id 656151C0CE for ; Sun, 26 Jul 2020 16:55:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V7Pj9E7Z16GcCzRTlgHdBlVVt2heR6pJgkQGlUWcHHE8pCcp6gq7FG53Tpqy9KaCN8pPcqua96DDos8EU9PT+YVznSpZPtEbHDMpaOllG3GOSU9eWWWr5tuT3aF+JFrbvDpGDsTZTeHyRxfei/kKW9IDtv06j+weYoji+9eN5Zu8mZLgLkLEBA9NpQGYjkJknOtdhkAmyp6tg2tVOylpzBarrBYA2LLdvPjBhzGPHQJ/GCjcKpOfeN0JRD7WfuJ1uxUZNo35EXkcvz2+hbo081793f8RYPSq8jDJnNTTE4z2220llsQvOLrb/7lRaj1IbTAILqMW0JgQ8qguAfu95A== 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-SenderADCheck; bh=X1WumUVC7tHgjVPGVPQMbd4J8a/I5V4jWHyQ1k7mTsY=; b=oTdTaqRjWn82CIfG1pQWU/cK4xKtgrCgfx1QCIZO2nLyPVuXTwJ8QNK+W7PAdesvn24/zqO8jrra4gq3vTZw1hY7TGjS+rtA+V8vy9uHskQpgoIXRo8ibE/LZXT611Hcb56rxySnUD6oqbVJ5hEt+gkZeWYkTCAv67EIL8Er2Y/PM8rpKyUh7CKVC19maogXWSMCeOhI0HtiQGUMnvxjAjhEMs62tz4L8FxKJfgAWEm+/1vUpE8p8dZMbDVgp5P0ZWfFm/R4fnqjxiFDFmUR8e5laugJ9gwxIQnxG76YxtoPnGh63uxx25vctVnbPrXcpY01EvXhenPOLajtojWSQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X1WumUVC7tHgjVPGVPQMbd4J8a/I5V4jWHyQ1k7mTsY=; b=OvU4MY6FFnIKpYR5JwSVN9peX5U0vkqIo138A7h5iFoxxFNqm1xPY340G94ptjKnZaHh/d1qbPHsfFCL5lrUE1BJGZhCXvn6ay3JMgkYt/6nB1OGaAZ/JBHtxRTMXXawyi8ykQ9m32jxsM8AoOkm2GDaTtcB9UPFcr3XTFbvmH8= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) by AM0PR05MB6225.eurprd05.prod.outlook.com (2603:10a6:208:117::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.27; Sun, 26 Jul 2020 14:55:58 +0000 Received: from AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::eccf:72b3:bacb:f09d]) by AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::eccf:72b3:bacb:f09d%5]) with mapi id 15.20.3216.031; Sun, 26 Jul 2020 14:55:58 +0000 From: Parav Pandit To: dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net Cc: rasland@mellanox.com, orika@mellanox.com, matan@mellanox.com, joyce.kong@arm.com, Parav Pandit Date: Sun, 26 Jul 2020 17:55:21 +0300 Message-Id: <20200726145524.149355-8-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200726145524.149355-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200726145524.149355-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM5PR04CA0045.namprd04.prod.outlook.com (2603:10b6:3:12b::31) To AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by DM5PR04CA0045.namprd04.prod.outlook.com (2603:10b6:3:12b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Sun, 26 Jul 2020 14:55:56 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [208.176.44.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9e304fb8-cb1a-431b-ce6a-08d831740150 X-MS-TrafficTypeDiagnostic: AM0PR05MB6225: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:146; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0zpmZ57tZd5Qm0GAC8LmL0cqzgl5kYIZnPavgMFOVAn4wB7Y/EVbPGFiu9eKDjy/vZXyT7sZL0HUFm0esJY8aFdcN0S1MOOGfcGKl1aEClGAPhe6OtrHd8sycLdPFlQyIs7VoftKWruoM/sMLPpP4pJaf45szL4qO0Dl1Lzbsv53SMrNHxnJS6eJpzG5PCJoBlpR0n2zb/R32ijwP2flWi3QYzcDIYXJ7gyYZeLdoMhr7K727WwWC6BZeNHRYcgUb4REgEgPgYoAj9wtbSrD9/dDAayAxKqTDuRnBjTv+7dcZoXA2P8vRG8xedIzmhjGcN76+yVNPI4HTIqUf45VLQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4866.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(396003)(346002)(39860400002)(136003)(376002)(6486002)(66476007)(8936002)(66556008)(6512007)(2616005)(956004)(186003)(66946007)(26005)(16526019)(8676002)(1076003)(6666004)(316002)(83380400001)(6506007)(107886003)(4326008)(36756003)(478600001)(2906002)(86362001)(52116002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: G+B/iYD67cYGhjTuku4tHMkdOQ94UkLWhCAf29nfX90aQNcOeXxOK1hsZtxUeeEQy/zebtwyAcjjrpgysl5Ieh/5FVPi50DCYGXjoCYEDdbD0tlIfROgevojAoOUqZSd29Y8qmT6eslawnqqRIpNA8QQSibuI+bK6x4i/QR2RO8oeP2FhnbV8MoWt3AuDyN7QcKpaP40xB8xvBzoL73pgcYLbyrPPJusiU6MGuWpVCWd+ph5vGyRorX/ApuEn/HT1LpPzARFIAjB4Gew+fnl0odEE7sDvWZiwFrJKHuhqOnAZpLKqW9KESWEgUyAsL3pzPdqnpKvjL/tj/7akwQ5F+k3XMqNmQC5ol4mY3+urFbQsJQCz92lry4zryX6plxrZIkzgVd7zneFsqaneB9zzQeUH8oUIK9F8C8xWWQFPTuGWoomSErwXcrDAsHtt8G8uCyeFL3pBhzQqfX9lSNcyOa9qoA3HVy0Vcpb2fICdqSZKEzv7Ku7OXD9oWMJuMYN X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e304fb8-cb1a-431b-ce6a-08d831740150 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2020 14:55:58.3454 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ia14fiO12FFPl8eG97so7k2v4Kk3PD2/vathPi0SsqORYo6tV/dr8GmRV8R9VjlrWC0cWXJ3RxH4HXlJ+Gf1Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6225 Subject: [dpdk-dev] [PATCH v11 07/10] common/mlx5: change class values as bits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" mlx5 PCI Device supports multiple classes of devices such as net, vdpa, and/or regex. To support these multiple classes, change mlx5_class to a bitmap values so that if users asks to enable multiple of them, all supported classes can be parsed. Signed-off-by: Parav Pandit Acked-by: Matan Azrad --- Changelog: v7->v8: - updated commit message --- drivers/common/mlx5/mlx5_common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index ebe4e9ced..864e82ff0 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -13,6 +13,7 @@ #include #include #include +#include #include "mlx5_prm.h" #include "mlx5_devx_cmds.h" @@ -208,10 +209,10 @@ int mlx5_get_ifname_sysfs(const char *ibdev_path, char *ifname); #define MLX5_CLASS_ARG_NAME "class" enum mlx5_class { - MLX5_CLASS_NET, - MLX5_CLASS_VDPA, - MLX5_CLASS_REGEX, MLX5_CLASS_INVALID, + MLX5_CLASS_NET = RTE_BIT64(0), + MLX5_CLASS_VDPA = RTE_BIT64(1), + MLX5_CLASS_REGEX = RTE_BIT64(2), }; #define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE -- 2.26.2