get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83571,
    "url": "https://patches.dpdk.org/api/patches/83571/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103122205.183472-11-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-11-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103122205.183472-11-thomas@monjalon.net",
    "date": "2020-11-03T12:21:59",
    "name": "[v4,10/16] net/pcap: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c1e1cf651ee17c05ec4f8e43739d295e76a93f32",
    "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-11-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/83571/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/83571/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 496E6A0521;\n\tTue,  3 Nov 2020 13:26:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2E5C0CA50;\n\tTue,  3 Nov 2020 13:22:43 +0100 (CET)",
            "from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com\n [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id D296FCA48\n for <dev@dpdk.org>; Tue,  3 Nov 2020 13:22:40 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 8C7A5C57;\n Tue,  3 Nov 2020 07:22:38 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Tue, 03 Nov 2020 07:22:39 -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 28A543064683;\n Tue,  3 Nov 2020 07:22:37 -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=h6Huw/0aDP/Vp\n cVwFE9SFJniYo682AG4QRYD3mdSgXE=; b=WZXddc6PtJFIABd5rfy1FE1/kLN0T\n Jx+r2J8dLBxMMIjXgItxxpAtilTH7pdJOjbmUjZHRJz1adauQpMeUUUvOw6wL/7U\n DQspIuvL94jenRBS6aHYm+fMHefrEap86nF3qa2IuxHIUuQeViLcAqdbxPQYEMXf\n U+OHCr59NOlJZI1cueyNBqb5BhF9ICAbuMKC5/082QOeR+1ROCuw/zs/r39JFb4O\n fUciaPc+HSqHsD/wrZDGSyHiIBDImoPw9VB32RIrzQF/5DAqwn/46G5ihKb2K9/V\n cAQDrlo7QVipxelXbK+E6vgM85A7Aw1KNeby7xTVnmzZj1NFpFrsDcd4A==",
            "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=h6Huw/0aDP/VpcVwFE9SFJniYo682AG4QRYD3mdSgXE=; b=i3dA1Twt\n bo+CfhMgV6EQLLWcvN1dtbozPI974seX0RhbWxqC9bYIoNT+J3lrPIatRTuOWIMD\n 4jwfpYM9psRvoNmhhItKEFz1On1wYr7Y/NtkOfE3LvrXE6qMO4wQ/Kjp3aNcmoEI\n xFrcoG0c9kPsFRLb4y6tM+72xQ3ZeoSWqVEOwNDS90BoD89NVoeOrPIUzwKbveJg\n vZXT7pDK10k2QXnJE6iObRdkBLq9JHIUL0J85O9JknVe7W+FqQBOftcybkeoNCvv\n 6cIOUYA1VrYJbIyj7VitQL07goXdL560R5jMoAj90c2UWxP8/BuPpyURKl0YH+dz\n TE0t2X4KX3dvrQ=="
        ],
        "X-ME-Sender": "<xms:jkuhX7NZ9lTRDRNrvyL-FmVCMVl0zfySbNe16MW3xQBb8xkdIcfj-A>\n <xme:jkuhX18fdbQFSkV-nDhUM5e_NdIH9EUVjPpKnak0X9KN_abU9Beg-S9T5WlvR8MGf\n C75uI8suILypR3Isg>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgfeelucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre\n dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes\n mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeelveduleeggeduvdevue\n etueehffegieduveduvdfftdevtedutdehtdeitefgleenucffohhmrghinhepthhsrdht\n vhenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptd\n enucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgv\n th",
        "X-ME-Proxy": "<xmx:jkuhX6QNAlX9Oq5B3_AgobCV5Rt3DAuqEkREz5tvE1Eon7g8uKnW5w>\n <xmx:jkuhX_uSNBqeALx7ulwb0SCF50uzWUhJgWr_greMvWIw5f0eNZwgUw>\n <xmx:jkuhXzfbF8qTgmGMNrF6CLrM4lx8c9bweFmKXx0aRp3z-lCsyshR3Q>\n <xmx:jkuhX0GD-8NlJaVtCzfsNrymwJfH5smH5GZMoTq7aDMu8RLAmIl5tw>",
        "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",
        "Date": "Tue,  3 Nov 2020 13:21:59 +0100",
        "Message-Id": "<20201103122205.183472-11-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 10/16] net/pcap: 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 drivers/net/pcap/rte_eth_pcap.c | 20 +++++++++++++++++---\n 1 file changed, 17 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 34e82317b1..4e6d49370e 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -51,6 +51,9 @@ static uint64_t start_cycles;\n static uint64_t hz;\n static uint8_t iface_idx;\n \n+static uint64_t timestamp_rx_dynflag;\n+static int timestamp_dynfield_offset = -1;\n+\n struct queue_stat {\n \tvolatile unsigned long pkts;\n \tvolatile unsigned long bytes;\n@@ -265,9 +268,11 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t}\n \n \t\tmbuf->pkt_len = (uint16_t)header.caplen;\n-\t\tmbuf->timestamp = (uint64_t)header.ts.tv_sec * 1000000\n-\t\t\t\t\t\t\t+ header.ts.tv_usec;\n-\t\tmbuf->ol_flags |= PKT_RX_TIMESTAMP;\n+\t\t*RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset,\n+\t\t\trte_mbuf_timestamp_t *) =\n+\t\t\t\t(uint64_t)header.ts.tv_sec * 1000000 +\n+\t\t\t\theader.ts.tv_usec;\n+\t\tmbuf->ol_flags |= timestamp_rx_dynflag;\n \t\tmbuf->port = pcap_q->port_id;\n \t\tbufs[num_rx] = mbuf;\n \t\tnum_rx++;\n@@ -656,6 +661,15 @@ eth_dev_stop(struct rte_eth_dev *dev)\n static int\n eth_dev_configure(struct rte_eth_dev *dev __rte_unused)\n {\n+\tint ret;\n+\n+\tret = rte_mbuf_dyn_rx_timestamp_register(&timestamp_dynfield_offset,\n+\t\t\t&timestamp_rx_dynflag);\n+\tif (ret != 0) {\n+\t\tPMD_LOG(ERR, \"Failed to register Rx timestamp field/flag\");\n+\t\treturn -rte_errno;\n+\t}\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v4",
        "10/16"
    ]
}