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 1C3CAA0518; Thu, 23 Jul 2020 22:10:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9F121C07E; Thu, 23 Jul 2020 22:09:49 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40071.outbound.protection.outlook.com [40.107.4.71]) by dpdk.org (Postfix) with ESMTP id 45B341C038 for ; Thu, 23 Jul 2020 22:09:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jqiM6irhxjjVHItgtW4v+TAWJsBmJCS8bnqG9RRPOmdfl9ppdz6ZfwZRZG247yAcAAxfAhwz+CKFPznTXAexFN6NqGXETlzyKWC2jpN3YiH7v8UiHR191kVspqZZvCvOT01vPBjyP1qI1EgTbe25Z7NGwXmp/ZTBbxJRsGxMedEqEib3cajzlGOoUPxSkpxRZKQjFYDKFpMstxMXPtK8gCoX9BiArJjGDbRyfnp5oynLz6pjzunTxYxqQcjoecIu5bevMkbODGUOxhUV1aW/bcpkX4fqUcb03rI3idLSuRf4Ff3F4YX264YAEG0r8vdELyW/Oufz/jnQNCQOHYibpw== 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=iDHLqTwUYU/7FPloKGlnwZSF3pDrjOjLBNLHPvDO9y4=; b=BeKetGWAI8vtvt0p0OBRFmIiUqqfyMxHX/Zo/d899hqfXHJmd4NeVppxCsx/FaQUyv4NZsT3FZIB0PD2aY/4cu3Zk7eFkDet1iJ+posXt28DgzQWNCauokTQNYrBI22+JU4D8vBVuDrK3N3t0/qOGNChQTh4+A9Fl0PF9MldiyNFN2m3X2XF4SlP4hZ0cdBsIu5t0y+X2RLjavfwOwL42IBn5B8lii7dDqzjB0mlC1xjK9lBKERGfZqwD+gBF/wY8GnTJyfg1C6eqOUatCC08EffDc/7jx1zIj4M2M+8Sc/3JSc4mW+HFyp3IYES4NpGo2LCdFJ2MnhPz9MxaWNLVQ== 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=iDHLqTwUYU/7FPloKGlnwZSF3pDrjOjLBNLHPvDO9y4=; b=kPTMzAFYHEoI/maA6rllWdt95asvPPNVoKfA14YGopg/bik2a1Fp+c+xDRIF5be6Ra6HWgXLKOz3pbz4QJr53F/gqWdKYzguSJ4C0zo84AkZdY8EdoqQvGuiMrBnTnfTfbylfl8t5K4jPNoPXAEcRTwlsWON4UzqFujDjFL+D5U= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) by DB7PR05MB5558.eurprd05.prod.outlook.com (2603:10a6:10:5c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 23 Jul 2020 20:09:42 +0000 Received: from DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293]) by DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293%5]) with mapi id 15.20.3216.022; Thu, 23 Jul 2020 20:09:42 +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: Thu, 23 Jul 2020 23:09:07 +0300 Message-Id: <20200723200910.376581-8-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200723200910.376581-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200723200910.376581-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:40::22) To DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by DM6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:40::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21 via Frontend Transport; Thu, 23 Jul 2020 20:09:40 +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: 718e695f-6ed1-49c5-8e09-08d82f4455cb X-MS-TrafficTypeDiagnostic: DB7PR05MB5558: 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:1079; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GVIdlAdkWtYaVypuNm1LCwUi1fkU5DfuKDrW5DoiNYgRs91mhcPDQ+BN7A18r9+Nnw5GQL2HZ8LsvDAFSvFjCFwchNlLkKS4lGcxyVReQQ4uVQ8gPG9kSYAOFum56GNvJaNxXHTD97vgVCaQg0EfO48tWqUwhqx2dje85KBVNhpoN1GJSjkTRUoXXXk3iJttOe8ry8eQCUIIzcmzIFVX/8zv76kleAE55uu3kC+kfQ2HKU3hXEBYXR/HxjSPaZK8jxFZHfyj/sXayfajG1BvNw4td3QYW4B7bYTxhcQLi6NSdtH506eWKfUiFfbOZmRRIUIMig+Pxe4zPSi53JMp1Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR05MB4876.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(346002)(366004)(396003)(136003)(39860400002)(6506007)(8676002)(8936002)(26005)(52116002)(2906002)(4326008)(478600001)(66946007)(66476007)(66556008)(83380400001)(36756003)(5660300002)(2616005)(6486002)(86362001)(956004)(1076003)(6512007)(6666004)(107886003)(186003)(16526019)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FR/zUmhrkmU91HH3emua20W5DWKtFzEBMq5lMDCwxavQqiVNFf5G7sDLykAmWSXS5nP5kpctE7lNFuo/uRb66eEFNAPS4et4Phk7REOpM5ERXt3PVFfwuofMgVKF+mbSOmuye3rcZW7eFCdit8KnUJtKLkpM7m6ZQ/8hClo1eiSBZZWovDWwA72E5vGds8U94QXkg/YcVziIoDZkALOZVRK2CZM7Tw56EegxNK+jK8AWTKKMKgJU49wVYcjUB75cUFE5ox8qgfVUWrz+23Qa45GbTLp9sfxkoNxiHBFpjXYdx3HXQiHl9dAXMVMuGIqhl3U5Ofop7QwtypJpPoG8PjaHcWrTyfbeyyqybzFaYhqQdaqSWj63LKch0K4AiWS96Q3bNa3LkmT2KqGOUF/CNeWg/zgAzmSr35fZ+7TSSfrF4taBPrKTldQduX6n9n6SsRk2UOat3gLssLM9m2aSSX34idg6HvS9dHlzhI0yGjbqNjh0f+GF2cmHwrkp/Fru X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 718e695f-6ed1-49c5-8e09-08d82f4455cb X-MS-Exchange-CrossTenant-AuthSource: DB7PR05MB4876.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2020 20:09:41.9468 (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: w+m5fxdw8JO5IzoWJItCR2zxq+nTgxJGuTxM0s0ewxGQghxvh5pfdzV7kgale8OpCk+tgTCnk0tq3K1x1tV/qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5558 Subject: [dpdk-dev] [PATCH v8 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 --- 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.25.4