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 5B419A0519; Fri, 3 Jul 2020 15:47:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33A3C1DBE4; Fri, 3 Jul 2020 15:47:11 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70059.outbound.protection.outlook.com [40.107.7.59]) by dpdk.org (Postfix) with ESMTP id 348551DBD2 for ; Fri, 3 Jul 2020 15:47:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JxeYGUqf+Rg681bDjY+8rKgpWed5EuMPhlKBnyKWoN3VitXop2FLgnk4DlIGu5Nxqo8osz3jWclxI7VBk2YJcvnANvDZLH6ea/xhtpTtWCW6i2dRiTbXupMIRZb02xTgWiC4JRqeGAxc60T+bI0DbmNgsAfmGQh1ckpVHwQB6YidTseFmJhdcIfvLvmeUTJ9/DCMMa55UQdNtiufOFQu32kbKiOm+9yfMQkz6Rc3kjTu7d1k47pF/oT58b/KD18W0r9SgRG0wjvNvCxh6ALimtd2FCBkyCEpFLLO6oEbKXTpajdQO7MzL9ayn6pPbGmTAccE01ct4gcMkaLNXfC09A== 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=uwt8kTWARVsyBaSJ+aDUUpmy3vrFphHBklFd5h3njTY=; b=EVbQHc3dTkbbdf4/9Op14R45kIuBXb3cUzPKHgJJL0C+BfpCTq2gwu7ZuWJ2/hlFgje0Arrk/ImjVxTlfNX6n7va1UsVNu9d302EnNYftqs+zsXIRj9VaPsRZLsTjho6zr4vOzK5Wln58B+gtLTFMU2E4Fr2Tf+zj6CErbgSFLKTvEec90Q82QvoutdXnVJRnuvQOzCrSngHOgLepkQVRPq9vArF0aRJI4ephA9ZZE34iZsxSbuMhZXpOdAu4mlz2CPzw+0uTnIJXYg5R0VENA1+A9Vg5PdcoPixD6bXzCW+B2yn8DNAYyLfEqxEwJHObHR1hbPb7sm/Vtant6URsw== 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=uwt8kTWARVsyBaSJ+aDUUpmy3vrFphHBklFd5h3njTY=; b=RTqbhhzCYizlCfYaRwKYwNJpVos4HdeavJ6V+lD/3IsZl0BsmpMknk8j+1XgEA8UIF6DvMmhlt9HHU19Ybj2hA7MZp/ijrvl+6YhcULSkazCEwKRhInXifLNN6MjLx/4ngJmhRf1xITKCHECxVv7fMIWwLF5O8tu+ZdsneQG9ws= 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 AM4PR05MB3345.eurprd05.prod.outlook.com (2603:10a6:205:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Fri, 3 Jul 2020 13:47:08 +0000 Received: from AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7]) by AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7%2]) with mapi id 15.20.3153.024; Fri, 3 Jul 2020 13:47:08 +0000 From: Parav Pandit To: dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com Cc: thomas@monjalon.net, orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Fri, 3 Jul 2020 16:46:35 +0300 Message-Id: <20200703134641.386297-5-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200703134641.386297-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200703134641.386297-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::19) 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 SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Fri, 3 Jul 2020 13:47:06 +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: 53cc3d13-de63-4c38-1c63-08d81f5793f4 X-MS-TrafficTypeDiagnostic: AM4PR05MB3345: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I0TDahL7kgTLHGkZB7F1e3p3niSE87x0A+IGGO4e3Uy0XURV2AoOiOLK2jCFT+1g1l0t40z8kYSLf5e9AuU1s9VS/cuVqg2P4qPk0aDFXJrYamIloWGXHs8IHOVVYWH8KPGU0sQpj10RNseGtDC0a1mRZhM+xyMR5JU6qsvE9bCOd93B591JbXVdwCRKJw4oI0JJFtQCHWBpnnNDkMjiJ1T1sJKoMfl+XWkEDnfiZtjswWU4aQ2q6nAQ9E3AUUZ4vpCdeCvS6hT/Y6GCWt6y6ngsmCKd7wbj7LBqyQCQOJ4fWFqMyG53jkKJYUnv2CB+BqhTXx1q2cat2u69oTJIiQ== 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)(346002)(396003)(376002)(136003)(39860400002)(4326008)(66476007)(8936002)(8676002)(6486002)(6506007)(478600001)(66946007)(52116002)(83380400001)(956004)(6666004)(186003)(26005)(1076003)(16526019)(107886003)(66556008)(5660300002)(2616005)(2906002)(86362001)(36756003)(316002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: XGx7ah6iCCzSPrlEnYZaLNrmnGKK1hYKmFKK3ur8XTVzAQHf4fzkZ2UlMfJjx+h0HHm2axkgKFnBJP7hUOhQyCrKKBnTmet8aQ/7pFogmCJszb19itQpH6zvcQtLKi8Qql8whxqL4x/y+BeOeguXqp+N89YNxLVz6ZZkgdWA4rImgOh8iq1CCAdBNYrEHZFINvnJB1vvhAiIxvDTL3qxMgL//8K+/SPURxbLlXieDQjYX9dX4JoPhvOG5rea9LqCWD9dGl2n28m/+yYYXXzZJA2w38vzAizhRZExlW83F2DO2a5SLWO8EqKTJEF5d8v/e3frLokzoEGZo45AQC48y/JIUdgDPSA/6g3AHzgezlzagwGC3NSPa8CaNcez+7mJ0qpmLE0rnCRysQZsNzc04VFIXeZrdZTZh60LawtGbv4TJ7dqSh6ZEkCGdxDHW0wcrT9Mo/Yz9JorjkGepIC12Z9tq4Nw3V4yDVliqu41BHDKe2rc6Xp2gGCr905MD/f4 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53cc3d13-de63-4c38-1c63-08d81f5793f4 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 13:47:08.2337 (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: G3XxCQorLKI7bnNxT5C7VLIMy6l9Wrx1cbH/HrGosHiAWn5GKysXUPC77dJkbNuG+nooxGnOqQk/OE7INwo/UA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3345 Subject: [dpdk-dev] [PATCH v4 04/10] common/mlx5: change mlx5 class enum 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: v1->v2: - Rebasd due to removal previous patch --- drivers/common/mlx5/mlx5_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index da01ffa1c..62861af05 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" @@ -207,9 +208,9 @@ 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_INVALID, + MLX5_CLASS_NET = RTE_BIT(0), + MLX5_CLASS_VDPA = RTE_BIT(1), }; #define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */ -- 2.26.2