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 AB801A0527; Fri, 24 Jul 2020 16:40:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08B4B1C0CD; Fri, 24 Jul 2020 16:39:44 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50086.outbound.protection.outlook.com [40.107.5.86]) by dpdk.org (Postfix) with ESMTP id 71E2F1C036 for ; Fri, 24 Jul 2020 16:39:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bFCbkbu03bB3sP87FdqctGvrx00QWV0qiRFMHJzmnbc6ZLj4Xf7lEJC7VN29qmEjpQcr4cOeEkRCIAwxRNqFhXhZb2Tk1il1SEUIgsf0qG7wyWgitoFIGYq3WSUSoQyYI9mml5PjXrmLhYmd1NPsM5ZxCsBEubyXLySQvB1meRbwk+mc1PN1SSL1tgnyzSmO4BtzssNWIvO8RlwWTlIEnwEuOtXuXw5X6dIVDGQsnWf4mwpXiBK4lnsCK2n44KNNmilYTUvU3v/ZUczCY4W+sZVLj1OI5h7ub7h7jLsHt4m8I3ZfzIVUgbRfwkeOzGLTQFTSZlc8kGQ2FXNP+y4Qgw== 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=ByJwi/Qwa19gC4dpOx0cH7XsoD9021mATvuWQ2XJi5O2W+Eu8GnsuRmHvZoSr2xEwYspNpntFEtrp8ABluDPR54m20Ee9sXVZKP6DBbjSbFF1bkIgQD3PbpAoDXQSuwGrbDxbwQDuN2yD4S0cDZW6eEeao1gORRpEI1kjc110DHBdubGkTvJNUNPUAx3LDexznZ8fU54Sf7GZU5T24E27wjfw8MVfIMUOz49mzA3RMHOW1dcIBX5PQlGZXOyoKBEntziNOxGUgmMcO0Eesm5FJS/Rz/OZi5ZYOblPfgeW9Hd6ALi6pKvh5Czs+xFSCY7vhhIoHWYqS2gl66ycrRYAw== 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=R4t0JkjR8JxgDOPM7/EpcI5goNWdKtXxIOcEcvJMLwG0scLJYswJZSXfk0xYFc91FpY8BjnF3z4XrHCIK1VXbdnn20KXkKKR6NoGxqXQWI2O7EjtCXC0HBwEwL+Dbfv5SVIBJeKQ6Sdgjh33Us0OfY1+hZEfyrC6yLCoMxFwkiA= 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 AM4PR05MB3204.eurprd05.prod.outlook.com (2603:10a6:205:3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.23; Fri, 24 Jul 2020 14:39: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:39:38 +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:39:03 +0300 Message-Id: <20200724143906.7453-8-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200724143906.7453-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200724143906.7453-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA9PR10CA0025.namprd10.prod.outlook.com (2603:10b6:806:a7::30) 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 SA9PR10CA0025.namprd10.prod.outlook.com (2603:10b6:806:a7::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 14:39: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: 065ea606-5458-4bc2-d6f1-08d82fdf644d X-MS-TrafficTypeDiagnostic: AM4PR05MB3204: 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: gr6nkcGseDDVJ24RnXmKD3q6t8WQXbAeGY0nOh1tg+loWliwoJDH8r4QGCuUW6z3vkdgcDQ1lTdM67d9TXWENLHpOcN5ZS+YlUY9TWu2asJA5d5JyqtMYc8go7ygdccwntySFHrgxIKDWQ5bj9eXtvMpko20Roy9+QBMcM2CgS7ML7LFLUEwoObjtzjIcBMFdxtRvxbD1e3fl7fU648VZBmKoh7UWHCorUmxp0t9fgWQPjZLIHiDOGaq3wWv2kriqg2VnU1Veoyl2RCJRVNwbqnkCv+LNTBqw+eDm0IQkyEvw059rtbF23CmLb35MWN8nYks7lAUY7jgNUlbtMJPtA== 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)(396003)(136003)(346002)(366004)(376002)(39860400002)(26005)(8936002)(36756003)(6506007)(316002)(956004)(52116002)(2616005)(6512007)(6666004)(8676002)(66946007)(4326008)(16526019)(2906002)(186003)(6486002)(5660300002)(478600001)(86362001)(83380400001)(1076003)(66556008)(107886003)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cHPX/U/q91a2e6opb0TNl0FYW/VaTIqltRL/JYDM6n7M2lip3RbPpiYapZINCaIwm83Ee5u2XKawfiFhVcNRAfGbI2p6/dzS7hGVPHy6jg9yS7vLKgeOxU8PywMc+IIWmTEX59oUoFEZ0iRSDFN2JrOqXP92e8VMzMJxTN+sE1ETid6BuzKYaRXk45XIswAIrKkKh/Bvds19Fb1p5r5bBKlsQrCqXGqClsJdRWkkeRocWZ1vhMWbT1CZpWi33UZzjOei6eOKbxNytTlKfhFbnmyCdSlhEZgYl4bA3M1O4mZ8JAm2l1LC5I9QiT6ktxWuC5nMocjt48eZe2eJKR3QdZ5GxrMepC/5rD63LjS29HRt8S+h9sjbpfysnGSEW36TPI93v38/2pt3+Gk4qaG8HYOaW54cRIFPtyQX0jgdA/OayfxLzQlxXWmfVrcjY5RvfTYOvz983cgpTGe0uKRmwie6Y3fyiX6mwINBFX4pbCThiw9W5+2Gy4ssxJ9MxCT5 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 065ea606-5458-4bc2-d6f1-08d82fdf644d 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:39:38.2549 (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: av89UM5lzfcz8092M3c+0fG9+m07dlLs3FtbPzoGNvuLCaWD/q5SeIMDlmJyhqatsVcYW7GJytDFW8LDOKjNhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3204 Subject: [dpdk-dev] [PATCH v10 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