Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74791/?format=api
http://patches.dpdk.org/api/patches/74791/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200724202315.19533-3-patrick.keroulas@radio-canada.ca/", "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": "<20200724202315.19533-3-patrick.keroulas@radio-canada.ca>", "list_archive_url": "https://inbox.dpdk.org/dev/20200724202315.19533-3-patrick.keroulas@radio-canada.ca", "date": "2020-07-24T20:23:13", "name": "[[PATCH,v3,2/4] ethdev: add API to query device frequency", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "2756f7d289c1b826e130c9396b71be552ebc62a0", "submitter": { "id": 1776, "url": "http://patches.dpdk.org/api/people/1776/?format=api", "name": "Patrick Keroulas", "email": "patrick.keroulas@radio-canada.ca" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200724202315.19533-3-patrick.keroulas@radio-canada.ca/mbox/", "series": [ { "id": 11294, "url": "http://patches.dpdk.org/api/series/11294/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11294", "date": "2020-07-24T20:23:11", "name": "pdump HW Rx timestamps for mlx5", "version": 3, "mbox": "http://patches.dpdk.org/series/11294/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/74791/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/74791/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 0B842A0526;\n\tFri, 24 Jul 2020 22:23:52 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 512CB1C065;\n\tFri, 24 Jul 2020 22:23:37 +0200 (CEST)", "from mail-qk1-f193.google.com (mail-qk1-f193.google.com\n [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 6090B1C034\n for <dev@dpdk.org>; Fri, 24 Jul 2020 22:23:34 +0200 (CEST)", "by mail-qk1-f193.google.com with SMTP id 11so9881794qkn.2\n for <dev@dpdk.org>; Fri, 24 Jul 2020 13:23:34 -0700 (PDT)", "from localhost.localdomain\n (modemcable246.10-73-45.static.videotron.ca. [45.73.10.246])\n by smtp.gmail.com with ESMTPSA id f7sm5216089qkj.32.2020.07.24.13.23.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 24 Jul 2020 13:23:33 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=radio-canada-ca.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=HJG68ZzOlPr3cJN9Ojy0Owngi2KF0UCwBwFr8GmwT8s=;\n b=RsaJn8KtSvavFKJBZCcy54bc/Ggumj+P3BnYTLdEVhyAkYmRirQx+ND0BUrP7jgg9O\n s2zPC2qaTVAiBs3x6aj5pXJMeJGayziy2AvQaqbPlkSLCvcoGyDyyY0jLHiP7Jb1Mj0z\n scBMghCSrMQZaRV2JnaNsMhSHsnNDKaCRE+YCALbeNaBndRrx6PaJ+ctSk6tqe+ScY+F\n k0O1M5V5vsHHn5u+GKW9m0SHIWBNM9B432oI1WLLblYTq70OOYsRfoIbmN1YJr+TD4tR\n POiiMEQKP9L7P4NYA+tqqO32dAK8y9cAnarW0Y754VL0V7VcH4MsVqR74ncywD0rGFCD\n zorg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=HJG68ZzOlPr3cJN9Ojy0Owngi2KF0UCwBwFr8GmwT8s=;\n b=eOE4m2EPl/S+pGbhxsKQXPfMcDJdcezAk/iovbj+wxqky+78FViH43MZeUIipcXMpy\n 1c6vdlXtUKrKkgj1BIRr3A2HqGNQgWE5h+QD4kKdQmEyV/HnZeDgZcbZjFsQ3Xgx52ut\n b6G5hDRuAYY9LS3RPX/8y1VHxLWq3tc78TG6lVhcHIu1Ht2+G4gOrKKdIDmkNf3+5vnu\n cixqa+fxfxBHpYj3cpcWaVif/YUCpQ7OCoV11feEC6wgYs1CTuI5zIWNdcIjzogTP+te\n uLxeHFRjx4mlkz0Ho6iiniUd7QSccexyG1vCCj2EhUKttWJ5Ux8nfph4yKPnH5eCPcCi\n wNcQ==", "X-Gm-Message-State": "AOAM532xqfIYGI6NZj5gsWeLlotYR1dEVg1Zs3zIqop7JmQ4ai64KJgI\n tUQuoaUuycjIQYh1cnUYF6Ffrcat7UQ=", "X-Google-Smtp-Source": "\n ABdhPJyZ3G8tcpynGUaP5A19vMJsc7XlW16VU6XQFJ6I79OsM7t8Exc0bOHR0tDcpZiRqUhdADbkhg==", "X-Received": "by 2002:a37:de19:: with SMTP id\n h25mr12278494qkj.354.1595622213529;\n Fri, 24 Jul 2020 13:23:33 -0700 (PDT)", "From": "Patrick Keroulas <patrick.keroulas@radio-canada.ca>", "To": "dev@dpdk.org", "Cc": "Patrick Keroulas <patrick.keroulas@radio-canada.ca>", "Date": "Fri, 24 Jul 2020 16:23:13 -0400", "Message-Id": "<20200724202315.19533-3-patrick.keroulas@radio-canada.ca>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200724202315.19533-1-patrick.keroulas@radio-canada.ca>", "References": "<20200724202315.19533-1-patrick.keroulas@radio-canada.ca>", "Subject": "[dpdk-dev] [[PATCH v3 2/4] ethdev: add API to query device frequency", "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": "Signed-off-by: Patrick Keroulas <patrick.keroulas@radio-canada.ca>\n---\n lib/librte_ethdev/rte_ethdev.c | 12 ++++++++++++\n lib/librte_ethdev/rte_ethdev.h | 17 +++++++++++++++++\n lib/librte_ethdev/rte_ethdev_core.h | 5 +++++\n lib/librte_ethdev/rte_ethdev_version.map | 2 ++\n 4 files changed, 36 insertions(+)", "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 7858ad5f11..8e8812782f 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -4882,6 +4882,18 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *clock)\n \treturn eth_err(port_id, (*dev->dev_ops->read_clock)(dev, clock));\n }\n \n+int\n+rte_eth_get_clock_freq(uint16_t port_id, uint64_t *freq)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_clock_freq, -ENOTSUP);\n+\treturn eth_err(port_id, (*dev->dev_ops->get_clock_freq)(dev, freq));\n+}\n+\n int\n rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)\n {\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 57e4a6ca58..d17838e66f 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -4264,6 +4264,23 @@ __rte_experimental\n int\n rte_eth_read_clock(uint16_t port_id, uint64_t *clock);\n \n+/**\n+ * Get the clock frequency of ethernet device, in Hz\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param[out] freq\n+ * Pointer to the device clock frequency.\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+__rte_experimental\n+int\n+rte_eth_get_clock_freq(uint16_t port_id, uint64_t *freq);\n+\n /**\n * Config l2 tunnel ether type of an Ethernet device for filtering specific\n * tunnel packets by ether type.\ndiff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h\nindex 32407dd418..ac64961e6f 100644\n--- a/lib/librte_ethdev/rte_ethdev_core.h\n+++ b/lib/librte_ethdev/rte_ethdev_core.h\n@@ -468,6 +468,10 @@ typedef int (*eth_read_clock)(struct rte_eth_dev *dev,\n \t\t\t\t uint64_t *timestamp);\n /**< @internal Function used to get the current value of the device clock. */\n \n+typedef int (*eth_get_clock_freq)(struct rte_eth_dev *dev,\n+\t\t\t\t uint64_t *freq);\n+/**< @internal Function used to frequency from device clock */\n+\n typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_dev_reg_info *info);\n /**< @internal Retrieve registers */\n@@ -731,6 +735,7 @@ struct eth_dev_ops {\n \teth_timesync_write_time timesync_write_time; /** Set the device clock time. */\n \n \teth_read_clock read_clock;\n+\teth_get_clock_freq get_clock_freq;\n \n \teth_xstats_get_by_id_t xstats_get_by_id;\n \t/**< Get extended device statistic values by ID. */\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex 1212a17d32..ffc00bf94f 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -241,6 +241,8 @@ EXPERIMENTAL {\n \t__rte_ethdev_trace_rx_burst;\n \t__rte_ethdev_trace_tx_burst;\n \trte_flow_get_aged_flows;\n+\n+\trte_eth_get_clock_freq;\n };\n \n INTERNAL {\n", "prefixes": [ "[PATCH", "v3", "2/4" ] }{ "id": 74791, "url": "