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 6812CA0526; Fri, 24 Jul 2020 16:25:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 742561C0C3; Fri, 24 Jul 2020 16:24:44 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20083.outbound.protection.outlook.com [40.107.2.83]) by dpdk.org (Postfix) with ESMTP id 4B84F1C0BC for ; Fri, 24 Jul 2020 16:24:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXffmmEh/y17NfBrn3zjQtMf+M3NNEh8ZlWj8603j+j06u5ofC2YLQFmiIB+v5ax1sniApzSQcUx9EJXxvVQwVY+yiR4pOq8QQSHQMi898Ywe7uIncgNA4myoMyOqhtuLA8Kf8WrEKidjbHti77b0MUXdWD2Enj3m7T7q6VaLKBOUJakJKfdz4gdC8zFcec6odWSAOudn/pgHx1ccgh2xmBJz6pLogBUxf1RtWlgC6vHlOVwelr2HwZodxZ6sTVAVNKe180heqhhrvoSOLq7cfwOJ7aVBlf4jj/VnsajdMOoSLUcnbbW6OiQH9dhaXadap5evP8eReqIPDVZbBIQZQ== 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=HBBrMGKN54nX9W/NXfwWd/a8u8WXWMuyJseWesQGlnELtw9dhnqvt+RWRuqMQqdWi2QZCX5hN8F9iBDl8Zc7S6KbgL6UDE77GJ6eM7YyJ5GpYxuDqxTU5Sjgw6p7Dc3EXa/8Ynr+o9COizyoXWEDrdeak6lZIW5OgDipFjkrI9xJ3QsE+j6/uJLbsBNpKzjGrrdniaNpDF3+HC506yFophyXLRSxXCNPun8EQDh7Wk1Gexe3UKtHifP31jSmASaflZYPw+JSs7pWLYLXZ0Qiz6QOP+B3P2+bxlp2eMBl3sMeTaA9zdey+JG2sm87YhlvJ+X7C1OV736lXECSIySeTA== 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=OawUvU+wN2buJxGJg3d1b+fb+H/bRW1kuxQlWCIQ9iYNTsVYvV49Tty1rNqeGOk8/whYv6/wh4d2svzbDS17XXvRLsWHG06KwkPkAvzkLCZ6Vnh0MRpwOh9TbWzGmyIgy1DaOzQc+Y9xQDLt7imc54bwDsgdDM1Y9V32gt6S3yY= 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 AM4PR05MB3203.eurprd05.prod.outlook.com (2603:10a6:205:6::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Fri, 24 Jul 2020 14:24:38 +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.024; Fri, 24 Jul 2020 14:24:37 +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: Fri, 24 Jul 2020 17:24:00 +0300 Message-Id: <20200724142403.6132-8-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200724142403.6132-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200724142403.6132-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM6PR02CA0136.namprd02.prod.outlook.com (2603:10b6:5:1b4::38) 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 DM6PR02CA0136.namprd02.prod.outlook.com (2603:10b6:5:1b4::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21 via Frontend Transport; Fri, 24 Jul 2020 14:24:36 +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: 64824e91-8a92-421c-b65f-08d82fdd4ba8 X-MS-TrafficTypeDiagnostic: AM4PR05MB3203: 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: LgCrjD/h+mtjkEmkQEq93/ZYadBcrqAyYlr7GL+pQdbOx7GpkT8KfNKcV6ZPESYdflw87bjljmeakE7l161v8FJnQC2yyZcBijiYCSZ5llQjhXlBQjAipwHtPP2q6HK/wTyuU/J3byQhN6w+vuk80nCiDV+crHMQ4lfQCah62T6Fl/qr6icojuyVHs7Z6ksGKgA1QeGnn1dTgn4P1iO909BNqi8gO7YJh9sXRpJdnJUVmnqxSUCUqLwCKnrTNnam4w1VWMW+DQFY44h2JeeQNuWerr9gc99oQXgiou3L8XTMxgHdKxSLpf5YxejUlXEf4nChA4S1OgGXdNJNmYkq9w== 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)(376002)(346002)(136003)(366004)(396003)(39860400002)(5660300002)(86362001)(2616005)(956004)(6512007)(2906002)(66946007)(66476007)(66556008)(316002)(6506007)(4326008)(16526019)(186003)(26005)(107886003)(8936002)(478600001)(8676002)(6666004)(52116002)(6486002)(83380400001)(1076003)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Alv5taT07/5EDStl842rUH21mR7lpOLhI0/VA7GD2yCgTKBxzWazAfh13uGBLQ+TbquEmesCvTj8264MoqYOr1XOomGDmL7CIzEflSZJl1VBVHKoz75ZrYyh1ON8yt/A3e2VsrXpWvQuzKhmq/VbwvFfdTHloyQd/qbZcxTSbx+m5ttlwITrM1xtr4OWzvG8StsG4ZMvdNLCxo6wU37hF8lBPegWzVVQV1Te59SJGLmq7L54Hbxlgf+DO6fFXjksC8Bp3Ed2u3jVrNNYd0bOL2GFiitlDmWMTlZng1JhLbz8UyzQRjJSmXTpI5IAjRzn/DRn34zaciObsGzD0f77xL44vmb6OLGSmSTzQIh2W+qwI3q7jYFdTstwgg1BcIWNt3NlvF20NMa643HdM46ChCYU2UO5qoGsFedq85lYcgZeuYv65OKjr3WKdouVX1ZC+ZRXXiO5BkWPNwG9Efcof01p+dytpZCeo8lrotPw5MsKntFI7uM5wCg0By53O56h X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64824e91-8a92-421c-b65f-08d82fdd4ba8 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 14:24:37.9089 (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: 2Ic3LtI1w5IteJW8MsTrRvx8MzYe7R8APF56iBczR70Fs0XB22wKpDlsejIm+u7lqZ7p2CFYJd9PdEkD2pn5mQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3203 Subject: [dpdk-dev] [PATCH v9 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