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 7DF6CA0526; Thu, 9 Jul 2020 09:36:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C58561DCC9; Thu, 9 Jul 2020 09:35:57 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150058.outbound.protection.outlook.com [40.107.15.58]) by dpdk.org (Postfix) with ESMTP id 0F2E51DCC3 for ; Thu, 9 Jul 2020 09:35:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K3lZQo18U+7PqoqchZi/3pb5aSJczt7aDbhupbwbUUEk23bsjkfyeMry0Yyf/09UZYUQwBphEyBYYZzKJKPs6lE5juq2IjOztMs+WNRRQLW8Nh4nfCjan6KQ8yYPrs5fS+/7O+vTPZ7MZvRgS4U8528Sm2SUBfljMcbKfpVa56UGAdDTy/fJ5Z7wpz6JNzq2ucbrXzLRskicprLEt7DCuAhLds0wQLcgPIRGSQcaCeAmDGIJpUclRkO4Hib30Z0HqKBx5AvcZlHFnbbeLopwWlBndn1B20Ld9HG8aLPezCxXx2RZG62IdNY7RxBGTbsJzw5EtP/3dtj+Xj8hlfeO8Q== 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=iuLXkc5F9uoQviWwBXCEwbPshRyrt/AZIonvmxL9u9Hv98ADCthowyA6jmGSgVmZNtDmiAnrbTUQGiOFa7f3Jp2OV8Lb1QlMwpY/mU3BDYuXJDiHwHQmqptewkUkwY8scif8HogZHeAMglMD26nP8Hs1NpKz8g9oRIbXy6g4fFSu7SZg1kf4OHKmseZureh8lsMMBg8MF4t2gIwsiYyjxEzpptKP1+fakJt3aIzRv0SAtpUBPKGqa8WG7ALerNEkeY4MnObmSQPe0McTU1X810104d7YRxSwViAB/hTSlvWEjOkbnAi6Y2pCfyHfIRtwGAn/4Jdq+mABwGj6KtkUBA== 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=jLu0FuBHSQ7lx0VVVT1KMN5otJpcraIPrn+f3K2D0PX5TzM9CpJ3bQyvfYxStpSNtdKmE3nakihzIuvBeDppgVjkpEygbbUJD9SFnnxnMEaEKCRYSpSNsCKy0n8TMwW5Lt5jvCcwYHiftFxVl8klXePEPbQEqxrikT9FPhiolsc= 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:55 +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:55 +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:48 +0300 Message-Id: <20200709073452.948894-6-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:49 +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: 4f75d2c5-f63c-476f-27b5-08d823dab443 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:3826; X-Forefront-PRVS: 04599F3534 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NvyXhZ9vmwKlH01PDB30bEIp3mDCDGE6672ZmpbX9uSAZx1h8WXIgtjUyDtN5fzi5ipMELaXlz/CDAmfdIi9dVf72P7QexwYu19sEHWknxC08r8uSAeymqivcqHwbtz7JJbTy/AS7mA7rwVdftclMs58/JJLEHpqeCr0T054E4tEFmElzhYmTIs5BTGf37rNI4NEIXVtgiUqwFRty7zcVdNmdf0hTghhWI1TQc4NZLRuTi91uo/EezszLdLEuKo8ZGDRBMbNacGNvmaFJoLRYUHmFtMUyEEbIQvV180vMVG+hbFGKsr8WO1gX6ZYVGQDGCT15/3G7ocZPNo7YWEW9A== 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: ropf0x+MdqurcuLBXwoqRL/UTAO21jiO4OWGKlIW2UsYkA5pTzCiDWYRtBgy+V924rmU1esjxXvFKvGQtkeIccYtmGihFZN9QQ3OltNs2x4XSnEeIjEiJklt7kGsRA3Iz9gD/Z1BkeIkAjtAO6nyvoc9gUA4p8ZrxV0D+6hKeKz7dYBQjhe6dNc7gts3dzWohAtJxBC/v8Kb8QfXH6Ik3pgVzsfYAfxKpNPuJlmLyXUwbGmDmNfo5VhoTVCivgAx2r5Xb3X5Xdov2nGHn7oWT+I/dRmK4H2osFz2Lb0jGfLLpyU50SVdck1zYgH3JnGGgsF8Y5eQYu4a5X+4tprp1REBzNEK2IAk8c8X9PVkcnoV4zRhDE//hYS1xoVHvt9YERZZ9ZW7jBKZva2XezCDNdGouROB6+GtlmvjpvEvya/JvkCPU3a4EfI2bQkqJji31R3aRSKoZo5a/jcjcBJ7APmnUMIDcoFGCVtkC3AeobB0EFhFQaAzMG8K5jjwz7H8 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f75d2c5-f63c-476f-27b5-08d823dab443 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:55.0263 (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: s/6IbozBBtFozOVr1ugXYOmKtzk5ciUp/IX9psdWLMt8+ljEshRyXY7PYAwI+6uxcF9GIjRa/LlYdClWxXHR8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5084 Subject: [dpdk-dev] [PATCH v5 5/9] 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