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 5F5C5A051E; Wed, 10 Jun 2020 19:18:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C6B91BFF5; Wed, 10 Jun 2020 19:18:14 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2084.outbound.protection.outlook.com [40.107.22.84]) by dpdk.org (Postfix) with ESMTP id 0E39A1BFC9 for ; Wed, 10 Jun 2020 19:18:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YQ+i2Qpj9ngEXMgYAFM5FxFqsnVfDI7/QUaiED6c1w/KzPX2tt3ove+M+InNSPh563j3PMhCHemKjsy2dlm4TZTSSVVhM1sr+p04wAb5bbGN4WjTZashKS9ueqJvyX3N5IxcxplKZXaStvGqQKnqvyVXwBdmojzlMngW53NInUwO6UU/poByCuHFgaUYvsFWx3PPeQpPdzGjhtWmm7pkHMC0Xq9MOS5z8k381mGbsPXlnIw1q3UiRx0gY4dwHgeQlhoaA/LwC/h8ywT+gprzNrqoailS7IW2NlrwY9x79kUS4e91Ju5cn1AVMnEptJ66SmlNUnftlfWT6LokDAO35w== 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=pbl3939SMvTEUshYNOom7b5akis6U+kormiFn15Upx0=; b=C9IZ+LuFGXWbTzrAMKDELWQZxQKP5G/80rUn/wkPxyAOap01+jNRno06/+eoiFYDTmI4vT39zKy+ANb/LdFnV6c4NGYmgqLVhn1uzsaGdMFJGJrXZ342r/adf352uSq5TaFELl1pv3sPfCoLAvAxPiddsnOXTWQlW+m3pnT9Q9b91qrTLb8Wq4YCuKpHKKoLOa5MJuzpGQr5UsB5RibDIn0L02z+xwOXiuWb8+LSW5ojC/tYiNb4oI8IV+F2QSZnTOImwmaUYZ6USwPjijuMZF1K34RhIxk2TPohdGMj9tqKJSDDvSL7yumTss3TSB8BtXNEbVVY6w9G6Pb/trG4iw== 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=pbl3939SMvTEUshYNOom7b5akis6U+kormiFn15Upx0=; b=qR5E21dn3WXjCs8VArtyZSIyiMxAd4r7ZTSwnRMyexDMo78Y9E3GmHrLPj5N2Uz8A9QiDAj6k6FMKFvQhshM85p+eWOvErTzeYlVM7y6yR7g6qR40LT9Qv0e/GvvZp6N+sJGmuxiK7qpAbAo+yRJWhumCfIetLZU/UxP3lih5nE= 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 AM0PR05MB5346.eurprd05.prod.outlook.com (2603:10a6:208:f5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Wed, 10 Jun 2020 17:18:12 +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.3066.023; Wed, 10 Jun 2020 17:18:12 +0000 From: Parav Pandit To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomasm@mellanox.com, orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Wed, 10 Jun 2020 17:17:25 +0000 Message-Id: <20200610171728.89-4-parav@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200610171728.89-1-parav@mellanox.com> References: <20200610171728.89-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN6PR16CA0060.namprd16.prod.outlook.com (2603:10b6:805:ca::37) 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 SN6PR16CA0060.namprd16.prod.outlook.com (2603:10b6:805:ca::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.21 via Frontend Transport; Wed, 10 Jun 2020 17:18:10 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [208.176.44.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9a1656fa-f059-466a-9040-08d80d6240c5 X-MS-TrafficTypeDiagnostic: AM0PR05MB5346: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-Forefront-PRVS: 0430FA5CB7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N1SjTv9sA48mLn5FByhnhqXkgKREmUFq7/034iFQV9E1dxh3MyRUlYE3y9sG5hHNvMcVlbcny5Cji5XirtnCBuXpIyx7qKyBy/1ykveReUURUVwxC9lhejYbbcJUuFribZxX8HIignD+yICiowqXKObV0oKsGAzr2FPk1Uka4MKnpNGmy8W6ejowxRawk5kqq1Eiu2zVkaCTJqcgJFhtb9Lvdcll/2JkRK+L1Z1LUgw7bC7GD9Bi3GnKHwBQBwRFCeta4o1w483MOTn9AG/4QHvxQawfdJmjaGLOJBTnkyPUV59wCXh0VBL50P6bfNEQJZ7ycv2Tns9rfr5DAVItvA== 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)(136003)(39860400002)(376002)(66476007)(6506007)(36756003)(16526019)(6486002)(6916009)(2906002)(316002)(26005)(5660300002)(186003)(66556008)(66946007)(6512007)(6666004)(8936002)(8676002)(4326008)(2616005)(83380400001)(956004)(478600001)(1076003)(86362001)(52116002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: OBT/4S6vQAMSVKm5bzZdKSuxiT/xyfRAaqEZOqUBnMxkHLS3Ys2Cmn1xBGwIbjmwB9Ft3bsvEw5cerrsXG8yORbQifqcq62jMmW6c644f22AYlF1i+aONZTDUQ8+fxGPDwx90RD0GGGnE9zHByOf3ktcNhJmHrLCjfYswkd4jRORJf7eXvUcaREi/+c27xfqstC2PeZ3igZtKg0NTtNVlVFzyvqI5P6SMsL/ejqSP6m8oUor0q+hIZlgrG8rKAFaXpXgznRXRanw5yPVMde91IJG0fjYqiwSXpBg1y063FPh3MFr369DGF6p0zjHCudnXIAEPYp82hp5wCCmbkZt+BK4gz+FMsnhKlXVHP3YVGLZaIB1ULvzNtUxgx6npClVzEEfY0+0L2zYv2PLOyqM0AJdNFsbScnwyxql72ffNiQIyXUatmC4kQYubxlAOShFU3Uj3nZrlRjUfCCTstjzYJdlGKECnaz4RFIgvUZ4wOr5e8BDiaKWmTpoYP5l018G X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a1656fa-f059-466a-9040-08d80d6240c5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2020 17:18:12.0658 (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: BaTCI9DpMS8wVK5Qewwps0ReK3v2YFSszfaqS9i5VlM2jTMQ/yUHIOxXEnBp5+6UDgAdv1QEJGZxRv5f/2gcpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5346 Subject: [dpdk-dev] [RFC PATCH 3/6] 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 returned by mlx5_class_supported(). Signed-off-by: Parav Pandit --- 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 1d59873c8..9fdbd341d 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" @@ -203,8 +204,8 @@ int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr); enum mlx5_class { MLX5_CLASS_INVALID, - MLX5_CLASS_NET, - MLX5_CLASS_VDPA, + MLX5_CLASS_NET = RTE_BIT(0), + MLX5_CLASS_VDPA = RTE_BIT(1), }; __rte_internal -- 2.25.4