get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83454,
    "url": "http://patches.dpdk.org/api/patches/83454/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201103001407.2931963-4-thomas@monjalon.net/",
    "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": "<20201103001407.2931963-4-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103001407.2931963-4-thomas@monjalon.net",
    "date": "2020-11-03T00:13:54",
    "name": "[v3,03/16] latency: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3e1eff8fd058c8f70d28b54b57d9ee92f808eba7",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201103001407.2931963-4-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13585,
            "url": "http://patches.dpdk.org/api/series/13585/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13585",
            "date": "2020-11-03T00:13:51",
            "name": "remove mbuf timestamp",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/13585/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83454/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/83454/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 9AC65A04E7;\n\tTue,  3 Nov 2020 01:15:30 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ED8755A8C;\n\tTue,  3 Nov 2020 01:14:32 +0100 (CET)",
            "from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com\n [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id 1FB2C592C\n for <dev@dpdk.org>; Tue,  3 Nov 2020 01:14:29 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 3C3C7AD6;\n Mon,  2 Nov 2020 19:14:27 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Mon, 02 Nov 2020 19:14:27 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id B2D0C3064680;\n Mon,  2 Nov 2020 19:14:25 -0500 (EST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=x9lzp29s3N0EY\n fnIntSOQ9rtyQhanFz3neI5Pm03g/4=; b=oM+U4KNgBgFeSHpylKMPmD+8HxN6P\n FlVGJAGk1OoQvW+DXQgkLBwjw0B1jG/ikKcEQIrHarTJStW/jRRXis0xKIqdLvZA\n rDcl9H8NMluSr6qxOGXsRbY7jVccD91iAqkyhkKzWOXYdY9R26dY5sVoDRV2eK5q\n HyiLRHHBdYY5Tw7g6Vw0DTFx16oHGSHWEi3Wm9M+Xj1Q5YEocbqT1bAJjjTLEuUE\n iw74BwcNaZuLDOdR129MECt2GrprbZ5Qi3m0relurj6YgKTDymkDBpZN0aTuEUyG\n imJRFV8fCtpepE1jEIn0BN4qp1RoWzD+tbJF0Oabip4f1ES2u8O9wkisA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm1; bh=x9lzp29s3N0EYfnIntSOQ9rtyQhanFz3neI5Pm03g/4=; b=abVA8H1K\n bVpK5ooSvxWJ306T2V08egNVX8HZMAJg1szAn1hxCBDSX1DnJciz0MqXR4jbT9HK\n iyrQm/cyaoQjWwSzTNFXzyPXpbZy0t+275g174x7Ji3E96VXGhTfLnFY0Jx0nNZC\n fJXPmlpE3eTx8UADLrpLSxa8Xm1qaEzjqA06onS/IJ55ZTOqQ5eshKKRShKG+Ylp\n l0ye3xpJeFkphiHQxY8aX+jnKAvKMxxitB5/FrW7MEcjd/ZY4s47ZL34l/SPkkp/\n ncWjsn7fS2xOe2ggLWvSSMT7zpPQbaegONiIC6LGn6GLRrF/346idB2TW2FVnsov\n 4EuqN9FUVMxqxA=="
        ],
        "X-ME-Sender": "<xms:4qCgXzk9gQrdInXEwhUGTOJL1qor5lTxzVYqGM5-BIJkJqA3yFPCMw>\n <xme:4qCgX21jirwmXuBXpXfWybjXVMPxKPGHcpJ3PVmYI7jofPixwIjfpy9H6qGURPAA_\n jyvDB6CWiS16ikCDg>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtvddgudejucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg\n uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf\n hiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl\n ohhnrdhnvght",
        "X-ME-Proxy": "<xmx:4qCgX5qbHMJm31m1m7TNG3LUDr_tesfaYPjsmxczqWFgqshYemAZtw>\n <xmx:4qCgX7kI1pzEffMRtL9p7rZPy9QU_uDqG-p3KkH2f0Mviy30AsNWVg>\n <xmx:4qCgXx2xx8cWw3S7SERVZTGNs7S03khOFwTJbpmBVcxHOH5PHID2FQ>\n <xmx:4qCgX7pijHaEB3vsIPMt1THF_ABRMs9i4sVqBvBSf25QoMcAb3xslw>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, david.marchand@redhat.com,\n bruce.richardson@intel.com, olivier.matz@6wind.com,\n andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com, viacheslavo@nvidia.com,\n Reshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue,  3 Nov 2020 01:13:54 +0100",
        "Message-Id": "<20201103001407.2931963-4-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201103001407.2931963-1-thomas@monjalon.net>",
        "References": "<20201029092751.3837177-1-thomas@monjalon.net>\n <20201103001407.2931963-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 03/16] latency: switch Rx timestamp to dynamic\n\tmbuf field",
        "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 mbuf timestamp is moved to a dynamic field\nin order to allow removal of the deprecated static field.\nThe related mbuf flag is also replaced with the dynamic one.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n lib/librte_latencystats/rte_latencystats.c | 30 ++++++++++++++++++----\n 1 file changed, 25 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c\nindex ba2fff3bcb..ab8db7a139 100644\n--- a/lib/librte_latencystats/rte_latencystats.c\n+++ b/lib/librte_latencystats/rte_latencystats.c\n@@ -9,6 +9,7 @@\n \n #include <rte_string_fns.h>\n #include <rte_mbuf.h>\n+#include <rte_mbuf_dyn.h>\n #include <rte_log.h>\n #include <rte_cycles.h>\n #include <rte_ethdev.h>\n@@ -31,6 +32,16 @@ latencystat_cycles_per_ns(void)\n /* Macros for printing using RTE_LOG */\n #define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1\n \n+static uint64_t timestamp_dynflag;\n+static int timestamp_dynfield_offset = -1;\n+\n+static inline rte_mbuf_timestamp_t *\n+timestamp_dynfield(struct rte_mbuf *mbuf)\n+{\n+\treturn RTE_MBUF_DYNFIELD(mbuf,\n+\t\t\ttimestamp_dynfield_offset, rte_mbuf_timestamp_t *);\n+}\n+\n static const char *MZ_RTE_LATENCY_STATS = \"rte_latencystats\";\n static int latency_stats_index;\n static uint64_t samp_intvl;\n@@ -128,10 +139,10 @@ add_time_stamps(uint16_t pid __rte_unused,\n \t\tdiff_tsc = now - prev_tsc;\n \t\ttimer_tsc += diff_tsc;\n \n-\t\tif ((pkts[i]->ol_flags & PKT_RX_TIMESTAMP) == 0\n+\t\tif ((pkts[i]->ol_flags & timestamp_dynflag) == 0\n \t\t\t\t&& (timer_tsc >= samp_intvl)) {\n-\t\t\tpkts[i]->timestamp = now;\n-\t\t\tpkts[i]->ol_flags |= PKT_RX_TIMESTAMP;\n+\t\t\t*timestamp_dynfield(pkts[i]) = now;\n+\t\t\tpkts[i]->ol_flags |= timestamp_dynflag;\n \t\t\ttimer_tsc = 0;\n \t\t}\n \t\tprev_tsc = now;\n@@ -161,8 +172,8 @@ calc_latency(uint16_t pid __rte_unused,\n \n \tnow = rte_rdtsc();\n \tfor (i = 0; i < nb_pkts; i++) {\n-\t\tif (pkts[i]->ol_flags & PKT_RX_TIMESTAMP)\n-\t\t\tlatency[cnt++] = now - pkts[i]->timestamp;\n+\t\tif (pkts[i]->ol_flags & timestamp_dynflag)\n+\t\t\tlatency[cnt++] = now - *timestamp_dynfield(pkts[i]);\n \t}\n \n \trte_spinlock_lock(&glob_stats->lock);\n@@ -241,6 +252,15 @@ rte_latencystats_init(uint64_t app_samp_intvl,\n \t\treturn -1;\n \t}\n \n+\t/* Register mbuf field and flag for Rx timestamp */\n+\tret = rte_mbuf_dyn_rx_timestamp_register(&timestamp_dynfield_offset,\n+\t\t\t&timestamp_dynflag);\n+\tif (ret != 0) {\n+\t\tRTE_LOG(ERR, LATENCY_STATS,\n+\t\t\t\"Cannot register mbuf field/flag for timestamp\\n\");\n+\t\treturn -rte_errno;\n+\t}\n+\n \t/** Register Rx/Tx callbacks */\n \tRTE_ETH_FOREACH_DEV(pid) {\n \t\tstruct rte_eth_dev_info dev_info;\n",
    "prefixes": [
        "v3",
        "03/16"
    ]
}