Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8660/?format=api
https://patches.dpdk.org/api/patches/8660/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446631581-4040-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": "<1446631581-4040-2-git-send-email-danielx.t.mrzyglod@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446631581-4040-2-git-send-email-danielx.t.mrzyglod@intel.com", "date": "2015-11-04T10:06:15", "name": "[dpdk-dev,v4,1/7] ethdev: add additional ieee1588 support functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c66e3ecd0f6aab778d6b7a893282e088b8e08f8c", "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/1446631581-4040-2-git-send-email-danielx.t.mrzyglod@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8660/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8660/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 E2D309191;\n\tWed, 4 Nov 2015 11:06:34 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 751388E9A\n\tfor <dev@dpdk.org>; Wed, 4 Nov 2015 11:06:33 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 04 Nov 2015 02:06:33 -0800", "from unknown ([10.217.248.15])\n\tby orsmga001.jf.intel.com with SMTP; 04 Nov 2015 02:06:31 -0800", "by (sSMTP sendmail emulation); Wed, 04 Nov 2015 11:06:30 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,242,1444719600\"; d=\"scan'208\";a=\"811444779\"", "From": "Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 4 Nov 2015 11:06:15 +0100", "Message-Id": "<1446631581-4040-2-git-send-email-danielx.t.mrzyglod@intel.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1446631581-4040-1-git-send-email-danielx.t.mrzyglod@intel.com>", "References": "<1443799208-9408-1-git-send-email-danielx.t.mrzyglod@intel.com>\n\t<1446631581-4040-1-git-send-email-danielx.t.mrzyglod@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 1/7] 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 | 65 +++++++++++++++++++++++++++++++++-\n lib/librte_ether/rte_ether_version.map | 3 ++\n 4 files changed, 106 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst\nindex ca8471b..e39d422 100644\n--- a/doc/guides/rel_notes/release_2_2.rst\n+++ b/doc/guides/rel_notes/release_2_2.rst\n@@ -205,6 +205,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 fcc9e0f..759a731 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3165,6 +3165,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 4f7b64b..f9d282b 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1200,6 +1200,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@@ -1394,6 +1405,12 @@ struct eth_dev_ops {\n \n \t/** Get DCB information */\n \teth_get_dcb_info get_dcb_info;\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@@ -3745,6 +3762,53 @@ 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+/**\n * Copy pci device info to the Ethernet device data.\n *\n * @param eth_dev\n@@ -3757,7 +3821,6 @@ extern int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,\n */\n extern void rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_dev);\n \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 9149aa7..bb9c808 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -135,5 +135,8 @@ DPDK_2.2 {\n \trte_eth_dev_get_dcb_info;\n \trte_eth_rx_queue_info_get;\n \trte_eth_tx_queue_info_get;\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", "v4", "1/7" ] }{ "id": 8660, "url": "