get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83601,
    "url": "https://patches.dpdk.org/api/patches/83601/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103140931.488700-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": "<20201103140931.488700-11-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103140931.488700-11-thomas@monjalon.net",
    "date": "2020-11-03T14:09:25",
    "name": "[v5,10/16] net/pcap: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20201103140931.488700-11-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13621,
            "url": "https://patches.dpdk.org/api/series/13621/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13621",
            "date": "2020-11-03T14:09:15",
            "name": "remove mbuf timestamp",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/13621/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83601/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/83601/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 D748CA0521;\n\tTue,  3 Nov 2020 15:13:36 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F1AE5CBA9;\n\tTue,  3 Nov 2020 15:10:06 +0100 (CET)",
            "from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com\n [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id A5E62CB83\n for <dev@dpdk.org>; Tue,  3 Nov 2020 15:10:03 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 457DAD3C;\n Tue,  3 Nov 2020 09:10:02 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Tue, 03 Nov 2020 09:10:02 -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 A5BBA3280064;\n Tue,  3 Nov 2020 09:10:00 -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=UZ8YlyylaTyGtPj8noAhYe1nt8BRP\n OC4yKH/tNQOWwW5vBmnGDDHSz+xM/WxlYmDc1kas7pm71yb/zxs7izqXx0bX+j/r\n amjVD4YAPODsExM7X8QWr7WvborjN+Aq5VWuyY92XryDX4T/0UN7FhPedfrbarLE\n P6Idy4NIyf6EYazKfSLLg3SxSCVG1o4NxJRgSizSQNnSgfg3I4j2av1qQ1RoVG7s\n c5g6AGVV1T+zGbiA/aOLxo+7ePxbFf88dw8XuDOyv2TxKtEh35yh/Wiru4gAXfbC\n nciB3PgDees5IH8gPUNl5/85Nw26C78EBGLtyhr0bfEOqTFEwf1XY6PJg==",
            "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=B52CCQ3H\n hbg81am5ASW1bLucNAuzTx3HF9It+XBKf5GH58P47bXdV3kAgwvs3hFjxGkNPjJO\n B6QsQS6x0Ml6KcAHT/mNQ01Fx+XkP7SJeOTksJjo/PfShw4/sKeZy33pnoNa5QWW\n JRqqh4i7igdDEISDYLRS+vB8imRvKTy6Jr9kS9ncNTe6op+R3ZuDB1R25PSWHi60\n c1YS/8Se4kHQR1Yl2Z4lTFdUPyEAc7JUh5ypiJiBXRfPxKV2MdShvWDcOVPmHrrQ\n hKto2+dOIz4y1YlJNlRtfYf3W+Xw8Wn97nsuwYOvwenCu2pAAnU19aD8xWarSBqI\n yGh/5k1mo4crRQ=="
        ],
        "X-ME-Sender": "<xms:uWShX2VMPNkaOmR5iDQpPLutdBXIDKbRE0QgqNSwvspzVvMYXCBBHA>\n <xme:uWShXylhYfaoay4qkJWOX0_KKps8BNupWqI0uWT93JTXunKXwkIPLPyWe_0gAcpuo\n n02kNuBPsdzdh2SBw>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgheekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre\n dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes\n mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeelveduleeggeduvdevue\n etueehffegieduveduvdfftdevtedutdehtdeitefgleenucffohhmrghinhepthhsrdht\n vhenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptd\n enucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgv\n th",
        "X-ME-Proxy": "<xmx:uWShX6aM7XtOWP9Eryad1DWa-5op-q-ygW0oQ-LxGFbLTs_j5fhdpA>\n <xmx:uWShX9VybRKwDP-5QFO0wwPJ9lI70hBSQ3B2Uedow0SFborstKzI0A>\n <xmx:uWShXwkHZfyHy4I3I-bHa5GMVblaCl6rQLV2bNsfvlrOu2kbXbm0XQ>\n <xmx:uWShX_t7bySIHhChrf5PTtLHmtZbSI9N-EYSrQ6E-SfyFWEDGJv2zA>",
        "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 15:09:25 +0100",
        "Message-Id": "<20201103140931.488700-11-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201103140931.488700-1-thomas@monjalon.net>",
        "References": "<20201029092751.3837177-1-thomas@monjalon.net>\n <20201103140931.488700-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 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": [
        "v5",
        "10/16"
    ]
}