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 38515A053B; Fri, 17 Jul 2020 15:50:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C2A11C1A3; Fri, 17 Jul 2020 15:50:00 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) by dpdk.org (Postfix) with ESMTP id D06861C1AE for ; Fri, 17 Jul 2020 15:49:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VhoRDeBXGmRKNGLR/ktYyGmRSy5Z2YZCCxZ3iXsmCJOZibxEB1Fu2BHchfcL4y6Ux0ANiJpBj25VVgwzHmNswFDZM2vLm1rsdjzNdo1W2rDf8Tg0MDbXqHRCXKLoH2dxjZLV68LP05ddCXGAvqfYT8z3wPj0cfY9+Lo8MFmgkFGYxFp5In4WnZPbrc/HGBMIOFsZcX5LfkNUk2fPdM14RnTcUT4Qb6JZ0FWDhtd89tRxN8qP45cA9My9s6/+n7P5AkrFVyKGEpBh5MEuuEmJFldklVZp9L/Y/g1zVi0HcFix57qS1mDr1OE6uhNbGZA8/WMSm2FCsyml3wQwzWFBdQ== 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=A9ddDPXSFKW3OTJ562+HMZZBuJN5fKo9oH7i7zPl5xg=; b=MJCgKqX2eB3x0lxESET5crE90OtjTT4rEgeZs2Pb0wSqfEAo+lADctpskWVxYYFOsuEpIzFiixTX4e4BDCiJet0E0NK16tUsVRbRVVYV4sWQ25u8DFlE1nNB58jMLu6lZjo+fQ4xOLYIUtdA3zonnQZRcevb5S22JXrTzWMpSmbejc6xMGv9WhD27NAL9wb9iLMiblPyyL7IPEaOuVuXRaQEyWyaQ3R+0bEtcEPjGSPxDRIs6itE+dct/2OLPKY/vEO2BTusZBbzjEXUwAz9zYAiTzQDkyWQ39wsfIj3JT96hW9zc2CFP2M49JkEwjp7i1e/XKBRMon4Y/uYjuSkUQ== 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=A9ddDPXSFKW3OTJ562+HMZZBuJN5fKo9oH7i7zPl5xg=; b=S8ahc67a4HiFYsEOsQiUB2UOC4LtTzFDwzJ8ZseD21dfXV3DINlpzj+ogr0ZMo0CHK1/rJaE3/Yhtx9xeVKkSGmTa8vGwDxWjaKWRwCNXnVwGhaQbyCK8qU3+I+MGyx5BfZsrbVMBgmYL02Ihh2ap0/rG8yBrsvNkkY9hkvjX1U= 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 AM0PR05MB4355.eurprd05.prod.outlook.com (2603:10a6:208:59::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Fri, 17 Jul 2020 13:49:56 +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; Fri, 17 Jul 2020 13:49:56 +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: Fri, 17 Jul 2020 16:49:20 +0300 Message-Id: <20200717134924.922390-6-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200717134924.922390-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200717134924.922390-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM3PR03CA0013.namprd03.prod.outlook.com (2603:10b6:0:50::23) 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 DM3PR03CA0013.namprd03.prod.outlook.com (2603:10b6:0:50::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.19 via Frontend Transport; Fri, 17 Jul 2020 13:49:54 +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: 8cbdb119-d857-48d8-6e48-08d82a584a39 X-MS-TrafficTypeDiagnostic: AM0PR05MB4355: 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: xwQQAULKqOB5bl/JTg8qMw5C8SGLkwZcxxwuYMcG5z5Aq7/ychLnv81mUJfNtmPDL8XuMQmVCjk3W+KbklYGlipLlYoQguikOshr0xHO1O03zj9+dA5l8+JQQY77GkbbQmGtFkwlMFZ2ICDFCDQE+xUgnX6pkiI+y3Q6TSlyU9JL/nWLfj7APBhne81lJR5NitYNLtfnFEP5X1x3qTQkkaUpSf5Xb6sFmpmM3dzMWQLrdTkMBP0ukVr9HVKOkS5RORy8uMAFo02L5M3+Xx2iwM1X0Jpvx0ziQsHm5v1zWUQAi3uSb591RjOnEXQ5qPBDOMzO+IZrDo7Xrt/KEU5S3A== 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)(136003)(346002)(396003)(39860400002)(376002)(366004)(8936002)(6666004)(83380400001)(2616005)(107886003)(956004)(86362001)(478600001)(4326008)(16526019)(186003)(26005)(6512007)(52116002)(1076003)(6506007)(66476007)(66946007)(5660300002)(2906002)(8676002)(66556008)(316002)(36756003)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: h0uOEat8AXSHbeE8nxidUhR5tgkcxUfcrxnY0X4YSbodP7PCu74YLcRaMWiRE/Knc1ndqD6yBkzBuoi0skB+sY+egXzAjxoV9uO2h5xRmlmcLU3d3ryxXJ81Lk7j7gB2Te3JeJHUzUh7j+kqfqsT2py/mRrEwPmD6SjvEfxebIZSv3x4js0GnddB25sxWxuzeuzAtHJzz3AzEuahO+yzixFCVNRcVBLSSFgieWOqZpVHKwoetwy+vmvezT4n7cjb5F+C1VyktuX8E70W0W/ddX6ywAT0SK28RLMcXRNrOzcwCNVoZZJHy6raCAkuSS1UFchxD503UAcDKpJj2l5Kapbov1uw541Yq1OijBZ3DGPak6m1766fG+QWYSWuSYk0keX16Xrt3H5hqL+8iVFkUAkVg7r/5VaGEDy/FcMiTSxmQVin3GQrukKMMH+iqcFyVCO1AAfkUqmUtDTI1JCavPUSlERXxj4fqnbcbkyIincTAHcooisYDCmX4/W1ajQF X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cbdb119-d857-48d8-6e48-08d82a584a39 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2020 13:49:56.8228 (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: 6DvsvLteQ2J1fPjpfmM/PZWjibVIfJCsCh9Q+jriCsLMf7ODDHA+E8H6k+Xs/Vrg0/dcLC0B+e9ZX5C3V/vKtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4355 Subject: [dpdk-dev] [PATCH v7 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 723c1dd72..1647256be 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -2074,7 +2074,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