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 B3E28A0519; Fri, 3 Jul 2020 11:13:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CB061DAC3; Fri, 3 Jul 2020 11:13:27 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00084.outbound.protection.outlook.com [40.107.0.84]) by dpdk.org (Postfix) with ESMTP id 000461DAAE for ; Fri, 3 Jul 2020 11:13:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MLR6evuuULCRUPmLzlGWUfx5uqHAipIYWjMw2AAUhdfE5JhdbdG0A1c6PBdl/bm+A0/mclljTlkDgP6iPr+Oi2nE0TmOFKGy+zMTuYuEySd8U4TSEXbkaepXBafl49EwwY5HJiWLskAtHuERTMbl4k5Rkn/4yYCe24vo34xzRmI58gsF1ZgdoLjVQfMddUb66e6jT7iIvNoYfvXXy44PShi0mk/Smj2f5s4qXekzK1JKMeWbpKOyAPA22ZDJAnyQs55MfH6rTBA3g4m6CUqTTLPKhopP2eDCMpiJgTnUM9Dd2o0+Hnf9TMufEMtF/asiTqqFB25a7G73Wk1iR1aZSA== 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=uwt8kTWARVsyBaSJ+aDUUpmy3vrFphHBklFd5h3njTY=; b=R+s4HUad/+5YtUOYiNFrQaL69dkMEckA0acCh6dETx1cq46Qnsm87e/awLxjlOj2/4claEtWPR65De3MZnsPKbxks/ZqBUz5mApI/iUvVaFvrcQN/Dpwv3CjZnRj0GlvBIy2heMbhymJkexgevBOU6ZvdnO544v/k9Yw+T1GI4phTJzKv4Q/WXwbJhiswajwsUv2edSnolhC4xN0fcquK3F8NaPziDmqimcdth/63To0FjU9OtE+67M7yuAvmzQvr57m9iCfICeK4Z5YWmUqr5fLVQappSrANBsVMVwJ1MFTtfUiFzI1sFc0qVEX37iR8WDdTR6wB/71XJsdrDgXmA== 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=uwt8kTWARVsyBaSJ+aDUUpmy3vrFphHBklFd5h3njTY=; b=TA+lIJLvM/xuN2G+keH89f2ZPHKlvAAvYoMNBl95NLL+dOwKp0mXQopq4egg+RAPLWlXIjwKj5ttdneXuLirUC5US3HAK2bsm+Of/zE4wEE7T5JaOkHRIjop+HlfEEk0LPdXJ05d8tFUV43fyYHtXIOGVOIQclmpkvnh7MaxUZU= 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 AM0PR05MB4353.eurprd05.prod.outlook.com (2603:10a6:208:67::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.24; Fri, 3 Jul 2020 09:13:25 +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.3153.024; Fri, 3 Jul 2020 09:13:25 +0000 From: Parav Pandit To: dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com Cc: thomas@monjalon.net, orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Fri, 3 Jul 2020 12:12:53 +0300 Message-Id: <20200703091259.2108996-5-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200703091259.2108996-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200703091259.2108996-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0501CA0006.namprd05.prod.outlook.com (2603:10b6:803:40::19) 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 SN4PR0501CA0006.namprd05.prod.outlook.com (2603:10b6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.8 via Frontend Transport; Fri, 3 Jul 2020 09:13:23 +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: fcd23240-96c0-46f5-3bd7-08d81f31571b X-MS-TrafficTypeDiagnostic: AM0PR05MB4353: 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: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CJU+lAYzWcHrJHECJGQ7pBtgtGfI1iNsx1tsfhRZeYhYNvEotMBw2Eb90rqSv0ARbZBRTTyO8WxYKOC8OSp9nWKAWIRdHDpfcTYhChcy5fU1uyKQSEmkuKfC8+crDoQOsYJK87bA/LY/io7kD+uhq6cswzD0YaRRcSj8CVv6qj1At/EP3F06fRoeBMRw9je3TQYVTPg5PptGNlwA9T6tA2o0q7cTtt6c05wp3skUAxACssk3dBumlDuCAdu1HjISH9GWpSOtkou/oofDsf7GadnFErKgbLR4cTXfLin1w0eyQrgy6BA+EBKmEsSX3QgbEcmHEoKKpPjKKL6hK5ZvVg== 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)(376002)(396003)(39860400002)(136003)(66476007)(86362001)(1076003)(66946007)(4326008)(66556008)(6506007)(6666004)(2906002)(6486002)(107886003)(478600001)(6512007)(16526019)(36756003)(316002)(8676002)(186003)(956004)(52116002)(2616005)(8936002)(83380400001)(5660300002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: njlcPPBjrxjps5udHml+Mxu1GUg2vitVRTDEgESxHpZB2+FGYkbzs5kYhA93HIbogFvIrid8mzaxjtwN/0g1WUNMB1Ge3kis0c2T2hX82CYZnyHmcuqViFZzYAAfjb/aRj6kE/1jVPzjEH2DBImuDIr7vcmzk5cHj/w0hRi8G7Uy/rw80qHRirDZdCk7kC/yWKr8hQkyJjpSvvZAJAkHdRzFhXxXSHUGgg9UEUb9iIwXWLfwhO2rJjj3FDC9xnsKKNFD49HDAcSTXS3/NZrNF576Nl9pW0ct3k+ywZFmuFC6sKASywDULZ9NDLJ0TM6uTUKxVOgFeFGNhGRFw7Oro7MJHSugQXA56T5zVFZr3MEcDDGIkMXywVqBnifp+91q/5sh6L3rKrfu6ZebBkYDQONzwm+QAbzO6r/8ft1h03oDYk8WsNzMZVXZ/BeEa6sja9pv9Rc0c9ThlROlWzpH0P2nJIkvKwOnrXu0mbh7dRedCd3A8Jc2AnEPhl8H0Zkz X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcd23240-96c0-46f5-3bd7-08d81f31571b X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 09:13:25.1124 (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: jQ8fUh70pbA1EsHHSuuzTctUCujxhjgjyLuX5sYq0r5f6iHESbHubkVhD/P5jf6Ka4MawA1Ws0agRjNBo46A6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4353 Subject: [dpdk-dev] [PATCH v3 04/10] 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 da01ffa1c..62861af05 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" @@ -207,9 +208,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_BIT(0), + MLX5_CLASS_VDPA = RTE_BIT(1), }; #define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */ -- 2.26.2