get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35299,
    "url": "http://patches.dpdk.org/api/patches/35299/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1519126254-130090-1-git-send-email-nikhil.rao@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1519126254-130090-1-git-send-email-nikhil.rao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1519126254-130090-1-git-send-email-nikhil.rao@intel.com",
    "date": "2018-02-20T11:30:54",
    "name": "[dpdk-dev] eventdev: add timestamping to received packets",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6e0b29f8fe2499348398e8aeedc61f13427fb98e",
    "submitter": {
        "id": 528,
        "url": "http://patches.dpdk.org/api/people/528/?format=api",
        "name": "Rao, Nikhil",
        "email": "nikhil.rao@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1519126254-130090-1-git-send-email-nikhil.rao@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35299/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/35299/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8FC3D2A58;\n\tTue, 20 Feb 2018 12:31:50 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id AEA6F29CF\n\tfor <dev@dpdk.org>; Tue, 20 Feb 2018 12:31:48 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Feb 2018 03:31:47 -0800",
            "from unknown (HELO localhost.localdomain.localdomain)\n\t([10.224.122.193])\n\tby FMSMGA003.fm.intel.com with ESMTP; 20 Feb 2018 03:31:45 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,538,1511856000\"; d=\"scan'208\";a=\"28470359\"",
        "From": "Nikhil Rao <nikhil.rao@intel.com>",
        "To": "jerin.jacob@caviumnetworks.com",
        "Cc": "dev@dpdk.org, gage.eads@intel.com, narender.vangati@intel.com,\n\tabhinandan.gujjar@intel.com, nikhil.rao@intel.com",
        "Date": "Tue, 20 Feb 2018 06:30:54 -0500",
        "Message-Id": "<1519126254-130090-1-git-send-email-nikhil.rao@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] eventdev: add timestamping to received packets",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add timestamp to received packets before enqueuing to\nevent device if the timestamp is not already set. Adding\ntimestamp in the Rx adapter avoids additional latency due\nto the event device.\n\nSigned-off-by: Nikhil Rao <nikhil.rao@intel.com>\n---\n lib/librte_eventdev/rte_event_eth_rx_adapter.h      |  6 +++++-\n lib/librte_eventdev/rte_event_eth_rx_adapter.c      | 12 +++++++++++-\n doc/guides/prog_guide/event_ethernet_rx_adapter.rst |  6 +++++-\n 3 files changed, 21 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h\nindex c20507b..fc9da14 100644\n--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h\n+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h\n@@ -47,7 +47,11 @@\n  *\n  * The adapter uses a EAL service core function for SW based packet transfer\n  * and uses the eventdev PMD functions to configure HW based packet transfer\n- * between the ethernet device and the event device.\n+ * between the ethernet device and the event device. For SW based packet\n+ * transfer, if the mbuf does not have a timestamp set, the adapter adds a\n+ * timestamp to the mbuf using rte_get_tsc_cycles(), this provides a more\n+ * accurate timestamp as compared to if the application were to set the time\n+ * stamp since it avoids event device schedule latency.\n  *\n  * The ethernet Rx event adapter's functions are:\n  *  - rte_event_eth_rx_adapter_create_ext()\ndiff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c\nindex 9aece9f..9cda960 100644\n--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c\n+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c\n@@ -434,11 +434,22 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b)\n \tuint32_t rss_mask;\n \tuint32_t rss;\n \tint do_rss;\n+\tuint64_t ts;\n \n \t/* 0xffff ffff if PKT_RX_RSS_HASH is set, otherwise 0 */\n \trss_mask = ~(((m->ol_flags & PKT_RX_RSS_HASH) != 0) - 1);\n \tdo_rss = !rss_mask && !eth_rx_queue_info->flow_id_mask;\n \n+\tif ((m->ol_flags & PKT_RX_TIMESTAMP) == 0) {\n+\t\tts = rte_get_tsc_cycles();\n+\t\tfor (i = 0; i < num; i++) {\n+\t\t\tm = mbufs[i];\n+\n+\t\t\tm->timestamp = ts;\n+\t\t\tm->ol_flags |= PKT_RX_TIMESTAMP;\n+\t\t}\n+\t}\n+\n \tfor (i = 0; i < num; i++) {\n \t\tm = mbufs[i];\n \t\tstruct rte_event *ev = &events[i];\n@@ -449,7 +460,6 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b)\n \t\t    eth_rx_queue_info->flow_id &\n \t\t\t\teth_rx_queue_info->flow_id_mask;\n \t\tflow_id |= rss & ~eth_rx_queue_info->flow_id_mask;\n-\n \t\tev->flow_id = flow_id;\n \t\tev->op = RTE_EVENT_OP_NEW;\n \t\tev->sched_type = sched_type;\ndiff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\nindex 4ab87a3..319e4f0 100644\n--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst\n@@ -12,7 +12,11 @@ be supported in hardware or require a software thread to receive packets from\n the ethdev port using ethdev poll mode APIs and enqueue these as events to the\n event device using the eventdev API. Both transfer mechanisms may be present on\n the same platform depending on the particular combination of the ethdev and\n-the event device.\n+the event device. For SW based packet transfer, if the mbuf does not have a\n+timestamp set, the adapter adds a timestamp to the mbuf using\n+rte_get_tsc_cycles(), this provides a more accurate timestamp as compared to\n+if the application were to set the timestamp since it avoids event device\n+schedule latency.\n \n The Event Ethernet Rx Adapter library is intended for the application code to\n configure both transfer mechanisms using a common API. A capability API allows\n",
    "prefixes": [
        "dpdk-dev"
    ]
}