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 D080BA0519; Fri, 3 Jul 2020 15:47:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 779D21DBF2; Fri, 3 Jul 2020 15:47:12 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2052.outbound.protection.outlook.com [40.107.20.52]) by dpdk.org (Postfix) with ESMTP id 6E5491DBE7 for ; Fri, 3 Jul 2020 15:47:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nz+G+biTf15VKAIpQMdZ/P6MGFREP7yFVLLHiDRUcpzAHQ77o4ZVLjUXv53fHLdVDWQPMMXWHN+oRZtdIgEKg3hrGCtsirJ3Dfoan9vf0nN2HrSq+Oar87q7pSBuoLsm29e9mR/uytm1lWLXHeUvjtHSB6ZtuahzOF54G4tmcbMHsziHKX4IDUMNs5NSIsoRDl5m8NZ6hOwBy8TSLy2kKVNJ8hpsE+qo+HZfTlv3Pp/2X3eutaoTpfG95yJ1eXI8OaAdNU5dYosK/o8wiJG542YwcS2LQs3Wi8+UmIXWPJug2VelNMwhG3xqctUfnb8n9sKI+3q34GuzYwmRn94Tqw== 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=mDSDh3TnixRriNLF2l3Jpzrmux0nAxbmFAoCjH6xrJ10blV8SfpSUUbOgi4E6stlAttFYT6yIROIBdMB+fhgclT1N4/XvjLAj6QQ7Y3kJcy86Koy2fH+zAgBzgrULKGA7kV8DP5Q344sPk3zMJn0tzoDYk3dyq4mH9F1P5GHgN4fxdFj+jM2HCuRo49ukQJUS7+AqAamCj5gaXcmp1X6SBnoaULHaZz239/VJiqHVqi5Q6Tjp9jNGK88UOzWDiZnEGE2sux1XNAeeoy1nuGHyR8yR4ugndqYdUmsmWa7jzLAq57iX/awNhqhr/4EcQy9V+GV1lvlWwwGY5109/57iQ== 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=ictWu/aa154PcvJHpsTd7qZYRW+3mCElHG9mQ5RCw3LhsMfpUjjiYHN6nswWXGvyGCSNXh1DDBZCEcD+EQ2fQNOYOLC1wyH7SfUyDfqm+rDQ+gEr9P6XqnG2qXQte2hIc3ybfF3c/aW9PhlpK8SfLsczazYjb/MiNX/jTU8PM/I= 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 AM4PR05MB3345.eurprd05.prod.outlook.com (2603:10a6:205:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Fri, 3 Jul 2020 13:47:10 +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 13:47:10 +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 16:46:36 +0300 Message-Id: <20200703134641.386297-6-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200703134641.386297-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200703134641.386297-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::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 SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Fri, 3 Jul 2020 13:47:08 +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: ee7803a8-bd77-45b8-7e09-08d81f579514 X-MS-TrafficTypeDiagnostic: AM4PR05MB3345: 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: f79RPhFY07TyikbbwNEBgIvupO7quDIM0DQXb5Ic6E05ChwbB6BIAni4wrbYHZxpAtakdCwl5NgXFghqhVd3V6N6WdZjNm6MiiCa5Z2XnIckqpe+k9e2GL0+s+d/y+RE5AkRX00fPArWxiChoryTOJXFhbw6aR/Yiq4iYyRpTPsbOVOROo5gfwW/gGupIsozA4UpxsX57FVcPKtOOLZfUg/KB81VLYzdOVzex2PNP00E5FoKxHhLGHacjbPzJ16n6lAsg4ftvBvvZXUQD3zyIsiPhM915SY8XU4hJj1cpaE+S4uYJVQy3z/igwNakeq1Oi1lpM8PESKWqAmRT4eiCA== 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)(396003)(376002)(136003)(39860400002)(4326008)(66476007)(8936002)(8676002)(6486002)(6506007)(478600001)(66946007)(52116002)(83380400001)(956004)(6666004)(186003)(26005)(1076003)(16526019)(107886003)(66556008)(5660300002)(2616005)(2906002)(86362001)(36756003)(316002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ylZoYfmhwG8JEn8Skm2IaJ9aY1fcdlQsAiMKtkg95thWV6W9zWIVQvtkO4kdGPq/W2fnpuS8ZWtOYUStfMMhb/eetg1K8ajYPffiX/g9nV8ETMyC5HIDPqd0B+UT2pH8M4ldR7lgbBhaYQ1UkHU4myEg2jv1P7cTJGjZ6d2akyF+dPhMC8T80x1pAJPLY+S9QSQIwIQKxH/Xxav6sYPRog42lY7TXQIspagjep1v5jFXnX/FVol3LpCJel2HiHR5xYtFovXWmUYdBkeYMmUfWVe9rQeUawQecx74oKLSzKMWjOR35T3Iy9Xqp3lplG8bxckEV4xgN7eOptPvHt4xtqeT7EywJIteC8PsojU3mpnPsWBO0TVIIJ+0efUOn9oy6FnGmnmAX6nciWsGpmn59C+xG+RrSDaNYS2NtwPyLv/z82GziTfshgyGkYGg4Kul4HNoZ+KhD/qHCAvAygPR4ioOYNrNhDu9dzewvCxfnYU6febiXxt/Phz5Y7S/8nyd X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee7803a8-bd77-45b8-7e09-08d81f579514 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 13:47:10.4374 (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: y9gAw7tqAsnjFBn2WLWuuTtDjPRpAJtOeW3rOAI3CnCLvAHrjYqf2z3DmQDxEXVG8eM9jWpqacSa0YxdiVabuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3345 Subject: [dpdk-dev] [PATCH v4 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