get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74996,
    "url": "http://patches.dpdk.org/api/patches/74996/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1596025794-26599-1-git-send-email-viacheslavo@mellanox.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1596025794-26599-1-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1596025794-26599-1-git-send-email-viacheslavo@mellanox.com",
    "date": "2020-07-29T12:29:54",
    "name": "[v2] app/testpmd: fix txonly mode timestamp intitialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "89b74691741225a02066a9fee376bb6367079a8a",
    "submitter": {
        "id": 1102,
        "url": "http://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1596025794-26599-1-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 11397,
            "url": "http://patches.dpdk.org/api/series/11397/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11397",
            "date": "2020-07-29T12:29:54",
            "name": "[v2] app/testpmd: fix txonly mode timestamp intitialization",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11397/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74996/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74996/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 9CA64A052B;\n\tWed, 29 Jul 2020 14:30:01 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7B8101BE9A;\n\tWed, 29 Jul 2020 14:30:01 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id DD78D4C98\n for <dev@dpdk.org>; Wed, 29 Jul 2020 14:29:59 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@mellanox.com) with SMTP; 29 Jul 2020 15:29:57 +0300",
            "from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx\n [10.210.17.40])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06TCTvUO016054;\n Wed, 29 Jul 2020 15:29:57 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 06TCTvwI026650;\n Wed, 29 Jul 2020 12:29:57 GMT",
            "(from viacheslavo@localhost)\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 06TCTuai026647;\n Wed, 29 Jul 2020 12:29:56 GMT"
        ],
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n viacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, thomas@monjalon.net,\n ferruh.yigit@intel.com, Phil.Yang@arm.com",
        "Date": "Wed, 29 Jul 2020 12:29:54 +0000",
        "Message-Id": "<1596025794-26599-1-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1595863595-11344-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1595863595-11344-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v2] app/testpmd: fix txonly mode timestamp\n\tintitialization",
        "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": "The testpmd application forwards data in multiple threads.\nIn the txonly mode the Tx timestamps must be initialized\non per thread basis to provide phase shift for the packet\nburst being sent. This per thread initialization was performed\non zero value of the variable in thread local storage and\nhappened only once after testpmd forwarding start. Executing\n\"start\" and \"stop\" commands did not cause thread local variables\nzeroing and wrong timestamp values were used.\n\nFixes: 4940344dab1d (\"app/testpmd: add Tx scheduling command\")\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n\n---\nv1->v2: On mailing list comments addressing:\n    - removed unnecessary volatile qualifier\n    - comment added about the barrier\n---\n app/test-pmd/txonly.c | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c\nindex 97f4a45..fe28bdb0 100644\n--- a/app/test-pmd/txonly.c\n+++ b/app/test-pmd/txonly.c\n@@ -55,9 +55,12 @@\n static struct rte_udp_hdr pkt_udp_hdr; /**< UDP header of tx packets. */\n RTE_DEFINE_PER_LCORE(uint64_t, timestamp_qskew);\n \t\t\t\t\t/**< Timestamp offset per queue */\n+RTE_DEFINE_PER_LCORE(uint32_t, timestamp_idone); /**< Timestamp init done. */\n+\n static uint64_t timestamp_mask; /**< Timestamp dynamic flag mask */\n static int32_t timestamp_off; /**< Timestamp dynamic field offset */\n static bool timestamp_enable; /**< Timestamp enable */\n+static uint32_t timestamp_init_req; /**< Timestamp initialization request. */\n static uint64_t timestamp_initial[RTE_MAX_ETHPORTS];\n \n static void\n@@ -229,7 +232,8 @@\n \t\t\trte_be64_t ts;\n \t\t} timestamp_mark;\n \n-\t\tif (unlikely(!skew)) {\n+\t\tif (unlikely(timestamp_init_req !=\n+\t\t\tRTE_PER_LCORE(timestamp_idone))) {\n \t\t\tstruct rte_eth_dev *dev = &rte_eth_devices[fs->tx_port];\n \t\t\tunsigned int txqs_n = dev->data->nb_tx_queues;\n \t\t\tuint64_t phase = tx_pkt_times_inter * fs->tx_queue /\n@@ -241,6 +245,7 @@\n \t\t\tskew = timestamp_initial[fs->tx_port] +\n \t\t\t       tx_pkt_times_inter + phase;\n \t\t\tRTE_PER_LCORE(timestamp_qskew) = skew;\n+\t\t\tRTE_PER_LCORE(timestamp_idone) = timestamp_init_req;\n \t\t}\n \t\ttimestamp_mark.pkt_idx = rte_cpu_to_be_16(idx);\n \t\ttimestamp_mark.queue_idx = rte_cpu_to_be_16(fs->tx_queue);\n@@ -426,6 +431,10 @@\n \t\t\t   timestamp_mask &&\n \t\t\t   timestamp_off >= 0 &&\n \t\t\t   !rte_eth_read_clock(pi, &timestamp_initial[pi]);\n+\tif (timestamp_enable)\n+\t\ttimestamp_init_req++;\n+\t/* Make sure all settings are visible on forwarding cores.*/\n+\trte_wmb();\n }\n \n struct fwd_engine tx_only_engine = {\n",
    "prefixes": [
        "v2"
    ]
}