get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7373,
    "url": "https://patches.dpdk.org/api/patches/7373/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443799208-9408-2-git-send-email-danielx.t.mrzyglod@intel.com/",
    "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": "<1443799208-9408-2-git-send-email-danielx.t.mrzyglod@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443799208-9408-2-git-send-email-danielx.t.mrzyglod@intel.com",
    "date": "2015-10-02T15:20:06",
    "name": "[dpdk-dev,1/3] ethdev: add additional ieee1588 support functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a325cec0365eeddb2042804cd127a4e9fa022938",
    "submitter": {
        "id": 23,
        "url": "https://patches.dpdk.org/api/people/23/?format=api",
        "name": "Daniel Mrzyglod",
        "email": "danielx.t.mrzyglod@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443799208-9408-2-git-send-email-danielx.t.mrzyglod@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7373/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7373/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 1F67B8E5A;\n\tFri,  2 Oct 2015 17:22:32 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id E53608DB1\n\tfor <dev@dpdk.org>; Fri,  2 Oct 2015 17:22:29 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP; 02 Oct 2015 08:22:29 -0700",
            "from unknown ([10.217.248.93])\n\tby orsmga002.jf.intel.com with SMTP; 02 Oct 2015 08:22:27 -0700",
            "by  (sSMTP sendmail emulation); Fri, 02 Oct 2015 17:21:23 +0200"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,623,1437462000\"; d=\"scan'208\";a=\"818014332\"",
        "From": "Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  2 Oct 2015 17:20:06 +0200",
        "Message-Id": "<1443799208-9408-2-git-send-email-danielx.t.mrzyglod@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "References": "<1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 1/3] 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 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 3 files changed, 109 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex f593f6e..6f26f3a 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3272,6 +3272,42 @@ rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,\n }\n \n int\n+rte_eth_timesync_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_adjust, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_adjust)(dev, delta);\n+}\n+\n+int\n+rte_eth_timesync_gettime(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_gettime, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_gettime)(dev, timestamp);\n+}\n+\n+int\n+rte_eth_timesync_settime(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_settime, -ENOTSUP);\n+\treturn (*dev->dev_ops->timesync_settime)(dev, timestamp);\n+}\n+\n+int\n rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)\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..6fdaacd 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_adjust)(struct rte_eth_dev *dev, int64_t);\n+/**< @internal Function used to adjust device clock */\n+\n+typedef int (*eth_timesync_gettime)(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_settime)(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_adjust timesync_adjust;\n+\t/** Get the device clock timespec */\n+\teth_timesync_gettime timesync_gettime;\n+\t/** Set the device clock timespec */\n+\teth_timesync_settime timesync_settime;\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_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_gettime(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_settime(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..0820af3 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_adjust;\n+\trte_eth_timesync_gettime;\n+\trte_eth_timesync_settime;\n+\n+} DPDK_2.1;\n",
    "prefixes": [
        "dpdk-dev",
        "1/3"
    ]
}