get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83600,
    "url": "https://patches.dpdk.org/api/patches/83600/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103140931.488700-10-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-10-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103140931.488700-10-thomas@monjalon.net",
    "date": "2020-11-03T14:09:24",
    "name": "[v5,09/16] net/octeontx2: switch Rx timestamp to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "42b0a2957eab32dcff1c40f30d49cb66090bdae5",
    "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-10-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/83600/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/83600/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 B7819A0521;\n\tTue,  3 Nov 2020 15:13:15 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8913ACB96;\n\tTue,  3 Nov 2020 15:10:05 +0100 (CET)",
            "from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com\n [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id D7150CB63\n for <dev@dpdk.org>; Tue,  3 Nov 2020 15:10:01 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 7085F8E1;\n Tue,  3 Nov 2020 09:10:00 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Tue, 03 Nov 2020 09:10:01 -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 D5098328005E;\n Tue,  3 Nov 2020 09:09:58 -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=qxthh7yKE5dT/\n WgzMl4VjgNwUYpwMNsALmCVM9v2b0c=; b=Ux9bet9s5bPJ1KFnKLy3BQWS9orFN\n U3/L+ROLr9Ws4QYp8rLA7IH+Umc4pTpO2aYboasBpKIGM5DkFbzp7gza/camL8GH\n SHRVj6uL4sjrvIt6CbGGBMQadNuQR/nHKRrk3jzpupc/fzzVRBk83Z4fivbejtxX\n bVnnsQUPy2afKrZ8Ir4yVeW16PTs7JOphogs5PsHoNlVzscqqtWg/ZZZByacTImM\n GEHv7kF1X2SUqag86GiiyZvt6nG82Kx8NSFjRokAdu9KLhCUCMgVJv78gpB2RWQX\n eofWPeNRj6KpDfthz+dY6sAuy8t20+6o+tMiqPESRMA3IOcT7r3giW1JQ==",
            "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=qxthh7yKE5dT/WgzMl4VjgNwUYpwMNsALmCVM9v2b0c=; b=Z4cmmgD3\n oCM4clqp/hITsu9jXv+NbiaiNH4jKkHyV+S59ymd7I5XTNn3qNkCj8Zr2cmlpXO1\n N99ydhIvwgtw9H/kx77Spummvc21ly5hwbwkNeKYsGtsD7QRoo3UTr4vFCFm9TPD\n 5tQAELsaKQcm8ysKT6UuU5EXMMIAUNUs6Jsec4fthtaKNUUn9WynDNI2uAwad/9m\n DbW+9+fsVKM0k+bqq7ekzuFqGNrPGSf7FzuRe9xOxGpf1Q6+i9cbXibavKV6b4gL\n J+MFJfa8+jJoDMnfn722JMEHrsNVpQgg7GMt7fdUFNVrya5SwTiUs0vSiXFOzo7y\n mYb7Aw0ovLWAUg=="
        ],
        "X-ME-Sender": "<xms:t2ShXwBxTBAjKVjUyh1vBhxywZ5Hdh0DDi-Zw4bNmsbhewleFdm_Qg>\n <xme:t2ShXyg5CBL1ScWXkgQBcoqPvlHyN2K3ct7g2gXXXNrphjgzhYoBGmNIkIKb1JhqX\n CFdLqLq9xKxnK2jyg>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgheekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg\n uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf\n hiiigvpeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl\n ohhnrdhnvght",
        "X-ME-Proxy": "<xmx:t2ShXzmeGmm9MyKOsEtUWDw0k2PselWe1Q9654JpYc7dlpATzaxRnA>\n <xmx:t2ShX2wA7DmfjxAOkPXE4W8rj_3q-3hbV8e1uD69Mx6eiI0h_W-BHQ>\n <xmx:t2ShX1T6sPnjDT6RQCE8q8I5o3_HosJ7gBTHQpwRcon5o2R_kfndGQ>\n <xmx:uGShX2RdEn0XA6Iqe_azLIkTTBl6Ti9VJBoH_3Ef4P7fT_4r0rbOCg>",
        "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 Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Kiran Kumar K <kirankumark@marvell.com>",
        "Date": "Tue,  3 Nov 2020 15:09:24 +0100",
        "Message-Id": "<20201103140931.488700-10-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 09/16] net/octeontx2: 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\nThe registration of field and flag is done in both\notx2_nix_dev_start() and otx2_nix_timesync_enable().\n\nThe dynamic offset and flag are stored in struct otx2_timesync_info\nto favor cache locality.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nAcked-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/octeontx2/otx2_ethdev.c | 10 ++++++++++\n drivers/net/octeontx2/otx2_ptp.c    |  8 ++++++++\n drivers/net/octeontx2/otx2_rx.h     | 19 ++++++++++++++++---\n 3 files changed, 34 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c\nindex cfb733a4b5..6cebbe677d 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.c\n+++ b/drivers/net/octeontx2/otx2_ethdev.c\n@@ -2225,6 +2225,16 @@ otx2_nix_dev_start(struct rte_eth_dev *eth_dev)\n \tif (otx2_ethdev_is_ptp_en(dev) && otx2_dev_is_vf(dev))\n \t\totx2_nix_ptp_enable_vf(eth_dev);\n \n+\tif (dev->rx_offload_flags & NIX_RX_OFFLOAD_TSTAMP_F) {\n+\t\trc = rte_mbuf_dyn_rx_timestamp_register(\n+\t\t\t\t&dev->tstamp.tstamp_dynfield_offset,\n+\t\t\t\t&dev->tstamp.rx_tstamp_dynflag);\n+\t\tif (rc != 0) {\n+\t\t\totx2_err(\"Failed to register Rx timestamp field/flag\");\n+\t\t\treturn -rte_errno;\n+\t\t}\n+\t}\n+\n \trc = npc_rx_enable(dev);\n \tif (rc) {\n \t\totx2_err(\"Failed to enable NPC rx %d\", rc);\ndiff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c\nindex ae5a2b7cd1..b8ef4c181d 100644\n--- a/drivers/net/octeontx2/otx2_ptp.c\n+++ b/drivers/net/octeontx2/otx2_ptp.c\n@@ -239,6 +239,14 @@ otx2_nix_timesync_enable(struct rte_eth_dev *eth_dev)\n \tdev->tstamp.tx_tstamp_iova = ts->iova;\n \tdev->tstamp.tx_tstamp = ts->addr;\n \n+\trc = rte_mbuf_dyn_rx_timestamp_register(\n+\t\t\t&dev->tstamp.tstamp_dynfield_offset,\n+\t\t\t&dev->tstamp.rx_tstamp_dynflag);\n+\tif (rc != 0) {\n+\t\totx2_err(\"Failed to register Rx timestamp field/flag\");\n+\t\treturn -rte_errno;\n+\t}\n+\n \t/* System time should be already on by default */\n \tnix_start_timecounters(eth_dev);\n \ndiff --git a/drivers/net/octeontx2/otx2_rx.h b/drivers/net/octeontx2/otx2_rx.h\nindex 61a5c436dd..926f614a4e 100644\n--- a/drivers/net/octeontx2/otx2_rx.h\n+++ b/drivers/net/octeontx2/otx2_rx.h\n@@ -49,6 +49,8 @@ struct otx2_timesync_info {\n \tuint64_t\trx_tstamp;\n \trte_iova_t\ttx_tstamp_iova;\n \tuint64_t\t*tx_tstamp;\n+\tuint64_t\trx_tstamp_dynflag;\n+\tint\t\ttstamp_dynfield_offset;\n \tuint8_t\t\ttx_ready;\n \tuint8_t\t\trx_ready;\n } __rte_cache_aligned;\n@@ -63,6 +65,14 @@ union mbuf_initializer {\n \tuint64_t value;\n };\n \n+static inline rte_mbuf_timestamp_t *\n+otx2_timestamp_dynfield(struct rte_mbuf *mbuf,\n+\t\tstruct otx2_timesync_info *info)\n+{\n+\treturn RTE_MBUF_DYNFIELD(mbuf,\n+\t\tinfo->tstamp_dynfield_offset, rte_mbuf_timestamp_t *);\n+}\n+\n static __rte_always_inline void\n otx2_nix_mbuf_to_tstamp(struct rte_mbuf *mbuf,\n \t\t\tstruct otx2_timesync_info *tstamp, const uint16_t flag,\n@@ -77,15 +87,18 @@ otx2_nix_mbuf_to_tstamp(struct rte_mbuf *mbuf,\n \t\t/* Reading the rx timestamp inserted by CGX, viz at\n \t\t * starting of the packet data.\n \t\t */\n-\t\tmbuf->timestamp = rte_be_to_cpu_64(*tstamp_ptr);\n+\t\t*otx2_timestamp_dynfield(mbuf, tstamp) =\n+\t\t\t\trte_be_to_cpu_64(*tstamp_ptr);\n \t\t/* PKT_RX_IEEE1588_TMST flag needs to be set only in case\n \t\t * PTP packets are received.\n \t\t */\n \t\tif (mbuf->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC) {\n-\t\t\ttstamp->rx_tstamp = mbuf->timestamp;\n+\t\t\ttstamp->rx_tstamp =\n+\t\t\t\t\t*otx2_timestamp_dynfield(mbuf, tstamp);\n \t\t\ttstamp->rx_ready = 1;\n \t\t\tmbuf->ol_flags |= PKT_RX_IEEE1588_PTP |\n-\t\t\t\tPKT_RX_IEEE1588_TMST | PKT_RX_TIMESTAMP;\n+\t\t\t\tPKT_RX_IEEE1588_TMST |\n+\t\t\t\ttstamp->rx_tstamp_dynflag;\n \t\t}\n \t}\n }\n",
    "prefixes": [
        "v5",
        "09/16"
    ]
}