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 E945EA0519; Fri, 3 Jul 2020 11:14:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E87B1DAAB; Fri, 3 Jul 2020 11:13:29 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00054.outbound.protection.outlook.com [40.107.0.54]) by dpdk.org (Postfix) with ESMTP id A5C291DAC6 for ; Fri, 3 Jul 2020 11:13:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QzFzkOOqr8A1siwYQJQR2ZCBRtIeKw2RxsY9h5JszaMHRWnoorm7hHQtOVcEwfB04VQsaVR/ZEAYldVEmjie/o2/tUFOZNhmP3VQIAat9xq4cDczdg+oeRPLcU7SFxfiTX93plYV9d7OfZJR0SVrnoefkWaxMsgOtt2f96wKtMjmuMEf/XIwvw9v73JAvzK/bJ11onfpr9BhohCdNpM8AxcTQ6X/TJ9XGA8tyKWx8dyKWJwnHx6/yhqJ8f9JMWtSHeM0a6qwApywd4O1w59KHsnxRGXbgn0DlBv4AKiHxoGTw+2IFnApJunJiTLb4UytcRJ0ntNinC8bFKpfckxEig== 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=0+SzAwCK5Nqi+rMpg95/rjbHd2uzpqcYvJO6IFKsUHo=; b=iEgUDczOo4ob0WXeuUDYejl0SSMpYGLJVpzr+Ieh4p+ILMNGtBsidRsSbW5D02qohH7wN5pu4QeIKXs/3I8tQaioA6KaORQxU2mMAPZfTvnEho/y0+tidBarR4PJwVset3ScIws/edsHwWDOITQv2qdjaQk020hA3Wsnwg3iBrdc/CZG0pit14jwn/0ZkFxdJVvwC0WrC+pGI5DalNcgaz2Sx6YV8xw1+s4MJrrkLiAgxfsgl5095TM+1d9g4O3uiURyQnxO8C26ZwqnCD7MXf2crUGoA41diCc92kY6I/cXkC+4UxfDjuI1Kp2mUSFwnIoIQW2CA1H6VfcJFMWveA== 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=0+SzAwCK5Nqi+rMpg95/rjbHd2uzpqcYvJO6IFKsUHo=; b=SfC7LIJ4q1+4ZByb5AOLA1P24TgVZJu4nO9bvEK2s+0XdYoN3X5lk8l0KCMSeeiWLfXeYmkAfc35Eu5OM3RMybwjo1+HGfVrT1WX2jgQDLdPdlfoj4s/Vzu+R0A9O2yXsVtJpk0auDTWRdviCKbiPuUfbDIjNhGUBRKMRtE+xv0= 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:26 +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:26 +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:54 +0300 Message-Id: <20200703091259.2108996-6-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:25 +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: d2199762-1f00-4afe-9598-08d81f31581b 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:3826; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zzNt+B5dtQlijakyM+byVz9aUwIRqsCrpqoNf572zZQnbTyvWaro3S+czuljASlvkQOA/iJ/i2E78An6BBAVnH5aJldh+FqrocwB1KCZZDtk5e5aSe7YxwKwMeD0lGj5QuvecGup78BuPTn8jJrPaL26LzI0OyjN2sHJO15mqfFGELDy5HgtV5hVnn2RCP7218BxpDCl50D+iZqMUKOrI7IuEPr0RhGZBkruZ8fwqGwIH5JdgRliU0uXfoPLUR+7J/R7P4LtF1/k3JNo0odOiJxha6gFslHNCIryVHGEZxB14iA+EiWGv4YvxbSqgSfxZZiPAQ8cVKzGM3k3p6tWig== 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: xItgPa6hUIbU59f6PhH6b33L/nY8mwIAeRmQpEHPMiaTRgES9wvXkD7OYNrLYo6JzuXSueFZpTZ54hchuWkALzacx/KdpJ7f2Lyi4JaBjSx5hUautRK3B+EcnouCBfXvNrb4J6BPElU2Z3tirBCE2MXksGK7/ht0KlCKw/nNFRYZL54gankz4wLcjrOiEBbMv2bU1FVkgkfpVUyPJu0VavR2Z+mmTK0XhwbKzCbkOdtmmILBdhgaHqmO4T0f6EbalLC7Q/mP4DFDmvkjxBpWUfBywLWWtXiKanuhVPhizdS5ibnfX3lnrncaRqG5oYNxRhFaGirP25QVUE4dc9tz4kdi9YYJlxBzl6BTQTnmms6HAnA9A879iBCmpCI0Q8xNROf57a03AaxO7oV4PmK2MGqjE2ISV0hLSyUw18tfmAzXl+hMvCKto6oVHLPM5pAVUg7khaswSErjoptTniyGQNLoA+U9vWm4iQlyp0jQ8q3aJ2elrHSdElrJEYMwRNPK X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2199762-1f00-4afe-9598-08d81f31581b 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:26.9084 (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: JAxcMWSqev6ZIObgH4OrMhNamdg9peSkfZzosR3bfIWmTbXW0LtHUeLzneSG+Dg6xHBbWgrCLJd5MtMtenkSbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4353 Subject: [dpdk-dev] [PATCH v3 05/10] common/mlx5: use common rte priority 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" Use RTE_PRIO_COMMON for mlx5 common initialization and use RTE_PRIO_CLASS for mlx5 net, vdpa PMDs. This enables to do following initialization sequence. (a) Initialize bus (say pci) (b) Initialize common code of a driver (mlx5_common) (c) Register mlx5 class PMDs (mlx5 net, mlx5 vdpa) Information registered by these PMDs is used by mlx5_bus_pci PMD. This mlx5 class PMDs should not confused with rte_class. (d) Register mlx5 PCI bus PMD Signed-off-by: Parav Pandit Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 2 +- drivers/net/mlx5/mlx5.c | 2 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c index 693e2c68c..0ce5e4db1 100644 --- a/drivers/common/mlx5/mlx5_common.c +++ b/drivers/common/mlx5/mlx5_common.c @@ -92,7 +92,7 @@ RTE_INIT_PRIO(mlx5_log_init, LOG) /** * Initialization routine for run-time dependency on glue library. */ -RTE_INIT_PRIO(mlx5_glue_init, CLASS) +RTE_INIT_PRIO(mlx5_glue_init, COMMON) { mlx5_glue_constructor(); } diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 07c6addd5..bb10c63bb 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1907,7 +1907,7 @@ struct rte_pci_driver mlx5_driver = { /** * Driver initialization routine. */ -RTE_INIT(rte_mlx5_pmd_init) +RTE_INIT_PRIO(rte_mlx5_pmd_init, CLASS) { /* Initialize driver log type. */ mlx5_logtype = rte_log_register("pmd.net.mlx5"); diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index dbd36ab0c..f043166ef 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -842,7 +842,7 @@ static struct rte_pci_driver mlx5_vdpa_driver = { /** * Driver initialization routine. */ -RTE_INIT(rte_mlx5_vdpa_init) +RTE_INIT_PRIO(rte_mlx5_vdpa_init, CLASS) { /* Initialize common log type. */ mlx5_vdpa_logtype = rte_log_register("pmd.vdpa.mlx5"); -- 2.26.2