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 54860A053E; Mon, 27 Jul 2020 19:48:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FD971C10E; Mon, 27 Jul 2020 19:48:04 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140059.outbound.protection.outlook.com [40.107.14.59]) by dpdk.org (Postfix) with ESMTP id 7FB351C0D6 for ; Mon, 27 Jul 2020 19:47:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IMsf4Tkt8Mg4MbR0App3sF1OR2dXQ5ozcO0pNch/uKfYw1avVPk2AHuDa+HqXZtxTXKa13qvz9dBwRXKXpx1rvonxs1IGoYKBLc9Pf2MJjLFtDkvy8K7gnJLvUyDRAdjzmaKWvUviAzKfY8MxVIpxNAKAH8rA1TZTWFkvnoPZt5hH2m34F09vlKfClsTSHbOiNiYm3qFd/NzoQKAG+ghXY0hmtV2knrT9aQMMU+LO0TFh5UXMdoE7NTtj/+o5QTGlvPRt1bVOUl9PwBDCt9RZWeKm+bWnIt5OdpEO5BY+MiIZkkwhShtKyjKnatwuYdGeUNP/C0uOljWklZsEayD3Q== 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=kl5pPngcUGtju91PR+9wM+0KxTn/aBbluH94wIcCgty3GN+4x6DLGH6Q3L50FI474XmwX52PU83YLo16qf4wd0epYijSt2Uumj8k9AiEjcL64F+OlzMiPAVzU7FbJ0m6F1LkaAnAV5A6j6si6cgwRSz9DRSyTgL7jjodmxeVzmhuTylx63OnLm1mb5sftVoJaSPOJudaC1qkLqmV8FLYHioHFacPZjMLM6AWF3wtbwyXBgUySP048M72acV+5s3ZOp9ZKyUuo2pjcL9LaoCw5zNdBaKD5SxoIlCSprBOaDq0+QAeFl5vwJym4J24KPv1fx6DkbHAYM4sK8DAO2/JYA== 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=bXGgpTSZyHAZo9imGDRDjkZGSKcQbGE9JTH/QxLBriDCrT6dBnt35tLTKxbwIKWoP8SWodfUy9jkx6QSgrS2naQL3ZMK5qJ5rUPvUoTHnW5fNCyo18TXzXXM3chQZrsQtubS3cQk8huDLrGjHnL3M7j6e3mr3SpFh5fVTD0+9Ys= 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 AM0PR05MB6227.eurprd05.prod.outlook.com (2603:10a6:208:10f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Mon, 27 Jul 2020 17:47:58 +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.033; Mon, 27 Jul 2020 17:47:56 +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: Mon, 27 Jul 2020 20:47:12 +0300 Message-Id: <20200727174715.330117-8-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727174715.330117-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200727174715.330117-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM5PR15CA0049.namprd15.prod.outlook.com (2603:10b6:3:ae::11) 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 DM5PR15CA0049.namprd15.prod.outlook.com (2603:10b6:3:ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20 via Frontend Transport; Mon, 27 Jul 2020 17:47:55 +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: 21e3df46-eeb4-4cbe-ba21-08d83255320e X-MS-TrafficTypeDiagnostic: AM0PR05MB6227: 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: At9pSmACrQj4sEeBbB/nYnbgTpouJfpXN6GI4mufd78kxqMVBUqbaRxLjAfOzKgHuorJ51z9m51HZq2PpP1jsKbTIWn3gjzgX/s/i3NL++nW1D/gAwH0wPFTWXxLviX9B6CxC4GQOF+MnNmI361Dw9GgUy/HzcnUSL0r3dgqTz1tdMEvKnmbTMhSDNneT2D3uCSMOq+1qDU/hE5ZQCPNH18gauZma2N5JaVlq/UJ2ZPGVS32n0+XIhiddu9lfvkR4WoLPaHTxWXtXujNiWC8P0oenKPMLNQwAnv+cCIORG7jJajyfBqWiEIgOgPZAEfuYW8ndQtUbaG+I3upeu/Vaw== 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)(136003)(366004)(396003)(39860400002)(346002)(52116002)(6506007)(2906002)(316002)(6486002)(1076003)(5660300002)(8936002)(8676002)(478600001)(6666004)(6512007)(26005)(16526019)(186003)(66946007)(66556008)(66476007)(86362001)(2616005)(956004)(107886003)(4326008)(83380400001)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ufkMQDBQTCFuZieARxY1jl+2v/6YKxN+mF2gP/HNgtmJFKTUDvDDlzVf3VoCoPw2+KbBtylqYUo0kv+Qq3MLV4so3QPGPSAyjVHUR/isnUAgkUh4x1LKjnZUMkJUHdS6iszKVcvtD58AMzFJkxRQcSNFMAVkNDEUt7TPiB4ItkT2QVCyWKejY5hzF4uX+1U8vN/fTsX0bxL1qL1IqBpcTrOprZM5KAjbXqeCAnfoH/zZOheW2dFDu4I6KpY1s4yiRR4jXOvjfiWktF1N3aFGtlhGZsKNdv3LfoGGTqWrwz/4sGlMTU+BB83WacGNbFFTraTr7U0vF/N+2DPrJg2Bb1zTqPxCT8XSA5+VFpSeZ4XBjPGs90wDpZp/RW06TidQJK7sGDv7cgtfqqoWDkum5AanuordkiGYgOOF2a+rAK5j9Q5Cy7gbBm4hAdkh6Tv5wEJzOl6DmjDu/zPbq01ceOpkVVVsF4D1j5zquKHX9p/BM7KsRlQYZQoFLY23qJwV X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21e3df46-eeb4-4cbe-ba21-08d83255320e X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 17:47:56.9218 (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: cVa38YOEYEBNdhl277Lngqpnfu0+RvAq1JTxmlitfOkxjLKCDD/F3IMiEY2tL54Nsi/vWRRUp75YN4czKozjrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6227 Subject: [dpdk-dev] [PATCH v12 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