Show a patch.

GET /api/patches/74696/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 74696,
    "url": "https://patches.dpdk.org/api/patches/74696/",
    "web_url": "https://patches.dpdk.org/patch/74696/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<20200723200910.376581-7-parav@mellanox.com>",
    "date": "2020-07-23T20:09:06",
    "name": "[v8,06/10] common/mlx5: avoid using class constructor priority",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f3b03f04a2c0fa225bfaf8321a34402c8cff02f0",
    "submitter": {
        "id": 1780,
        "url": "https://patches.dpdk.org/api/people/1780/",
        "name": "Parav Pandit",
        "email": "parav@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74696/mbox/",
    "series": [
        {
            "id": 11259,
            "url": "https://patches.dpdk.org/api/series/11259/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11259",
            "date": "2020-07-23T20:09:00",
            "name": "Improve mlx5 PMD driver framework for multiple classes",
            "version": 8,
            "mbox": "https://patches.dpdk.org/series/11259/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74696/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/74696/checks/",
    "tags": {},
    "headers": {
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-Mailman-Version": "2.1.15",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DB7PR05MB5558",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n 29doLLbj/PZI6PK6k6fYpIPn/alQEJ6Oninn26y7hBogy9JQDjgf0C932Gpp9zwmLLebOyCbXbDYAZSlvhmaBA==",
        "Precedence": "list",
        "X-MS-Exchange-Transport-Forked": "True",
        "X-BeenThere": "dev@dpdk.org",
        "X-LD-Processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr",
        "X-ClientProxiedBy": "DM6PR03CA0009.namprd03.prod.outlook.com\n (2603:10b6:5:40::22) To DB7PR05MB4876.eurprd05.prod.outlook.com\n (2603:10a6:10:1d::32)",
        "Content-Transfer-Encoding": "8bit",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-AntiSpam-MessageData": "\n ciWrHAA7SfodA5K1eALm+Mrho76+H/DSlHugZba+uj94NolGq08RNgD1d7nvm9HAD+8yqhSuzRVuR9rZtjquw7Z6bb+UOLkyvZhFpnhgPn6iH6vAfyAeUPCGmEKobxJZg98PDpUxXbfjaV9i3M+tYLZ4Q+DkR73oxu36zORqfkENDUfo6l/NnsI1kTUG5QAsUDIFSuKVjAfkQJ4RZ/8NslX+DsoQgE6siOg//wJnM+FlnR72N8tszdTx8lYXBvKr2n8wmRV+gcTsRXvHHejlg7rg/myXESMglFGujyCihrFzjn7wM3RLt0kTclgHyFTPE28fgA843xmZ1L1NQetr0bT7wd8WeBFKtslNf4y3lZ2qpAgPSkMmYYmIIpSTQdgIprxJYrmG1nF3HsT5tSpX6bdWICGkBjrxqKQOthusl3mJOuSpbGW2wKaZA0P3DzvUZL53XrPEbAapN1WMJ1HrGTfWo7Xva3JFF5SVe2IzgGevaBIc3BcFbw4PZgaLy1DM",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DB1B1A0518;\n\tThu, 23 Jul 2020 22:10:37 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 50AB51C068;\n\tThu, 23 Jul 2020 22:09:47 +0200 (CEST)",
            "from EUR03-DB5-obe.outbound.protection.outlook.com\n (mail-eopbgr40056.outbound.protection.outlook.com [40.107.4.56])\n by dpdk.org (Postfix) with ESMTP id A35541C038\n for <dev@dpdk.org>; Thu, 23 Jul 2020 22:09:41 +0200 (CEST)",
            "from DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32)\n by DB7PR05MB5558.eurprd05.prod.outlook.com (2603:10a6:10:5c::21) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 23 Jul\n 2020 20:09:40 +0000",
            "from DB7PR05MB4876.eurprd05.prod.outlook.com\n ([fe80::8cb3:93cb:c3ef:4293]) by DB7PR05MB4876.eurprd05.prod.outlook.com\n ([fe80::8cb3:93cb:c3ef:4293%5]) with mapi id 15.20.3216.022; Thu, 23 Jul 2020\n 20:09:40 +0000",
            "from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by\n DM6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:40::22) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.3216.21 via Frontend Transport; Thu, 23 Jul 2020 20:09:38 +0000"
        ],
        "Subject": "[dpdk-dev] [PATCH v8 06/10] common/mlx5: avoid using class\n\tconstructor priority",
        "X-MS-PublicTrafficType": "Email",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Message-Id": "<20200723200910.376581-7-parav@mellanox.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=XJ9S1SO1hCF3mj7i5BBl3nsJewJ1eZ8gJCyFvn3c5Ao=;\n b=oXy9h8g9P9Aa4tv+J5NnB7PeQ6KXAAmpJYiWS/EoibTW0LV+7/HvCgr21+RdTlbfFODqX4J/4UE2nnhyopLiSNCnJQ/Eh1CEjkeTl9PUir/Mu7uwtd3fMSGsZV+9SjzuAqtCf8AJSSTKdETle/n7Qkb0JeQ3ZNQZp04dRZOHi0E=",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-MS-Office365-Filtering-HT": "Tenant",
        "To": "dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "From": "Parav Pandit <parav@mellanox.com>",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "Cc": "rasland@mellanox.com, orika@mellanox.com, matan@mellanox.com,\n joyce.kong@arm.com, Parav Pandit <parav@mellanox.com>",
        "X-MS-Exchange-CrossTenant-AuthSource": "DB7PR05MB4876.eurprd05.prod.outlook.com",
        "X-MS-TrafficTypeDiagnostic": "DB7PR05MB5558:",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none",
        "Authentication-Results": "dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com;",
        "X-OriginatorOrg": "Mellanox.com",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "X-Microsoft-Antispam-PRVS": "\n <DB7PR05MB55583CD5B88D9A9A1E4298CDD1760@DB7PR05MB5558.eurprd05.prod.outlook.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "In-Reply-To": "<20200723200910.376581-1-parav@mellanox.com>",
        "X-MS-Exchange-MessageSentRepresentingType": "1",
        "References": "<20200610171728.89-2-parav@mellanox.com>\n <20200723200910.376581-1-parav@mellanox.com>",
        "Content-Type": "text/plain",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:216;",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Originating-IP": "[208.176.44.194]",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:DB7PR05MB4876.eurprd05.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(376002)(346002)(366004)(396003)(136003)(39860400002)(6506007)(8676002)(8936002)(26005)(52116002)(2906002)(4326008)(478600001)(66946007)(66476007)(66556008)(83380400001)(36756003)(5660300002)(2616005)(6486002)(86362001)(956004)(1076003)(6512007)(6666004)(107886003)(186003)(16526019)(316002);\n DIR:OUT; SFP:1101;",
        "X-Mailer": [
            "git-send-email 2.26.2",
            "git-send-email 2.26.2"
        ],
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=XJ9S1SO1hCF3mj7i5BBl3nsJewJ1eZ8gJCyFvn3c5Ao=;\n b=oBoZ7IAVd3snWbxlRwjEg4C/yCLeLo8p6UR2LSooUgKaDfta21OOPMb1bzsgKI0Fh+7mChn6bGjEDny5EawfyOFFps1Yb89DlomwgXP31vmrjg588IHu09YL2KBSeKGCrUeOvUCVCL/+o0e7hZ5bYNy6+9WhJDRxnUhr93grjjbvl9eObEWiLN/ulDnXnWtoYvVml7J1WxmCEj1KUsKT+xgdFgs/YY+7dn3PhtVH8O5+0fidjnGUV8klwEMKjqsmrHxIDoHU15bDL1uNZS3CmLtBAocFHMf3xyxsjN1gG1DVVAd81o8IjEzg/40R+b0/I+NknK8qOFPssEmMnXvsdw==",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 93acba2f-dab3-4daf-cb85-08d82f4454cd",
        "Date": "Thu, 23 Jul 2020 23:09:06 +0300",
        "X-MS-Office365-Filtering-Correlation-Id": "93acba2f-dab3-4daf-cb85-08d82f4454cd",
        "X-Microsoft-Antispam-Message-Info": "\n TcK4LAPC0B9eLmseKwQRppIj2ET6i2ZiJOxrwR7OuHbwk4Yzen/WdWNihitnV1pk4DMrNfiu8oDH/ctvlcAOvo10tbS6GH1QLi0BGs6j6o3oDe5YW0bAtKh3nYhy/CY4FkbHi0ZS0tpvbVklx+meFigzYz1NJyWb854nT6mWLL+bg+8ugqjx04u97Jy5Y+OMrwqQtv9HO6g2CWW1BdFn/rv71i6ZkPRdIJLJcoBa/oLKPl7lGld5kp0y49OnU1SFR1/JiXkXkdrPqjXZMwDbjyh86uvNmp3MoSPQyF4pGiatNj9Vh4+XTkjI+KDMk0iL",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-CrossTenant-Id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
        "X-Microsoft-Antispam": "BCL:0;",
        "Errors-To": "dev-bounces@dpdk.org",
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=K4qx156qsZF4QNy5sAc1+G8DObZK7SXf1BjCO9Q8DQgIQMNUyo1IoR7yWBjCSvAqTXiizVfUGxTOi2Z7SqunQZhuZSLMRkGyquzocNQaL0B/LTeh4rcsijxt3UmZ2ILvDrlVtL/nHNvpg3VOqtL5c902xKTvqwswld7lCazUGFe+K2QTrHmCY80ZPQgDeG6izm0v1lCRyYp1ObhitMkF2ONwFrVkQpiJYkyMTQw8a2ncJoWEBuNwK9FGXyqI4KngMOBU9d+q57Umf/8B3oqg5afKT6nWflHnS4gwq97PJQ3jfU7jolNf1qNDm6lRgXQVeT9nGHPwszE4u8E18aUWOw==",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "23 Jul 2020 20:09:40.1249 (UTC)"
    },
    "content": "mlx5_common is shared library between mlx5 net, VDPA and regex PMD.\nIt is better to use common initialization helper instead of using\nRTE_INIT_CLASS priority.\n\nSigned-off-by: Parav Pandit <parav@mellanox.com>\n---\n drivers/common/mlx5/mlx5_common.c               | 13 +++++++++++--\n drivers/common/mlx5/mlx5_common.h               |  3 +++\n drivers/common/mlx5/rte_common_mlx5_version.map |  1 +\n drivers/net/mlx5/mlx5.c                         |  1 +\n drivers/regex/mlx5/mlx5_regex.c                 |  1 +\n drivers/vdpa/mlx5/mlx5_vdpa.c                   |  1 +\n 6 files changed, 18 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex 1a67a1b16..2b336bb2d 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -86,12 +86,21 @@ RTE_INIT_PRIO(mlx5_log_init, LOG)\n \t\trte_log_set_level(mlx5_common_logtype, RTE_LOG_NOTICE);\n }\n \n+static bool mlx5_common_initialized;\n+\n /**\n- * Initialization routine for run-time dependency on glue library.\n+ * One time innitialization routine for run-time dependency on glue library\n+ * for multiple PMDs. Each mlx5 PMD that depends on mlx5_common module,\n+ * must invoke in its constructor.\n  */\n-RTE_INIT_PRIO(mlx5_glue_init, CLASS)\n+void\n+mlx5_common_init(void)\n {\n+\tif (mlx5_common_initialized)\n+\t\treturn;\n+\n \tmlx5_glue_constructor();\n+\tmlx5_common_initialized = true;\n }\n \n /**\ndiff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h\nindex a811eb6c9..ebe4e9ced 100644\n--- a/drivers/common/mlx5/mlx5_common.h\n+++ b/drivers/common/mlx5/mlx5_common.h\n@@ -260,4 +260,7 @@ int32_t mlx5_release_dbr(struct mlx5_dbr_page_list *head, uint32_t umem_id,\n \t\t\t uint64_t offset);\n extern uint8_t haswell_broadwell_cpu;\n \n+__rte_internal\n+void mlx5_common_init(void);\n+\n #endif /* RTE_PMD_MLX5_COMMON_H_ */\ndiff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map\nindex 132a0695f..65f25252a 100644\n--- a/drivers/common/mlx5/rte_common_mlx5_version.map\n+++ b/drivers/common/mlx5/rte_common_mlx5_version.map\n@@ -3,6 +3,7 @@ INTERNAL {\n \n \tmlx5_class_get;\n \n+\tmlx5_common_init;\n \tmlx5_common_verbs_reg_mr;\n \tmlx5_common_verbs_dereg_mr;\n \ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 647ada339..037703d2e 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -2111,6 +2111,7 @@ RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)\n  */\n RTE_INIT(rte_mlx5_pmd_init)\n {\n+\tmlx5_common_init();\n \t/* Build the static tables for Verbs conversion. */\n \tmlx5_set_ptype_table();\n \tmlx5_set_cksum_table();\ndiff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c\nindex 36ae9f809..4e0367052 100644\n--- a/drivers/regex/mlx5/mlx5_regex.c\n+++ b/drivers/regex/mlx5/mlx5_regex.c\n@@ -258,6 +258,7 @@ static struct rte_pci_driver mlx5_regex_driver = {\n \n RTE_INIT(rte_mlx5_regex_init)\n {\n+\tmlx5_common_init();\n \tif (mlx5_glue)\n \t\trte_pci_register(&mlx5_regex_driver);\n }\ndiff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c\nindex 67e77b11a..85dbcf956 100644\n--- a/drivers/vdpa/mlx5/mlx5_vdpa.c\n+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c\n@@ -846,6 +846,7 @@ RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)\n  */\n RTE_INIT(rte_mlx5_vdpa_init)\n {\n+\tmlx5_common_init();\n \tif (mlx5_glue)\n \t\trte_pci_register(&mlx5_vdpa_driver);\n }\n",
    "prefixes": [
        "v8",
        "06/10"
    ]
}