get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8339,
    "url": "http://patches.dpdk.org/api/patches/8339/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446198204-9852-2-git-send-email-danielx.t.mrzyglod@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": "<1446198204-9852-2-git-send-email-danielx.t.mrzyglod@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446198204-9852-2-git-send-email-danielx.t.mrzyglod@intel.com",
    "date": "2015-10-30T09:43:19",
    "name": "[dpdk-dev,v2,1/6] ethdev: add additional ieee1588 support functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "5430b780f4be472b4a8cd3644e99721dae34ceb5",
    "submitter": {
        "id": 23,
        "url": "http://patches.dpdk.org/api/people/23/?format=api",
        "name": "Daniel Mrzyglod",
        "email": "danielx.t.mrzyglod@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446198204-9852-2-git-send-email-danielx.t.mrzyglod@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/8339/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/8339/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 3D5388E6C;\n\tFri, 30 Oct 2015 10:45:20 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 061F88E6A\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 10:45:18 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP; 30 Oct 2015 02:45:18 -0700",
            "from unknown ([10.217.248.15])\n\tby orsmga002.jf.intel.com with SMTP; 30 Oct 2015 02:45:16 -0700",
            "by  (sSMTP sendmail emulation); Fri, 30 Oct 2015 10:44:33 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,217,1444719600\"; d=\"scan'208\";a=\"838722414\"",
        "From": "Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 30 Oct 2015 10:43:19 +0100",
        "Message-Id": "<1446198204-9852-2-git-send-email-danielx.t.mrzyglod@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1446198204-9852-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "References": "<1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com>\n\t<1446198204-9852-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/6] ethdev: add additional ieee1588 support\n\tfunctions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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 additional functions to support the existing IEEE1588\nfunctionality.\n\n* rte_eth_timesync_settime(), function to set the device clock time.\n* rte_eth_timesync_gettime, function to get the device clock time.\n* rte_eth_timesync_adjust, function to adjust the device clock time.\n\nSigned-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>\n---\n doc/guides/rel_notes/release_2_2.rst   |  3 ++\n lib/librte_ether/rte_ethdev.c          | 36 +++++++++++++++++++\n lib/librte_ether/rte_ethdev.h          | 64 ++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ether_version.map |  9 +++++\n 4 files changed, 112 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst\nindex 89e4d58..b83ef7f 100644\n--- a/doc/guides/rel_notes/release_2_2.rst\n+++ b/doc/guides/rel_notes/release_2_2.rst\n@@ -123,6 +123,9 @@ API Changes\n \n * The devargs union field virtual is renamed to virt for C++ compatibility.\n \n+* Add new functions in ethdev to support IEEE1588: rte_eth_timesync_time_adjust()\n+  rte_eth_timesync_time_get(), rte_eth_timesync_time_set()\n+\n \n ABI Changes\n -----------\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex f593f6e..d7d2714 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3284,6 +3284,42 @@ rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)\n }\n \n int\n+rte_eth_timesync_time_adjust(uint8_t port_id, int64_t delta)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_time_adjust, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_time_adjust)(dev, delta);\n+}\n+\n+int\n+rte_eth_timesync_time_get(uint8_t port_id, struct timespec *timestamp)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_time_get, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_time_get)(dev, timestamp);\n+}\n+\n+int\n+rte_eth_timesync_time_set(uint8_t port_id, struct timespec *timestamp)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tVALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_time_set, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_time_set)(dev, timestamp);\n+}\n+\n+int\n rte_eth_dev_get_reg_length(uint8_t port_id)\n {\n \tstruct rte_eth_dev *dev;\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 8a8c82b..c639064 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1129,6 +1129,17 @@ typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,\n \t\t\t\t\t\tstruct timespec *timestamp);\n /**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */\n \n+typedef int (*eth_timesync_time_adjust)(struct rte_eth_dev *dev, int64_t);\n+/**< @internal Function used to adjust device clock */\n+\n+typedef int (*eth_timesync_time_get)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tstruct timespec *timestamp);\n+/**< @internal Function used to get time from device clock. */\n+\n+typedef int (*eth_timesync_time_set)(struct rte_eth_dev *dev,\n+\t\t\t\t\t\tstruct timespec *timestamp);\n+/**< @internal Function used to get time from device clock */\n+\n typedef int (*eth_get_reg_length_t)(struct rte_eth_dev *dev);\n /**< @internal Retrieve device register count  */\n \n@@ -1312,6 +1323,12 @@ struct eth_dev_ops {\n \teth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;\n \t/** Read the IEEE1588/802.1AS TX timestamp. */\n \teth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;\n+\t/** Adjust the device clock */\n+\teth_timesync_time_adjust timesync_time_adjust;\n+\t/** Get the device clock timespec */\n+\teth_timesync_time_get timesync_time_get;\n+\t/** Set the device clock timespec */\n+\teth_timesync_time_set timesync_time_set;\n };\n \n /**\n@@ -3598,6 +3615,53 @@ extern int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,\n extern int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,\n \t\t\t\t\t      struct timespec *timestamp);\n \n+/**\n+ * Adjust the timesync clock on an Ethernet device..\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param delta\n+ *   The adjustment in nanoseconds\n+ *\n+ * @return\n+ *   - 0: Success.\n+ *   - -ENODEV: The port ID is invalid.\n+ *   - -ENOTSUP: The function is not supported by the Ethernet driver.\n+ */\n+extern int rte_eth_timesync_time_adjust(uint8_t port_id, int64_t delta);\n+\n+/**\n+ * Read the time from the timesync clock on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param time\n+ *   Pointer to the timespec struct.\n+ *\n+ * @return\n+ *   - 0: Success.\n+ */\n+extern int rte_eth_timesync_time_get(uint8_t port_id,\n+\t      struct timespec *time);\n+\n+\n+/**\n+ * Set the time of the timesync clock on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param time\n+ *   Pointer to the timespec struct.\n+ *\n+ * @return\n+ *   - 0: Success.\n+ *   - -EINVAL: No timestamp is available.\n+ *   - -ENODEV: The port ID is invalid.\n+ *   - -ENOTSUP: The function is not supported by the Ethernet driver.\n+ */\n+extern int rte_eth_timesync_time_set(uint8_t port_id,\n+\t      struct timespec *time);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map\nindex 8345a6c..78b46c1 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -127,3 +127,12 @@ DPDK_2.1 {\n \trte_eth_timesync_read_tx_timestamp;\n \n } DPDK_2.0;\n+\n+DPDK_2.2 {\n+\tglobal:\n+\n+\trte_eth_timesync_time_adjust;\n+\trte_eth_timesync_time_get;\n+\trte_eth_timesync_time_set;\n+\n+} DPDK_2.1;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "1/6"
    ]
}