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 2061EA0350; Sun, 21 Jun 2020 21:12:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC32B1C19A; Sun, 21 Jun 2020 21:12:25 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2072.outbound.protection.outlook.com [40.107.22.72]) by dpdk.org (Postfix) with ESMTP id 322B91C193 for ; Sun, 21 Jun 2020 21:12:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mBvIV/Z4RENYUIjTuWJYPZ47llZg6Ynp2CJdkedoD85kSIkj5+BlbnrFXwRFMm2E5nynPcGLvQrGj2Dcswg4/VusvRumycOz/S5UN284L5vdipt+LK+X3kiNgBd2qToJU2hYV8u6t+FGn81cbcbUTTFIxb8tIUIlry4ZOibiAdowEc+zayqEkiswjt0qo/W2PrzJDIjJoLwqeaUOe8NK238uqqbNQq3b3ye+UPW+13H6wywCPpqiG3gjach8USNx3PA/AsK+h/COdV6o80sfovbQn84yWnECDXf67ayt0Vz4+Yuut4n2tj3ZhLY6kbQdeGB8kDFkPekS7dt6TCuBJw== 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=qq+8rEyVkUxdjV/ScP8++eo1xwirBRqzxUuxxgAfAx4=; b=m0hjNEPtkfctDPHONvR/V8MD+nj4AeOE2RKQYd2T6hTqxEd4/aM/WVCUqg0L9vewYgkFsBgoA8FVtZk3grDybSEi0zV7EKZ4FRjAuKfmiErWElN/Ay8m/Jk+Q/hOpeI+juUoKNGygE4KXMBRuSyVCKxVb3WaovEJU/NObcEmHhvG5STmJ/21x/3Ee43QSvSh6bHGBmcmzReb8bybMYXdhughPB1OLS15Z2s6CP1Q7e7fZ6itJNatTUgNz8jizAkvfb+IF0nggMNnVOpsu2bIyccs9PJQUoSzWKt4inNY2LsrxANxl7X7KzQyVu9yW1+6eBWO8+9FFxmKqaWy7/fCAg== 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=qq+8rEyVkUxdjV/ScP8++eo1xwirBRqzxUuxxgAfAx4=; b=Xy71rj5r3WCQvTg2SJl7PIRTg2GqdLPM83+ZDHYwwYtKrfvwn9zmCVswfYmbHz7v6pX4Fpeqd8h1RQmTicdls1yasc7biNKaxVgTPaCZKm6wHuqxvMyuTx0zc7zb8aZhfm1lroTQDk6hGwsx93TdfNBVRzoyiBFrnW/Yu73Wtn8= Authentication-Results: u256.net; dkim=none (message not signed) header.d=none;u256.net; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) by AM0PR05MB6307.eurprd05.prod.outlook.com (2603:10a6:208:145::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Sun, 21 Jun 2020 19:12:21 +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.3109.026; Sun, 21 Jun 2020 19:12:21 +0000 From: Parav Pandit To: grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net, dev@dpdk.org Cc: orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Sun, 21 Jun 2020 19:11:56 +0000 Message-Id: <20200621191200.28120-3-parav@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200621191200.28120-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200621191200.28120-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM6PR02CA0105.namprd02.prod.outlook.com (2603:10b6:5:1f4::46) 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 DM6PR02CA0105.namprd02.prod.outlook.com (2603:10b6:5:1f4::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Sun, 21 Jun 2020 19:12:19 +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: 450456ee-522c-4db0-d76d-08d8161705d5 X-MS-TrafficTypeDiagnostic: AM0PR05MB6307: 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: 04410E544A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kcYa1Lc7Mzs4Tua/gB65vowAbPuOFqqZjijsLPkZifiV8MYaEu5bqudz4LHPGOP8Nrnguqp1kpzwZm04n6en75oUlD5WO5YOJWLXoQFDQZITmaXiMKWHftnrWy/7NCgSAWKqfO2J5OBxlVFpbvRscRsEaznYzXe1kZwtSbya4C4sE4EOApM+BUq47yX1Gn/lUFfZTOSgqEJTusH8hQXj7G9QF98vk+WaAsEA38BECbKsz2rBuuV0dtBm+mZCku0r17C1ueBNK+MhehV9Fs/0lZEYiKKHzHFKF4LrkiDH77PgsqJ7GOJ8wsXB5GSeW7TGFl+FcdWsCQbkHVRzHTbg9A== 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)(366004)(39860400002)(396003)(346002)(136003)(36756003)(66556008)(66476007)(6506007)(4326008)(5660300002)(6486002)(66946007)(26005)(186003)(107886003)(16526019)(316002)(86362001)(6512007)(1076003)(478600001)(2616005)(6666004)(8676002)(83380400001)(956004)(52116002)(2906002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: HlMgLfKZF/S6M63rg6zDZVYYp2tK3x95lLSMWAixQICNsOU0rdUukrTBZB5MWv/W5bxwxn4DtxrAyTshaIjfLFKTwnX8TesZqRyTMJ+vy2YO4OxsPF7m9lU6JXgIVjKmeVh4s0OkfByRIYsFEBbutRAaBBS/Ib4zvVOmFG2Qy/8hZaPnHPJxkx0whc1adIdpf4LEMmLkYobESzjb9d5qcpwe2dtsnMSSS3Y9zO3+mVWtD8muLuzeVbj1ADo1XgzL70CB8vxw3nhZ7rS4Hps0wV5n1gUXeabKBTmgJiT2VaGByK+aPBTQnWYD6S/zJHvWf+HUVryJJmx5BYT9zVLsjrLIeVaWcgFK1yWb7dlmyXKN72rr+5HxB4irwuUG2YI9AT3iiPXGpkDlFE2AduUv7hODxOn+xGNxEFezzfDLEFFvBdE0PikHJPslR/G9/VWJigN27Scgh6PvaN6qB4fjmo0p15zGSy8lBluOtBFndRRc86C5Ef+1BfccQBA9WlRe X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 450456ee-522c-4db0-d76d-08d8161705d5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2020 19:12:21.3672 (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: /dFO/xPMDzzADl0O7PBa/hkJe3p7pgohM7A94tjAIXDDu3+2ZySxVZSH1uKERNx5PyIE0pPRMVuVL8nc4nLT4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6307 Subject: [dpdk-dev] [PATCH v2 2/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 parsed. Signed-off-by: Parav Pandit --- 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 77f10e676..6cc961e99 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" @@ -202,9 +203,9 @@ int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr); #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), }; __rte_internal -- 2.25.4