get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83607,
    "url": "https://patches.dpdk.org/api/patches/83607/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201103140931.488700-17-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-17-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201103140931.488700-17-thomas@monjalon.net",
    "date": "2020-11-03T14:09:31",
    "name": "[v5,16/16] ethdev: include mbuf registration in Tx timestamp API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "26339f7c54263d038c5b00cdbf07b6af5e86d230",
    "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-17-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/83607/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/83607/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 D4C7AA0521;\n\tTue,  3 Nov 2020 15:15:54 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5BDC0CB76;\n\tTue,  3 Nov 2020 15:10:20 +0100 (CET)",
            "from wnew1-smtp.messagingengine.com (wnew1-smtp.messagingengine.com\n [64.147.123.26]) by dpdk.org (Postfix) with ESMTP id 34C02CCC7\n for <dev@dpdk.org>; Tue,  3 Nov 2020 15:10:17 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailnew.west.internal (Postfix) with ESMTP id 963DED3C;\n Tue,  3 Nov 2020 09:10:14 -0500 (EST)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Tue, 03 Nov 2020 09:10:15 -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 B93EC3280064;\n Tue,  3 Nov 2020 09:10:12 -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=6nZgyWo3Wfrg0\n 9HGNGMHTF6N/bcByo0J/UuEgIYK2Gc=; b=aY9N9TtEsGVffCAQxHhqs6cMfl5HA\n ZXc1NES+BaLL9sGkmR16jdSiS5u53pM4FbQa+hbfSKHnGEosgY/gelbZP6viYMnN\n Ul3R9sdMLqcZItBQAjeCMElM5vfegYmyXl3IdyXl3lzWFdzUCQkVIUOAXQ5/H6uc\n ptm30QAY0Akkq1QS5y0fNmEW7jbIwU9Ow5wEqRXtoWqLzzklPs831nqqr+7lI+V4\n NjqlbJtVPZVTautbIs7v2i1lt2xLSdVgiasY84mWDkjyoWzBMc+sKraC+giOjRNL\n JMT0wsbJgWmb8rkbgSkNBfTqRSaV75LETTp1LSWG4untN2m00Hl3RMKxQ==",
            "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=6nZgyWo3Wfrg09HGNGMHTF6N/bcByo0J/UuEgIYK2Gc=; b=h8FE4hLI\n gWJbzfhapmqkQb1LGJSV2D1OmcriPyLyZAqAL9q3WQwPR+vpVa5pyJnPjvg0/My2\n fKnJoHMgtrZnjtr4fyc8+DihhK6IcTsMrzHlPAYOD7Wyaytzg/r1lt0EjLfcCy0A\n TtJnsuyBAD4MRth/2cV7oPDeTE7jf1R6JnwGfA+dMiYqD3XMDufpz6zsOJMoXAxO\n 7XQb8mkpn2W/igJmx1xEq9zcmDBK+7PO/6gFQwLUpwktPHor50YLmVt7gn710/Iy\n lhfjvvCDzWYNcPCLZKWB7aChacH4DwGEQRgGJATyYcgydhM3I1uJJNEuLihJcdD4\n e6SMdawfSFiV9w=="
        ],
        "X-ME-Sender": "<xms:xmShX0Mlw6Vl06QOHzzueybXkwMT-VCPuNYusgfnne9hDz_86FI9wA>\n <xme:xmShX68rS6MZaMlI3BtuJut8F-K1Rp4GSUvCevKXMFo5y0xRvGV483P7WpcerUYEh\n iOCmb1-JztIg_5ADQ>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgheekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepjefhhffhvedvledtiedttdeigfejgeehvdfghfdvhfegvdehieel\n ieejhedvfeeknecuffhomhgrihhnpehrgihmohguvgdrmhhqnecukfhppeejjedrudefge\n drvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl\n fhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght",
        "X-ME-Proxy": "<xmx:xmShX7Qr9Q5KuewJMd6owkq0YBpEdDnU-6zG7thIdp02ogdJiBcVXg>\n <xmx:xmShX8u_ekot0zw1WauWKUT-fGDzd14uDrsNGDBVti0RSsbgmLwudg>\n <xmx:xmShX8fP-xMsNS4i6UFyxLQ1csBaeOK7s1u_LCfmi4hb7QagEIA00w>\n <xmx:xmShX9XhIWF1hyl5mjNXM4DNXvyN36EHSoVqSrKS5R_-7R8HjI8mUn-BwVA>",
        "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>,\n Matan Azrad <matan@nvidia.com>, Shahaf Shuler <shahafs@nvidia.com>",
        "Date": "Tue,  3 Nov 2020 15:09:31 +0100",
        "Message-Id": "<20201103140931.488700-17-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 16/16] ethdev: include mbuf registration in Tx\n\ttimestamp API",
        "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": "Previously, the Tx timestamp field and flag were registered in testpmd,\nas described in mlx5 guide.\nFor consistency between Rx and Tx timestamps,\nmanaging mbuf registrations inside the driver, as properly documented,\nis a simpler expectation.\n\nThe only driver to support this feature (mlx5) is updated\nas well as the testpmd application.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\nAcked-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n app/test-pmd/config.c          | 38 ----------------------------------\n doc/guides/nics/mlx5.rst       |  5 ++---\n drivers/net/mlx5/mlx5_ethdev.c |  8 ++++++-\n lib/librte_ethdev/rte_ethdev.h |  7 +++++--\n 4 files changed, 14 insertions(+), 44 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 1668ae3238..9a2baf16fe 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -3955,44 +3955,6 @@ show_tx_pkt_times(void)\n void\n set_tx_pkt_times(unsigned int *tx_times)\n {\n-\tuint16_t port_id;\n-\tint offload_found = 0;\n-\tint offset;\n-\tint flag;\n-\n-\tstatic const struct rte_mbuf_dynfield desc_offs = {\n-\t\t.name = RTE_MBUF_DYNFIELD_TIMESTAMP_NAME,\n-\t\t.size = sizeof(uint64_t),\n-\t\t.align = __alignof__(uint64_t),\n-\t};\n-\tstatic const struct rte_mbuf_dynflag desc_flag = {\n-\t\t.name = RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME,\n-\t};\n-\n-\tRTE_ETH_FOREACH_DEV(port_id) {\n-\t\tstruct rte_eth_dev_info dev_info = { 0 };\n-\t\tint ret;\n-\n-\t\tret = rte_eth_dev_info_get(port_id, &dev_info);\n-\t\tif (ret == 0 && dev_info.tx_offload_capa &\n-\t\t\t\tDEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) {\n-\t\t\toffload_found = 1;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\tif (!offload_found) {\n-\t\tprintf(\"No device supporting Tx timestamp scheduling found, \"\n-\t\t       \"dynamic flag and field not registered\\n\");\n-\t\treturn;\n-\t}\n-\toffset = rte_mbuf_dynfield_register(&desc_offs);\n-\tif (offset < 0 && rte_errno != EEXIST)\n-\t\tprintf(\"Dynamic timestamp field registration error: %d\",\n-\t\t       rte_errno);\n-\tflag = rte_mbuf_dynflag_register(&desc_flag);\n-\tif (flag < 0 && rte_errno != EEXIST)\n-\t\tprintf(\"Dynamic timestamp flag registration error: %d\",\n-\t\t       rte_errno);\n \ttx_pkt_times_inter = tx_times[0];\n \ttx_pkt_times_intra = tx_times[1];\n }\ndiff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex afa65a1379..fa8b13dd1b 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -237,9 +237,8 @@ Limitations\n   ``txq_inline_max`` and ``txq_inline_mpw`` devargs keys.\n \n - To provide the packet send scheduling on mbuf timestamps the ``tx_pp``\n-  parameter should be specified, RTE_MBUF_DYNFIELD_TIMESTAMP_NAME and\n-  RTE_MBUF_DYNFLAG_TIMESTAMP_NAME should be registered by application.\n-  When PMD sees the RTE_MBUF_DYNFLAG_TIMESTAMP_NAME set on the packet\n+  parameter should be specified.\n+  When PMD sees the RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME set on the packet\n   being sent it tries to synchronize the time of packet appearing on\n   the wire with the specified packet timestamp. It the specified one\n   is in the past it should be ignored, if one is in the distant future\ndiff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c\nindex 7631f644b2..76ef02664f 100644\n--- a/drivers/net/mlx5/mlx5_ethdev.c\n+++ b/drivers/net/mlx5/mlx5_ethdev.c\n@@ -88,7 +88,13 @@ mlx5_dev_configure(struct rte_eth_dev *dev)\n \n \tif (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)\n \t\tdev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;\n-\n+\tif ((dev->data->dev_conf.txmode.offloads &\n+\t\t\tDEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) &&\n+\t\t\trte_mbuf_dyn_tx_timestamp_register(NULL, NULL) != 0) {\n+\t\tDRV_LOG(ERR, \"port %u cannot register Tx timestamp field/flag\",\n+\t\t\tdev->data->port_id);\n+\t\treturn -rte_errno;\n+\t}\n \tmemcpy(priv->rss_conf.rss_key,\n \t       use_app_rss_key ?\n \t       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 4988054cb2..f689550745 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1413,8 +1413,11 @@ struct rte_eth_conf {\n #define DEV_TX_OFFLOAD_IP_TNL_TSO       0x00080000\n /** Device supports outer UDP checksum */\n #define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  0x00100000\n-\n-/** Device supports send on timestamp */\n+/**\n+ * Device sends on time read from RTE_MBUF_DYNFIELD_TIMESTAMP_NAME\n+ * if RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME is set in ol_flags.\n+ * The mbuf field and flag are registered when the offload is configured.\n+ */\n #define DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP 0x00200000\n \n \n",
    "prefixes": [
        "v5",
        "16/16"
    ]
}