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 CDF34A053B; Fri, 17 Jul 2020 15:50:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2B4221C1B2; Fri, 17 Jul 2020 15:49:58 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2083.outbound.protection.outlook.com [40.107.21.83]) by dpdk.org (Postfix) with ESMTP id 204B31C1AE for ; Fri, 17 Jul 2020 15:49:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XaJojtNo47hYUXVco0ZE5yGefeVKxgLp7eVlSGLACK/Mty4+Q3yNMiHyBexZItG1/grVvuKouKFy/7wbXuN/qcCK1V+OqBiOwHUC274p46zMFCdr21KmmMJJCX84EwqipLJ0k/ZcgGF4/+Gu/dN6YAIc+BG6tWdglKITr+XDlpLO3jLPYDzAUdU0WdFDGUyfaPsY3khAzGU7l8vRexdBnaHP9amHgbbnzcwNol/95abASt1YcaBCBT3HcY2OFU3kipjik8EESJymANQ+jfHPLqUnYANSCgTUao1vI188fCaPgM4nmJhGaJmQRPLcGXefNfVbd4rrKE3yIokIVcnhsQ== 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=8BY17Q2MtoU8dVUdLNJjyfJFGK0koT6TPM94OfqlS4I=; b=hovy0ft9W6NTUu/BnbefAoGKlsYkSOcC9OXm0bsFlP5W0qp2rmJt3zeJLO6BI0AqRh1IOOujYv31yk6fLsbukGVwAK60j25KdEjHtMKPspC6N2wCxAAh8JEy4QRUdjc/U1my1L0naOsEVgATKfKh6NDjnRlRIun+Anvj1Z2yVyEsunciDSkYMqUXKydElsNoONrxEMgZ7hLpFxfYOSxhqwxtaqyqAg8xRDCDJp8U6YhWqv1C5/imv+qCjImjvJ+cRPotrao9lIndWcL+QrXlHGsHWTLYXv6tI/siny/JYxnaFGII/yxYGJk5aAqYUL42eWM5bv3fvfuZw55CKhHyAg== 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=8BY17Q2MtoU8dVUdLNJjyfJFGK0koT6TPM94OfqlS4I=; b=hv8qlSlCbvTt8lNLfQU8x4l2v/3HRxJDSB7WVAnjJbSqHrdE9jzRX37jZ6+HhDQ677XKVRE+eDJhY0gJXgH0p10L5gWb3Elz9+iMcIctJUwl40JLQJLL6YjBtx1YNbd8WgEx/kazqJalCAaMQYCCd6iMB7wWVUzrpRFink4+gnE= 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 AM0PR05MB4355.eurprd05.prod.outlook.com (2603:10a6:208:59::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Fri, 17 Jul 2020 13:49:54 +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.3174.026; Fri, 17 Jul 2020 13:49:54 +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, 17 Jul 2020 16:49:19 +0300 Message-Id: <20200717134924.922390-5-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200717134924.922390-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200717134924.922390-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM3PR03CA0013.namprd03.prod.outlook.com (2603:10b6:0:50::23) 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 DM3PR03CA0013.namprd03.prod.outlook.com (2603:10b6:0:50::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.19 via Frontend Transport; Fri, 17 Jul 2020 13:49:52 +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: b3ae72d5-186c-41ba-789f-08d82a5848fb X-MS-TrafficTypeDiagnostic: AM0PR05MB4355: 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: 9XocstxDRctWbC3SBqN7gFqW8b03G43C8bb6HIAuaIDgOtQ9Tl/Yc8ozt68sCC/vkWVpbL8v3bVgHvJ0M+E6yNcldJ2n6MhtkOMmgIiOnUu/4vgB1QCaEbizz61y9S8ektUV/7iyp2NXXEJCDZKtkHR/nNKNqK6RkZsrb8MMI1+Xlj+qSTI3KQxOqnpAmygjHl624vDRHzPa4V312IzQ4YLl8ddYf1SY8q9G4yLObKCPjDEP/8Qp7Hs9jvIUoDSXajvw74AD459AAuuLz0bu42IHdnwP0dvVTyEcQ+wzoIjpJVYGSsSrZDvFiReU0Glv7EqqoGhdYNNAVQNlKE0ztA== 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)(136003)(346002)(396003)(39860400002)(376002)(366004)(8936002)(6666004)(83380400001)(2616005)(107886003)(956004)(86362001)(478600001)(4326008)(16526019)(186003)(26005)(6512007)(52116002)(1076003)(6506007)(66476007)(66946007)(5660300002)(2906002)(8676002)(66556008)(316002)(36756003)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BOVUKo3rlx9SnB14P/bxkvXYDP9ookwMA1rCtOmOpDw6iW8p/Fei8nPUxk8IlI/qvvCgmr3m1uYWzEWhYnVyH1lGMkwwMh9hxgnGqkctebwHJZ15FIJKzojvQN8WcORGT8Vc3dmLMlQj4lNPtbZxNQ836w3sZTroa7iKPqV+J85BjRLXAu6W7i9l+YKi+TSxjQMMUy1BFtlq5OQuineZN8SRMzyxYqE/xyyxzXCEiYBdzFI7CQgTG4NKH1PDrMglfhjE5JG0utrbu4qI985IiiWsYmX+IqlfT5lruSN+j1zdB9DpuQVILihmekS4z56m1LkWBq1KaXdcndppwW6eAy7WQdRKBlLKb5xgDbijD7F0ua9wnBnEYcnO0toWxe2xOCmlkPu9n0kZF8vl2oApMG+/n+meGP96Fx5yywQmqBZEGVMtZAX1NGtU4Slz5ZViq7e7il9cFM0znCDMkixem7cZ64wV3q4B15mc6cXnmFHuTY80JR4sbm+80niv2Z1N X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3ae72d5-186c-41ba-789f-08d82a5848fb X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2020 13:49:54.5522 (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: fPFNpB+1qfEOBbWFizm3ZAlai1Vu53rXgl6zPc9aRuNgi7ubLnf3sV+xJAGinNvceqx4wQNUMDqwU6imzm89+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4355 Subject: [dpdk-dev] [PATCH v7 4/9] 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 285150705..00e68edbb 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,9 +209,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_BIT64(0), + MLX5_CLASS_VDPA = RTE_BIT64(1), }; #define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */ -- 2.26.2