get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83462,
    "url": "https://patches.dpdk.org/api/patches/83462/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103001407.2931963-12-thomas@monjalon.net/",
    "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": "<20201103001407.2931963-12-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103001407.2931963-12-thomas@monjalon.net",
    "date": "2020-11-03T00:14:02",
    "name": "[v3,11/16] app/testpmd: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1c1bd2fc75a85eef568fdfa919d456cd15cfb70f",
    "submitter": {
        "id": 685,
        "url": "https://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201103001407.2931963-12-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13585,
            "url": "https://patches.dpdk.org/api/series/13585/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13585",
            "date": "2020-11-03T00:13:51",
            "name": "remove mbuf timestamp",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/13585/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83462/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/83462/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 6F574A04E7;\n\tTue,  3 Nov 2020 01:18:06 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E3343BE45;\n\tTue,  3 Nov 2020 01:14:50 +0100 (CET)",
            "from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com\n [64.147.123.17]) by dpdk.org (Postfix) with ESMTP id 15FBABE41\n for <dev@dpdk.org>; Tue,  3 Nov 2020 01:14:49 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailnew.west.internal (Postfix) with ESMTP id A2740B72;\n Mon,  2 Nov 2020 19:14:46 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Mon, 02 Nov 2020 19:14:47 -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 032C43064674;\n Mon,  2 Nov 2020 19:14:44 -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=Ov0I/SIS+DHYz\n 5Y9S4XZq7X4a/eTgLt/knF0/zSbz0E=; b=HWRCIWX6nyIuvLi0wcwPl90J0OvSJ\n 5+2KpZtVgxB5g83KhXifyRb/ywbxrHC0JKc/KYXJgfNDDk3CVoqHPQJalB8Vjc4w\n uI+/AVCj65lC5uTwFy1B71p4KblhcPX8d19wnie5bVl/pr7DpN1hWoclxJgKrL2e\n wSEPKlQ10G6HaSGhrFn93+2nM3e4ryczflwId3v9XG92PR8wVKHLEaW6DXAwCyd5\n bbvcf1JS8fY3rIQWmNOHzmJo0nfVvO6BYMwbTezGt4QrBEfSSeJj5yCnafqVFUWr\n pltEhCFq8Apqhxoq/eaMVF7pnt8SlFWUK+RssamAgpaNdXM4eZqkDG04g==",
            "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=Ov0I/SIS+DHYz5Y9S4XZq7X4a/eTgLt/knF0/zSbz0E=; b=AAfPFPko\n 93zqoVaeCuq3NwLM39IcsmaSsulMDZ12FwPjDI+PLMdlrQpL7hFdHz0au9hYafw5\n oUUShdjrZL/Oa30UzW04UYTWlajKNpqfUugKaoYWjh3blqDZfwQYltauuEDBLSsI\n QgJdVBdgP6rpBaScdcu7mUFnOiU92biBrxnyM3Wvk/Y2Eh3DDfNLmXj6zm3uVtKe\n LsjftmXuBt9VEzfNUv9DgDFNmuVCZj7WUpVXgn4QOY4bXeZU+dafpigaLlELfNE/\n NqsHba8JvcQdf67LW+FvGxNmgbIkNNFINAUMUMUkB2wjD7GNzwqP2UB6xMd2+hQe\n 7V6rJ/4LoRi51Q=="
        ],
        "X-ME-Sender": "<xms:9qCgX0IdpT1AZfuNDcVQGwrRY6LR-jL83abCqEyotLq1TZ9oWGdk8w>\n <xme:9qCgX0LdZBTZE2xcuE89Xwnhj__x0yL7hHGLrIFBTILzBhCuVt6kROjRfcoTOcjAD\n P8CfRqGfAVtsuvzMw>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtvddgudejucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhephefgjeeggfeuvefgvedvkeegffeftdekheegffejieegfeeuffdu\n fffhleffffdunecuffhomhgrihhnpehfughirhdrihgunecukfhppeejjedrudefgedrvd\n dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr\n ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght",
        "X-ME-Proxy": "<xmx:9qCgX0vZ83na0S0O0xlDqQyiwJUwAByA2EMyjU7CHME8NyDReHSVdA>\n <xmx:9qCgXxZTFKKGF0tct4TpA2lVIwKT7E3uzixGcTJBW6bUd4hsSHTfZw>\n <xmx:9qCgX7bo2C0klKrZsRBsGvIzHm9vrBowMdE0RHZ-mmPHE1gqwjHlEw>\n <xmx:9qCgX5OqR6zQnRB-GL3Xy4Ls78ev9oFdRif1HFfAz46hazQr-o4gKN2guHg>",
        "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 Wenzhuo Lu <wenzhuo.lu@intel.com>, Beilei Xing <beilei.xing@intel.com>,\n Bernard Iremonger <bernard.iremonger@intel.com>",
        "Date": "Tue,  3 Nov 2020 01:14:02 +0100",
        "Message-Id": "<20201103001407.2931963-12-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 11/16] app/testpmd: switch Rx timestamp to\n\tdynamic mbuf 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.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n app/test-pmd/util.c | 39 +++++++++++++++++++++++++++++++++++++--\n 1 file changed, 37 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c\nindex 781a813759..eebb5166ad 100644\n--- a/app/test-pmd/util.c\n+++ b/app/test-pmd/util.c\n@@ -5,6 +5,7 @@\n \n #include <stdio.h>\n \n+#include <rte_bitops.h>\n #include <rte_net.h>\n #include <rte_mbuf.h>\n #include <rte_ether.h>\n@@ -22,6 +23,40 @@ print_ether_addr(const char *what, const struct rte_ether_addr *eth_addr)\n \tprintf(\"%s%s\", what, buf);\n }\n \n+static inline bool\n+is_timestamp_enabled(const struct rte_mbuf *mbuf)\n+{\n+\tstatic uint64_t timestamp_rx_dynflag;\n+\n+\tint timestamp_rx_dynflag_offset;\n+\n+\tif (timestamp_rx_dynflag == 0) {\n+\t\ttimestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup(\n+\t\t\t\tRTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL);\n+\t\tif (timestamp_rx_dynflag_offset < 0)\n+\t\t\treturn false;\n+\t\ttimestamp_rx_dynflag = RTE_BIT64(timestamp_rx_dynflag_offset);\n+\t}\n+\n+\treturn (mbuf->ol_flags & timestamp_rx_dynflag) != 0;\n+}\n+\n+static inline rte_mbuf_timestamp_t\n+get_timestamp(const struct rte_mbuf *mbuf)\n+{\n+\tstatic int timestamp_dynfield_offset = -1;\n+\n+\tif (timestamp_dynfield_offset < 0) {\n+\t\ttimestamp_dynfield_offset = rte_mbuf_dynfield_lookup(\n+\t\t\t\tRTE_MBUF_DYNFIELD_TIMESTAMP_NAME, NULL);\n+\t\tif (timestamp_dynfield_offset < 0)\n+\t\t\treturn 0;\n+\t}\n+\n+\treturn *RTE_MBUF_DYNFIELD(mbuf,\n+\t\t\ttimestamp_dynfield_offset, rte_mbuf_timestamp_t *);\n+}\n+\n static inline void\n dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],\n \t      uint16_t nb_pkts, int is_rx)\n@@ -107,8 +142,8 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],\n \t\t\t\tprintf(\"hash=0x%x ID=0x%x \",\n \t\t\t\t       mb->hash.fdir.hash, mb->hash.fdir.id);\n \t\t}\n-\t\tif (ol_flags & PKT_RX_TIMESTAMP)\n-\t\t\tprintf(\" - timestamp %\"PRIu64\" \", mb->timestamp);\n+\t\tif (is_timestamp_enabled(mb))\n+\t\t\tprintf(\" - timestamp %\"PRIu64\" \", get_timestamp(mb));\n \t\tif (ol_flags & PKT_RX_QINQ)\n \t\t\tprintf(\" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x\",\n \t\t\t       mb->vlan_tci, mb->vlan_tci_outer);\n",
    "prefixes": [
        "v3",
        "11/16"
    ]
}