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 0EB38A0526; Thu, 9 Jul 2020 09:36:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 264241DCC6; Thu, 9 Jul 2020 09:35:51 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70074.outbound.protection.outlook.com [40.107.7.74]) by dpdk.org (Postfix) with ESMTP id C40521DCC2 for ; Thu, 9 Jul 2020 09:35:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IjM9q6cMWma4qiFaRqtvV6rjYKLHx/WwgnMIztem+1frDERLdfj4BRdd6VnyZDLLxGP7D4W8A9MY6m0lmeO536m/XxbPuBtiuz1jgTSbKOyf6KRgF/wygmt6brl5a6G2yIrFJcQ5kQsjpYs+5OJ8FZoxTTmh4doPfFmLzM8ITPkNoCWpSlAi20h5bc4NK1qPro6noAWkw3OvGMD7zBWAv1zPlyaxp0hE+YdGYpOgdKZDOd+YwxVJzWlnJREtt64F9YHibp4sc4pYyKlatQT+pyuBOhTAB/SLsJcjpepMU1bdrgaq8XVCHTEGS5dKKb8jHKk4XtyBe2qVoqOf+N38WA== 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=Ugdk2zwTstpWU9mPLdid38YnjLuQefq1RUWfaB6/XPs=; b=iPwJ82n2+jcKsIlG2+tqRQqFr/TCXj0zUEtkoog87dDutFEgGVht+I3NzCa4ERIRt5DkhFTNF2oDYSfjxULfFDRUyl1F2nQrVaUKiLwqvW3ZLSgjAlAmP0h3GetyURG4fKSoAIh7tk+ASunLtaiolpV2zDF66KIBJG61dR5Rk5VhUd2xTYGYlZN4EdJ57wDtvJVj0HC/P2eQ/yq7OcNu5o0VM5k4YA2ci4RQVUwXUq3O9R6x05zJvoX6p6BqdMamLOPHKy8D89z56SBvYUeItRFxRTNkFkELErdJa48RRzwZVOfZCDPEmAqhe+BhfA9iF6Eu6XZjM+Y3AjM+AUWWGg== 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=Ugdk2zwTstpWU9mPLdid38YnjLuQefq1RUWfaB6/XPs=; b=i5/ALf/O+W3F+prTvlnTB23+DDUotCavNxO386W6YfMTYGZNWnDPOhCSIczZSC812NIxvkcB9I500GtLSbHNAdQZM2z7+79vRBUj3pcnFAMueyfukdRtFJSy5li1+ABJfojkGHk6A8I90D/dK29z0DfFGYU7BUgSgRieFiInjCs= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) by DB7PR05MB5084.eurprd05.prod.outlook.com (2603:10a6:10:15::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Thu, 9 Jul 2020 07:35:48 +0000 Received: from DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293]) by DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293%5]) with mapi id 15.20.3174.022; Thu, 9 Jul 2020 07:35:48 +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, 9 Jul 2020 10:34:47 +0300 Message-Id: <20200709073452.948894-5-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200709073452.948894-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200709073452.948894-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0501CA0104.namprd05.prod.outlook.com (2603:10b6:803:42::21) To DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by SN4PR0501CA0104.namprd05.prod.outlook.com (2603:10b6:803:42::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.9 via Frontend Transport; Thu, 9 Jul 2020 07:35:45 +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: 8ce032c4-9a5c-4156-f24c-08d823dab22c X-MS-TrafficTypeDiagnostic: DB7PR05MB5084: 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-Forefront-PRVS: 04599F3534 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3YgQ5WXsY8vvzTTUei16fJGeLfAh30nfgJItKEAqCOggNYggjWI6FGT6YtqZc73HPErA7jbfwfMew4cxT7MVcSITFoBt2f9iCqFpYgk92ZDiVsMWhH8M8v2ChoTpZYgFWrOyBWdiNQfim73yF9bh5TkUXYCA8pqYgxj8IzG/gYJvfVXyB1NbLk6TZwnipZDRtgJx2Xs7c/keVIGdSQ4CNs+Z+RAklQyVwmKwjyFHmZ75y3fr3BFZ8HogaQqr5yYZoJ4V8UiAMBcGa/tFzMZnfxiXGl1bOD6TVrwuuVnGRXpEJNZqKfG1LO/FbZhNB7ypE3VnICQ52TrnG94ju8KDxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR05MB4876.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(136003)(39860400002)(346002)(376002)(2906002)(16526019)(186003)(26005)(6506007)(6512007)(52116002)(107886003)(5660300002)(1076003)(4326008)(316002)(83380400001)(36756003)(478600001)(86362001)(6486002)(66556008)(66476007)(956004)(2616005)(8936002)(8676002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: I9/HlpvKnZtV9zII3OdlSY5LIBnT6Np3y/n0BxdxZv47/uzQ8nXjuPI7Gc2gFSsUQAtzD0raK3rqQYnVdtfaz0nG37nNovEtcUM3In14bkFl42lgGnNzhHjA1reSmjXATHT347Sisb2De0I+mpljDSinU/yhsA6ruC4awR9uRaZGzmhQT9SgT3GzAkzEiEZ0BNY4TnK2YL70zXnZ20/9zJrP8m8AVseJHp5J0Rt4+iMehrxzpdJh8nSST6rTVoifY5Avxk9GbckETUyQnZSANueakrWkF4lkUCz1kXlo2/AWxulUdxaybNkNnW6J/NPAcXY33rZeRZaKr+jRrhUFjvB1pT5TrmKXc4DlwyRxiPbL7AMm+cdkWe6sNFExpHjApRMOyg+y8lkP27mBsKlgGa2i+frpZ5urcTNdYkeDk6sukY+UZ3cPtTZ2cHcVRx+Ou2mlYcwGOw4tt8sO4n5THnNg8zDOMpxBIWRAOMHLt9O9YgXQ7kubidYwTknRPqut X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ce032c4-9a5c-4156-f24c-08d823dab22c X-MS-Exchange-CrossTenant-AuthSource: DB7PR05MB4876.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 07:35:48.6649 (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: 2p3jEafzoLRw6YImWIW4DOezuHiXVGZ6sK4xZxc3Pq9ujak/V+pwx8y2vdbFcTk+Fh/tpsMCuwO6YK4nzgJkEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5084 Subject: [dpdk-dev] [PATCH v5 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 da01ffa1c..00ccba622 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_BIT64(0), + MLX5_CLASS_VDPA = RTE_BIT64(1), }; #define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */ -- 2.26.2