get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73742,
    "url": "http://patchwork.dpdk.org/api/patches/73742/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1594384782-17799-1-git-send-email-viacheslavo@mellanox.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1594384782-17799-1-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594384782-17799-1-git-send-email-viacheslavo@mellanox.com",
    "date": "2020-07-10T12:39:41",
    "name": "[v7,1/2] mbuf: introduce accurate packet Tx scheduling",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "20332f50e8ad038544c2f766a134616ea950500a",
    "submitter": {
        "id": 1102,
        "url": "http://patchwork.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1594384782-17799-1-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 10948,
            "url": "http://patchwork.dpdk.org/api/series/10948/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10948",
            "date": "2020-07-10T12:39:41",
            "name": "[v7,1/2] mbuf: introduce accurate packet Tx scheduling",
            "version": 7,
            "mbox": "http://patchwork.dpdk.org/series/10948/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/73742/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/73742/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 37DB4A052A;\n\tFri, 10 Jul 2020 14:39:49 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DB5ED1DC26;\n\tFri, 10 Jul 2020 14:39:48 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id B63781D9AB\n for <dev@dpdk.org>; Fri, 10 Jul 2020 14:39:47 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@mellanox.com) with SMTP; 10 Jul 2020 15:39:46 +0300",
            "from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx\n [10.210.17.40])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06ACdkFA028228;\n Fri, 10 Jul 2020 15:39:46 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 06ACdkO6017844;\n Fri, 10 Jul 2020 12:39:46 GMT",
            "(from viacheslavo@localhost)\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 06ACditj017841;\n Fri, 10 Jul 2020 12:39:44 GMT"
        ],
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n viacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, olivier.matz@6wind.com,\n arybchenko@solarflare.com, thomas@monjalon.net, ferruh.yigit@intel.com",
        "Date": "Fri, 10 Jul 2020 12:39:41 +0000",
        "Message-Id": "<1594384782-17799-1-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1591771085-24959-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1591771085-24959-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v7 1/2] mbuf: introduce accurate packet Tx\n\tscheduling",
        "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": "There is the requirement on some networks for precise traffic timing\nmanagement. The ability to send (and, generally speaking, receive)\nthe packets at the very precisely specified moment of time provides\nthe opportunity to support the connections with Time Division\nMultiplexing using the contemporary general purpose NIC without involving\nan auxiliary hardware. For example, the supporting of O-RAN Fronthaul\ninterface is one of the promising features for potentially usage of the\nprecise time management for the egress packets.\n\nThe main objective of this patchset is to specify the way how applications\ncan provide the moment of time at what the packet transmission must be\nstarted and to describe in preliminary the supporting this feature\nfrom mlx5 PMD side [1].\n\nThe new dynamic timestamp field is proposed, it provides some timing\ninformation, the units and time references (initial phase) are not\nexplicitly defined but are maintained always the same for a given port.\nSome devices allow to query rte_eth_read_clock() that will return\nthe current device timestamp. The dynamic timestamp flag tells whether\nthe field contains actual timestamp value. For the packets being sent\nthis value can be used by PMD to schedule packet sending.\n\nThe device clock is opaque entity, the units and frequency are\nvendor specific and might depend on hardware capabilities and\nconfigurations. If might (or not) be synchronized with real time\nvia PTP, might (or not) be synchronous with CPU clock (for example\nif NIC and CPU share the same clock source there might be no\nany drift between the NIC and CPU clocks), etc.\n\nAfter PKT_RX_TIMESTAMP flag and fixed timestamp field supposed\ndeprecation and obsoleting, these dynamic flag and field might be\nused to manage the timestamps on receiving datapath as well. Having\nthe dedicated flags for Rx/Tx timestamps allows applications not\nto perform explicit flags reset on forwarding and not to promote\nreceived timestamps to the transmitting datapath by default.\nThe static PKT_RX_TIMESTAMP is considered as candidate to become\nthe dynamic flag and this move should be discussed.\n\nWhen PMD sees the \"rte_dynfield_timestamp\" set on the packet being sent\nit tries to synchronize the time of packet appearing on the wire with\nthe specified packet timestamp. If the specified one is in the past it\nshould be ignored, if one is in the distant future it should be capped\nwith some reasonable value (in range of seconds). These specific cases\n(\"too late\" and \"distant future\") can be optionally reported via\ndevice xstats to assist applications to detect the time-related\nproblems.\n\nThere is no any packet reordering according timestamps is supposed,\nneither within packet burst, nor between packets, it is an entirely\napplication responsibility to generate packets and its timestamps\nin desired order. The timestamps can be put only in the first packet\nin the burst providing the entire burst scheduling.\n\nPMD reports the ability to synchronize packet sending on timestamp\nwith new offload flag:\n\nThis is palliative and might be replaced with new eth_dev API\nabout reporting/managing the supported dynamic flags and its related\nfeatures. This API would break ABI compatibility and can't be introduced\nat the moment, so is postponed to 20.11.\n\nFor testing purposes it is proposed to update testpmd \"txonly\"\nforwarding mode routine. With this update testpmd application generates\nthe packets and sets the dynamic timestamps according to specified time\npattern if it sees the \"rte_dynfield_timestamp\" is registered.\n\nThe new testpmd command is proposed to configure sending pattern:\n\nset tx_times <burst_gap>,<intra_gap>\n\n<intra_gap> - the delay between the packets within the burst\n              specified in the device clock units. The number\n              of packets in the burst is defined by txburst parameter\n\n<burst_gap> - the delay between the bursts in the device clock units\n\nAs the result the bursts of packet will be transmitted with specific\ndelays between the packets within the burst and specific delay between\nthe bursts. The rte_eth_read_clock is supposed to be engaged to get the\ncurrent device clock value and provide the reference for the timestamps.\n\n[1] http://patches.dpdk.org/patch/73714/\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n\n---\n  v1->v4:\n     - dedicated dynamic Tx timestamp flag instead of shared with Rx\n  v4->v5:\n     - elaborated commit message\n     - more words about device clocks added,\n     - note about dedicated Rx/Tx timestamp flags added\n  v5->v6:\n     - release notes are updated\n  v6->v7:\n     - commit message is updated\n     - testpmd checks the supported offloads before registering\n       dynamic timestamp flag/field\n---\n doc/guides/rel_notes/release_20_08.rst |  7 +++++++\n lib/librte_ethdev/rte_ethdev.c         |  1 +\n lib/librte_ethdev/rte_ethdev.h         |  4 ++++\n lib/librte_mbuf/rte_mbuf_dyn.h         | 31 +++++++++++++++++++++++++++++++\n 4 files changed, 43 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst\nindex 988474c..bdea389 100644\n--- a/doc/guides/rel_notes/release_20_08.rst\n+++ b/doc/guides/rel_notes/release_20_08.rst\n@@ -81,6 +81,13 @@ New Features\n   Added the RegEx library which provides an API for offload of regular\n   expressions search operations to hardware or software accelerator devices.\n \n+\n+* **Introduced send packet scheduling on the timestamps.**\n+\n+   Added the new mbuf dynamic field and flag to provide timestamp on what packet\n+   transmitting can be synchronized. The device Tx offload flag is added to\n+   indicate the PMD supports send scheduling.\n+\n * **Updated PCAP driver.**\n \n   Updated PCAP driver with new features and improvements, including:\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 7022bd7..c48ca2a 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -160,6 +160,7 @@ struct rte_eth_xstats_name_off {\n \tRTE_TX_OFFLOAD_BIT2STR(UDP_TNL_TSO),\n \tRTE_TX_OFFLOAD_BIT2STR(IP_TNL_TSO),\n \tRTE_TX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),\n+\tRTE_TX_OFFLOAD_BIT2STR(SEND_ON_TIMESTAMP),\n };\n \n #undef RTE_TX_OFFLOAD_BIT2STR\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 631b146..97313a0 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1178,6 +1178,10 @@ struct rte_eth_conf {\n /** Device supports outer UDP checksum */\n #define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  0x00100000\n \n+/** Device supports send on timestamp */\n+#define DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP 0x00200000\n+\n+\n #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001\n /**< Device supports Rx queue setup after device started*/\n #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002\ndiff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h\nindex 96c3631..8407230 100644\n--- a/lib/librte_mbuf/rte_mbuf_dyn.h\n+++ b/lib/librte_mbuf/rte_mbuf_dyn.h\n@@ -250,4 +250,35 @@ int rte_mbuf_dynflag_lookup(const char *name,\n #define RTE_MBUF_DYNFIELD_METADATA_NAME \"rte_flow_dynfield_metadata\"\n #define RTE_MBUF_DYNFLAG_METADATA_NAME \"rte_flow_dynflag_metadata\"\n \n+/**\n+ * The timestamp dynamic field provides some timing information, the\n+ * units and time references (initial phase) are not explicitly defined\n+ * but are maintained always the same for a given port. Some devices allow\n+ * to query rte_eth_read_clock() that will return the current device\n+ * timestamp. The dynamic Tx timestamp flag tells whether the field contains\n+ * actual timestamp value for the packets being sent, this value can be\n+ * used by PMD to schedule packet sending.\n+ *\n+ * After PKT_RX_TIMESTAMP flag and fixed timestamp field deprecation\n+ * and obsoleting, the dedicated Rx timestamp flag is supposed to be\n+ * introduced and the shared dynamic timestamp field will be used\n+ * to handle the timestamps on receiving datapath as well.\n+ */\n+#define RTE_MBUF_DYNFIELD_TIMESTAMP_NAME \"rte_dynfield_timestamp\"\n+\n+/**\n+ * When PMD sees the RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME flag set on the\n+ * packet being sent it tries to synchronize the time of packet appearing\n+ * on the wire with the specified packet timestamp. If the specified one\n+ * is in the past it should be ignored, if one is in the distant future\n+ * it should be capped with some reasonable value (in range of seconds).\n+ *\n+ * There is no any packet reordering according to timestamps is supposed,\n+ * neither for packet within the burst, nor for the whole bursts, it is\n+ * an entirely application responsibility to generate packets and its\n+ * timestamps in desired order. The timestamps might be put only in\n+ * the first packet in the burst providing the entire burst scheduling.\n+ */\n+#define RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME \"rte_dynflag_tx_timestamp\"\n+\n #endif\n",
    "prefixes": [
        "v7",
        "1/2"
    ]
}