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 34A3CA0546; Thu, 16 Jul 2020 09:30:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B7DF31BF0B; Thu, 16 Jul 2020 09:30:10 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60048.outbound.protection.outlook.com [40.107.6.48]) by dpdk.org (Postfix) with ESMTP id 4516C1BEA1 for ; Thu, 16 Jul 2020 09:30:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P5gY9/tUnaIKTRIEsPJ5VCn50vNWVpkJgEeqaZPAyKKYoRtQZkgRi5KYgtjeQ6IS8i8/WO3vo2kRuTFB3xAQ07xM8vNQGmJifUWGbmnAbG/h6SeLQ/OySZk0TIz8TTAnA1eq65bo8Goe4W2GzE5BO9Q5gCIQO8AEo0S7+U35CJn4ZRJ5bscSBFVM4rvbmSN5L/gLfqo353GxwqgRsTcDhHtRH7dUAoJTqLm38Sao6gZO6G4PAj13ypeNVDP3OE4t7aunRc4I7d2iP+t12rWUh/dPgzT5h5g0MnezZVMEk0LwXrMl27sHSToyz4g/CIOXjSpwthfcpAJoylI00efrbA== 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=dUUYAkz+dLI3hnGi1d4AESLB19bfbzLNXO66afMCPboP5gu5oBJhhKjtP8FvpAc7uhjIf69ZgkHx2hl7xw+v363sMKQ7oUzmkbDWjkW6EE/0QuzWv31BLIbynSxqkQL+0oz8h5islrU+y0i8jCmYWPF053o12qjdGPzl/Z9WmK092AdHTLds/fEmfGiXjtZHMg1I8kDShSg9nZpjP4mgxTzeLe/oncH5fVRsP0HIZuTBhxPSjoT8fgX/JGLG2lrfPEH1qVp2TcX2Fh+Wle9n5WWhNmJJ1A5rxqi0qEuSuxbzBWognywxDyP9OV3yZnJVuieG2nGJ9W7UnnlCyhw2jg== 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=lfVM9/6N558u17ajn9lG/oa0HazdUkWiTYcibtMGSJ2K++7zismpduPXpEe0lD6affcbgNt0m6ImTzJBEvOdeRLAeSl1gGete+QuXKHZ29/lP6BJ2+TOrczvYMzLT3Viw+708g6DBJR1ffcntmsFQQDr9s2JdddkvtbxB0ADOk4= 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 AM0PR05MB5329.eurprd05.prod.outlook.com (2603:10a6:208:ed::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.23; Thu, 16 Jul 2020 07:30:07 +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; Thu, 16 Jul 2020 07:30:07 +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, 16 Jul 2020 10:29:33 +0300 Message-Id: <20200716072938.812733-5-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200716072938.812733-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200716072938.812733-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN6PR16CA0057.namprd16.prod.outlook.com (2603:10b6:805:ca::34) 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 SN6PR16CA0057.namprd16.prod.outlook.com (2603:10b6:805:ca::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Thu, 16 Jul 2020 07:30:05 +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: fb3cc930-69a1-42f1-2567-08d8295a1036 X-MS-TrafficTypeDiagnostic: AM0PR05MB5329: 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: 7ZKqFwYayfms5ZTkH6X7EROUTI9kyhxcP/oWKeKZEvoSfJlTWzcvO6OG35szP5j1I5vRAVQD0fcrDRV7shBCSE6E/P318fe4fqbYGLf9EG+GUdFPX0VpfT4J2z5Vs47urou3/A32vtIzMs6+fIEXNUZIpkh6OvJMYEKRWd13Avf0A7Ncwjs68py+jWJQYOi1UBswKnyv6ZVf4f+AG9A+q5ktLDOsXbcuCmF+TU4MH83u7wf3smoysWQFatwS4ezuTqVLjx68BDPb7FdhhQgFvSSDmJG/5TeYNzVqjLXDH5+9YTyxYkNxMIDpd+5qaiZiGubPL6jAomENNXX2Ddp76w== 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)(366004)(346002)(136003)(396003)(39860400002)(6506007)(6666004)(16526019)(186003)(66946007)(107886003)(66556008)(26005)(8936002)(86362001)(6512007)(6486002)(52116002)(83380400001)(66476007)(5660300002)(2616005)(956004)(36756003)(8676002)(478600001)(316002)(1076003)(2906002)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ieGQtz/ISPpI7QlyIsOpUpdrcZtyJ2yuUNcfDIG4tk2IYQu7BLDN8uNzlmrKHzBfswMTLq5cSj3bSiHxVvGt2cd+MH0ftuSS0VNXGEe/snJBQV7PmA5fN0gsqyeF0wwtZKoL8Gj1Rsq0vaAeqB2aM7lNwSU1+4QRzA6cddPrgJHEiIz/oxlOuoYq7ZGQe+O9EcKkZmQDNMAdh1Na5cJh5o0B/4uAzyB8F2Efbowa1aJ4ZfpA0dCXo2F1ChlMWuHqdpFm7X1nRIUq6lNOo8h1g0TLrEyIBDva3zymuJz1+GFeutPQ0mqIwRsftA9tOaDua7cbxv+g7UIGSNL4YlwnYm0iPa/y6nACMvk/WTqnDXwyO9TMpyOct30VkjP/wihm/qT+YilGoM0FjIdY5qJ9lrfOyGpJFY2iqzFtdONGQJTM4EWcHq/41Q+rN9UBQKHd4q+AUO2yTvro+lrnmfaLyqGFVc73TQfwdFtuxW9oDI99cfmW42PI0gq5YKdygN4E X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb3cc930-69a1-42f1-2567-08d8295a1036 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2020 07:30:07.2132 (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: GNKxkZXdja8fDcXxG/+W4eEnZtY7UXRM44oaLtai0fWVurqaUvqnccCahvigTsrTIQBZ+Ppiis8bKnuYQ8bwGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5329 Subject: [dpdk-dev] [PATCH v6 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