get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85056,
    "url": "https://patches.dpdk.org/api/patches/85056/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201213102056.11380-6-talshn@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20201213102056.11380-6-talshn@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201213102056.11380-6-talshn@nvidia.com",
    "date": "2020-12-13T10:20:29",
    "name": "[v3,05/32] net/mlx5: replace Linux sleep with rte sleep",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "39dd8636b8cbe3b1c0f0732ee93dd84aed97392b",
    "submitter": {
        "id": 1893,
        "url": "https://patches.dpdk.org/api/people/1893/?format=api",
        "name": "Tal Shnaiderman",
        "email": "talshn@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201213102056.11380-6-talshn@nvidia.com/mbox/",
    "series": [
        {
            "id": 14276,
            "url": "https://patches.dpdk.org/api/series/14276/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14276",
            "date": "2020-12-13T10:20:24",
            "name": "mlx5 Windows support - part #5",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/14276/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85056/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85056/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "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 96A38A04B5;\n\tSun, 13 Dec 2020 11:24:45 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 95DE6C9E7;\n\tSun, 13 Dec 2020 11:22:04 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 5D523C988\n for <dev@dpdk.org>; Sun, 13 Dec 2020 11:21:48 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n talshn@nvidia.com) with SMTP; 13 Dec 2020 12:21:41 +0200",
            "from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BDALe1V018562;\n Sun, 13 Dec 2020 12:21:41 +0200"
        ],
        "From": "Tal Shnaiderman <talshn@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com,\n ophirmu@nvidia.com",
        "Date": "Sun, 13 Dec 2020 12:20:29 +0200",
        "Message-Id": "<20201213102056.11380-6-talshn@nvidia.com>",
        "X-Mailer": "git-send-email 2.16.1.windows.4",
        "In-Reply-To": "<20201213102056.11380-1-talshn@nvidia.com>",
        "References": "<20201210150648.8784-2-talshn@nvidia.com>\n <20201213102056.11380-1-talshn@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v3 05/32] net/mlx5: replace Linux sleep with rte\n\tsleep",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Ophir Munk <ophirmu@nvidia.com>\n\nReplace Linux API usleep() and nanosleep() with rte_delay_us_sleep().\nThe replacement occurs in shared files compiled under different\noperating systems.\n\nSigned-off-by: Ophir Munk <ophirmu@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/mlx5.c         | 5 +++--\n drivers/net/mlx5/mlx5_trigger.c | 3 ++-\n drivers/net/mlx5/mlx5_txpp.c    | 6 +-----\n 3 files changed, 6 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 52a8a252d4..8e9df6abcf 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -21,6 +21,7 @@\n #include <rte_spinlock.h>\n #include <rte_string_fns.h>\n #include <rte_alarm.h>\n+#include <rte_cycles.h>\n \n #include <mlx5_glue.h>\n #include <mlx5_devx_cmds.h>\n@@ -1330,7 +1331,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)\n \tmlx5_flex_parser_ecpri_release(dev);\n \tif (priv->rxqs != NULL) {\n \t\t/* XXX race condition if mlx5_rx_burst() is still running. */\n-\t\tusleep(1000);\n+\t\trte_delay_us_sleep(1000);\n \t\tfor (i = 0; (i != priv->rxqs_n); ++i)\n \t\t\tmlx5_rxq_release(dev, i);\n \t\tpriv->rxqs_n = 0;\n@@ -1338,7 +1339,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)\n \t}\n \tif (priv->txqs != NULL) {\n \t\t/* XXX race condition if mlx5_tx_burst() is still running. */\n-\t\tusleep(1000);\n+\t\trte_delay_us_sleep(1000);\n \t\tfor (i = 0; (i != priv->txqs_n); ++i)\n \t\t\tmlx5_txq_release(dev, i);\n \t\tpriv->txqs_n = 0;\ndiff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c\nindex bd029154f8..646f29b923 100644\n--- a/drivers/net/mlx5/mlx5_trigger.c\n+++ b/drivers/net/mlx5/mlx5_trigger.c\n@@ -9,6 +9,7 @@\n #include <rte_ethdev_driver.h>\n #include <rte_interrupts.h>\n #include <rte_alarm.h>\n+#include <rte_cycles.h>\n \n #include <mlx5_malloc.h>\n \n@@ -1171,7 +1172,7 @@ mlx5_dev_stop(struct rte_eth_dev *dev)\n \trte_wmb();\n \t/* Disable datapath on secondary process. */\n \tmlx5_mp_os_req_stop_rxtx(dev);\n-\tusleep(1000 * priv->rxqs_n);\n+\trte_delay_us_sleep(1000 * priv->rxqs_n);\n \tDRV_LOG(DEBUG, \"port %u stopping device\", dev->data->port_id);\n \tmlx5_flow_stop_default(dev);\n \t/* Control flows for default traffic can be removed firstly. */\ndiff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c\nindex 21675ab17a..a1ec294942 100644\n--- a/drivers/net/mlx5/mlx5_txpp.c\n+++ b/drivers/net/mlx5/mlx5_txpp.c\n@@ -769,15 +769,11 @@ mlx5_txpp_init_timestamp(struct mlx5_dev_ctx_shared *sh)\n \tsh->txpp.ts_p = 0;\n \tsh->txpp.ts_n = 0;\n \tfor (wait = 0; wait < MLX5_TXPP_WAIT_INIT_TS; wait++) {\n-\t\tstruct timespec onems;\n-\n \t\tmlx5_txpp_update_timestamp(sh);\n \t\tif (wq->sq_ci)\n \t\t\treturn;\n \t\t/* Wait one millisecond and try again. */\n-\t\tonems.tv_sec = 0;\n-\t\tonems.tv_nsec = NS_PER_S / MS_PER_S;\n-\t\tnanosleep(&onems, 0);\n+\t\trte_delay_us_sleep(US_PER_S / MS_PER_S);\n \t}\n \tDRV_LOG(ERR, \"Unable to initialize timestamp.\");\n \tsh->txpp.sync_lost = 1;\n",
    "prefixes": [
        "v3",
        "05/32"
    ]
}