get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83572,
    "url": "https://patches.dpdk.org/api/patches/83572/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103122205.183472-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": "<20201103122205.183472-12-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103122205.183472-12-thomas@monjalon.net",
    "date": "2020-11-03T12:22:00",
    "name": "[v4,11/16] app/testpmd: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8b14757840f59965619caf4d8faea7ebed8324d5",
    "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/20201103122205.183472-12-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13616,
            "url": "https://patches.dpdk.org/api/series/13616/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13616",
            "date": "2020-11-03T12:21:49",
            "name": "remove mbuf timestamp",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/13616/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83572/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/83572/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 A3D88A0521;\n\tTue,  3 Nov 2020 13:26:47 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EEBF4CA1A;\n\tTue,  3 Nov 2020 13:22:45 +0100 (CET)",
            "from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com\n [64.147.123.17]) by dpdk.org (Postfix) with ESMTP id 09B97C9D6\n for <dev@dpdk.org>; Tue,  3 Nov 2020 13:22:43 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailnew.west.internal (Postfix) with ESMTP id 95322BDC;\n Tue,  3 Nov 2020 07:22:40 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Tue, 03 Nov 2020 07:22:41 -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 D7810306467E;\n Tue,  3 Nov 2020 07:22:38 -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=1MVqx3g3AEn1c\n JJ3l65IOOB3xXJLgjolC48wT4VmaAI=; b=jI5HoiG60l25TN76MfFSJGtIs/aB5\n QgyMfPrxiwNOEhRyVJ/cWza27UMo7xC4/ZDb0LE8FdvzIT7rGHzR/M+SmFTRAxmG\n qDbXdTJy8dLL22fA162CYm/XU8jtZB98uF3qXS7wS4JgeBgLpFkgfOIkwhU7EFVY\n s/vzqgsOvho5GQ10FvSwmbMDm8sb2usWj9JOjpSekAliGuf0adVA2occJEbmUyZT\n WYKDARsr+BqMDHllQ4mr2pDVG0zVTTb+j2CEgZwrCMxsRze9g14GzvDPtTHzStl/\n 2d4z3jrb58utRecL6tbk/CccAcdZExjCsUM728rHZx17XXshhGGr6tQWg==",
            "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=1MVqx3g3AEn1cJJ3l65IOOB3xXJLgjolC48wT4VmaAI=; b=JUktdlx1\n +VLyLW2fymVdM9//zFaIOkQUgn/bWu0korCVJxapWjVaB3O2YdJMidbkEymiiVXe\n 5tvNoa15k4gJMHEUPgDkc60+Tkv5DmFjyGIJpKatDZwNB1uWRKeQwQBmwhI5OGi3\n mV17BuIpU2jjLVMRl9ORRVZWI/Dl8kiM6BtCd9hpy8G8/5S1olmYkFX9pRIObMDC\n qXVMpqqpdWXopLNt8ev0YavA5V8tVUCYcAxi8HrPTgnb+1aKV030eWdVCDtijEW+\n hcWW33LjlniehhOmTDNtWfS2JFHQuA4UDHa3Bq1jq6vPoiBNsNWtXWTEHJHUUfQl\n BebGOLh973K91w=="
        ],
        "X-ME-Sender": "<xms:kEuhX_9bBH11Z89KocPw_hwI43SuBwWrSUQbZD6-KNIShbb6NACbBQ>\n <xme:kEuhX7thjF7L11xlZ0W-bUtVholE5rnbYhhDG88X6e_PhCmEXzTsPzfTiNd2qf6yQ\n 81iaTZ4_PScuFl7XA>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgfeelucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhephefgjeeggfeuvefgvedvkeegffeftdekheegffejieegfeeuffdu\n fffhleffffdunecuffhomhgrihhnpehfughirhdrihgunecukfhppeejjedrudefgedrvd\n dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr\n ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght",
        "X-ME-Proxy": "<xmx:kEuhX9D2V5vphUSe9iVwSQX0v4WdALNcseY3-GhW_uMXUF_IY812cg>\n <xmx:kEuhX7di1liBVichw6uFYlrlT9GE73sXVk4gSuy1TYgRKcm0PyhXNg>\n <xmx:kEuhX0M28F7eCkc3d9026aDbSCU-WFXic561zTi1WsaLreL0cEzTeQ>\n <xmx:kEuhX1gzMi_oiA-RWHtXhyNmJ2-UdT2PPnf50aC1gj_gueu3Od6e1qWt57A>",
        "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 13:22:00 +0100",
        "Message-Id": "<20201103122205.183472-12-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201103122205.183472-1-thomas@monjalon.net>",
        "References": "<20201029092751.3837177-1-thomas@monjalon.net>\n <20201103122205.183472-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 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>\nAcked-by: David Marchand <david.marchand@redhat.com>\n---\n app/test-pmd/util.c | 38 ++++++++++++++++++++++++++++++++++++--\n 1 file changed, 36 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c\nindex 781a813759..649bf8f53a 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,39 @@ 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+\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 +141,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": [
        "v4",
        "11/16"
    ]
}