Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94867/?format=api
https://patches.dpdk.org/api/patches/94867/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/cbe01815e2d27c3d9419fe6d9de45dc0aee32425.1624629506.git.anatoly.burakov@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": "<cbe01815e2d27c3d9419fe6d9de45dc0aee32425.1624629506.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/cbe01815e2d27c3d9419fe6d9de45dc0aee32425.1624629506.git.anatoly.burakov@intel.com", "date": "2021-06-25T14:00:05", "name": "[v2,2/7] net/af_xdp: add power monitor support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0fae63664450bfdf49f267604e0378367d7f1e48", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/cbe01815e2d27c3d9419fe6d9de45dc0aee32425.1624629506.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 17490, "url": "https://patches.dpdk.org/api/series/17490/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17490", "date": "2021-06-25T14:00:03", "name": "Enhancements for PMD power management", "version": 2, "mbox": "https://patches.dpdk.org/series/17490/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/94867/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/94867/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 01C59A0547;\n\tFri, 25 Jun 2021 16:00:53 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CD6AD410E2;\n\tFri, 25 Jun 2021 16:00:49 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 0F51F4068A\n for <dev@dpdk.org>; Fri, 25 Jun 2021 16:00:44 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Jun 2021 07:00:18 -0700", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.223.53])\n by FMSMGA003.fm.intel.com with ESMTP; 25 Jun 2021 07:00:17 -0700" ], "IronPort-SDR": [ "\n odFtwwKY2o34LI7s944O7iewAQ+ZO9BROExkg/nuD4GGxU3bvhJ8N1T6vNIOCAu6QC6CcjSXlX\n dclq3tGBm9Fw==", "\n 9mfmf5V6mNtzEwUJF1xzVmSKa4sJhr2GuHHgQG90q25bEc/gSknLp2mvKMOhVJDIKy4twMItsf\n ljSvBYwdCSIg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10026\"; a=\"204664485\"", "E=Sophos;i=\"5.83,298,1616482800\"; d=\"scan'208\";a=\"204664485\"", "E=Sophos;i=\"5.83,298,1616482800\"; d=\"scan'208\";a=\"481858675\"" ], "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org, Ciara Loftus <ciara.loftus@intel.com>,\n Qi Zhang <qi.z.zhang@intel.com>", "Cc": "david.hunt@intel.com", "Date": "Fri, 25 Jun 2021 14:00:05 +0000", "Message-Id": "\n <cbe01815e2d27c3d9419fe6d9de45dc0aee32425.1624629506.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<cover.1624629506.git.anatoly.burakov@intel.com>", "References": "<cover.1622548381.git.anatoly.burakov@intel.com>\n <cover.1624629506.git.anatoly.burakov@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 2/7] net/af_xdp: add power monitor support", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "Implement support for .get_monitor_addr in AF_XDP driver.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n v2:\n - Rewrite using the callback mechanism\n\n drivers/net/af_xdp/rte_eth_af_xdp.c | 33 +++++++++++++++++++++++++++++\n 1 file changed, 33 insertions(+)", "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex eb5660a3dc..8b9c89c3e8 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -37,6 +37,7 @@\n #include <rte_malloc.h>\n #include <rte_ring.h>\n #include <rte_spinlock.h>\n+#include <rte_power_intrinsics.h>\n \n #include \"compat.h\"\n \n@@ -788,6 +789,37 @@ eth_dev_configure(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n+#define CLB_VAL_IDX 0\n+static int\n+eth_monitor_callback(const uint64_t value, const uint64_t opaque[4])\n+{\n+\tconst uint64_t v = opaque[CLB_VAL_IDX];\n+\tconst uint64_t m = (uint32_t)~0;\n+\n+\t/* if the value has changed, abort entering power optimized state */\n+\treturn (value & m) == v ? 0 : -1;\n+}\n+\n+static int\n+eth_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc)\n+{\n+\tstruct pkt_rx_queue *rxq = rx_queue;\n+\tunsigned int *prod = rxq->rx.producer;\n+\tconst uint32_t cur_val = rxq->rx.cached_prod; /* use cached value */\n+\n+\t/* watch for changes in producer ring */\n+\tpmc->addr = (void*)prod;\n+\n+\t/* store current value */\n+\tpmc->opaque[CLB_VAL_IDX] = cur_val;\n+\tpmc->fn = eth_monitor_callback;\n+\n+\t/* AF_XDP producer ring index is 32-bit */\n+\tpmc->size = sizeof(uint32_t);\n+\n+\treturn 0;\n+}\n+\n static int\n eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n@@ -1448,6 +1480,7 @@ static const struct eth_dev_ops ops = {\n \t.link_update = eth_link_update,\n \t.stats_get = eth_stats_get,\n \t.stats_reset = eth_stats_reset,\n+\t.get_monitor_addr = eth_get_monitor_addr\n };\n \n /** parse busy_budget argument */\n", "prefixes": [ "v2", "2/7" ] }{ "id": 94867, "url": "