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 4ED23A0546; Thu, 16 Jul 2020 09:30:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 311771BF5C; Thu, 16 Jul 2020 09:30:13 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130087.outbound.protection.outlook.com [40.107.13.87]) by dpdk.org (Postfix) with ESMTP id 798D71BEE4 for ; Thu, 16 Jul 2020 09:30:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H8petbMtGQD7aAp1Muly7WNjrt6bFZDofY4yug0MdRbKILApotvWEoTIVrAp0VaY8zREncJbEHfI4VVVhm1/QY99pgGKPWpPs6fZIk46URD29MDEEzvMGxbYX70CkFolVVWaxrEwaW2Ft9qGQOLRTbbEfH7eIfvG6QCI7Jj5UFhGvNSbp+UT1Ltt1j6qfm+/SEDusCjgQrc09sE6+YaWe/1hgiMscjwuXFNnLBB5nE9JCi0GvXf9sVOVLBcDgQMtISZKTc1ZrR/wCN8HuOMkl6wTegX/NKsRwp5wK5PbylhzgVWTuaUE9tWVT/5LP69uKV3+w+49AMitJHUzxyQzpg== 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=9THqAmigjBncK/veqwb9w1+n283Rza34OC+RDMsCoBU=; b=KQfNnW6CX+7YL1lsp7neLX3IgqQq1K0nbz+B7nuDnmglSGmziwsnkAmfdA0C6+/gXRrGQkEjM4Bz7X5PH0R81UqDYrIkLa7wRk8t0SWBsRg9YiNHjf5g8kq1aXqcrTSx9Cy/lmjRK9Fq2U3qUoithhVgh5TE8yGSEPSbmEy9ZSkh4GUsUCLUiZ+HQYGfSv1skTUHRQbscVQUylTUaqqU/OBK/7+oAxEwLRnOXwPfoT/pwk7rGZKWm6XQxl7zIEQV6rSVFVAvcpJAwbn94k5B/zpY7doNVZ8KRYSEkxwLD8bsPrE4pmOlzXADWbI1q1dI13HZFWYZ20zY7u4ks6TVPQ== 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=9THqAmigjBncK/veqwb9w1+n283Rza34OC+RDMsCoBU=; b=tPrSTPjI4ZHOkpnN2Y8l+J0EAlkQlzK+boPUDfNWMISPFnW4TaMypYZZMiWGcWxzmqTq2LVxUxDq9Rywv1EVCEZUEiGranYrk3Tv8cwjXipviYxUh0YF+M56xlN7Q+CRkXz1Mmi8KQwpjgY9hwBFVLyYIhH5y0Ag7rsbaNbigVI= 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:09 +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:09 +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:34 +0300 Message-Id: <20200716072938.812733-6-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:07 +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: 3b45ec19-33e1-42ab-23f2-08d8295a1179 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:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mJr1ge85CgUoT/E+Mv5olidMnGjBD4OBDRrNXS6moBnC4QDmbxV5VaniQHL6dXc1hLJw5cUCUBCBrAvk5fXBE3kiBbZdqa9SvSI+9hp5L+Z/7DQ09HkrTI+qBOJQAn7+c03IzNk3kgkjxVihbsIBupfMr5oqXksUbzYSApFJ87TATlbMgIv+EsIt4DLJNGHtz1wma2VBekM9DPkuLJI8qo0JlEG+3jdwgrrC+UjIUWB+qJvijb9NQAEJ+9ZtQOHYwUCCE5z2SxLOM7BXc1Ye0uzObbqQX/HgWZX1Lr2mUM/9SKqbwPs8yyXeZEpQM4K9hZl5/zRbeRdwr/V1qbcRaw== 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: JQyUQpb0Igc0/FW5cqodB1UMAS3uxIbBCpTxBebrzMsZce8/lKpTKwA1JYglFcp3SOYpMqRU733um8VC2i8RAjNje8wIwvoygvfOwTq2//LtEQdmA3b4OP+VHSnTJKYeMGL+lHuaxEsc5hsvCdPFYuXvUpFXdxjBVQFM7NMOPbKJIhU4a7/hXPS3Okopgt45ibiR58w0X1/9JDkOJloC/AO6g9XdyvAcEsPZ8yTkxlQHpfKYBDrV7G8WjeOTbrrfWrNElktmWKne3+f+NXmvl+WMqbRSxt/OGCTeIvW3M/9+8LS4CZjool2V+Rg+eRn+N6OVj9fpoS+xAaq8pJRJXRSel9MAbpeuBq0rzxw7w1a3AT7YI8OP+DaWEjMbxxhodO6KLr+uxbY8RJwj/jNMyQ3lB+B65ZHFaYCGZgblb1lHSwe1s7Q/mPHvlE7iPB8hqM53oJcczDxVTVPER59CXFoqvj4Mzr5mbh6HvQ4IQw6IF1K9JpBS7TB32MJgFlv+ X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b45ec19-33e1-42ab-23f2-08d8295a1179 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:09.1951 (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: 2OKb08HhAks6MMMSAGPDo4NWsdEgzR7BwbW6Zytp/OMKpyFAvXpqtAWDFB1GL1Ro3z4BMWyasBQxa0Cjo7op3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5329 Subject: [dpdk-dev] [PATCH v6 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 0c654ed8b..a6a65957e 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1912,7 +1912,7 @@ RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE) /** * Driver initialization routine. */ -RTE_INIT(rte_mlx5_pmd_init) +RTE_INIT_PRIO(rte_mlx5_pmd_init, CLASS) { /* Build the static tables for Verbs conversion. */ mlx5_set_ptype_table(); diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index 67e77b11a..205a9e4ad 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -844,7 +844,7 @@ RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE) /** * Driver initialization routine. */ -RTE_INIT(rte_mlx5_vdpa_init) +RTE_INIT_PRIO(rte_mlx5_vdpa_init, CLASS) { if (mlx5_glue) rte_pci_register(&mlx5_vdpa_driver); -- 2.26.2