Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44831/?format=api
http://patches.dpdk.org/api/patches/44831/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180918124514.10615-4-mattias.ronnblom@ericsson.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": "<20180918124514.10615-4-mattias.ronnblom@ericsson.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180918124514.10615-4-mattias.ronnblom@ericsson.com", "date": "2018-09-18T12:45:07", "name": "[v4,03/10] event/dsw: add DSW port configuration", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "852a6d8f855e3b52a5387b911bbcf9a10cce29ff", "submitter": { "id": 1077, "url": "http://patches.dpdk.org/api/people/1077/?format=api", "name": "Mattias Rönnblom", "email": "mattias.ronnblom@ericsson.com" }, "delegate": { "id": 310, "url": "http://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180918124514.10615-4-mattias.ronnblom@ericsson.com/mbox/", "series": [ { "id": 1368, "url": "http://patches.dpdk.org/api/series/1368/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1368", "date": "2018-09-18T12:45:04", "name": "A Distributed Software Event Device", "version": 4, "mbox": "http://patches.dpdk.org/series/1368/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/44831/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/44831/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 96DC25688;\n\tTue, 18 Sep 2018 14:45:34 +0200 (CEST)", "from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58])\n\tby dpdk.org (Postfix) with ESMTP id 4FEAA4F91\n\tfor <dev@dpdk.org>; Tue, 18 Sep 2018 14:45:30 +0200 (CEST)", "from ESESSMB501.ericsson.se (Unknown_Domain [153.88.183.119])\n\tby sessmg22.ericsson.net (Symantec Mail Security) with SMTP id\n\tB1.EF.12695.963F0AB5; Tue, 18 Sep 2018 14:45:29 +0200 (CEST)", "from ESESBMB501.ericsson.se (153.88.183.168) by\n\tESESSMB501.ericsson.se (153.88.183.162) with Microsoft SMTP Server\n\t(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1466.3; Tue, 18 Sep 2018 14:45:26 +0200", "from selio1a020.lmera.ericsson.se (153.88.183.153) by\n\tsmtp.internal.ericsson.com (153.88.183.184) with Microsoft SMTP\n\tServer id\n\t15.1.1466.3 via Frontend Transport; Tue, 18 Sep 2018 14:45:26 +0200", "from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se\n\t[150.132.109.241])\n\tby selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id\n\tw8ICjQ1W011575; Tue, 18 Sep 2018 14:45:27 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801;\n\tc=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1537274729;\n\th=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=hKlObLwZBaFcFvweKVHhgolE2j13LJvkp7EukNJ1PD8=;\n\tb=CrctfDwJjjZM+38C8lt8y3DCtGfKO0LhlcBXwd4UcJYSh7cG8N4NNWuZlJXP8rHd\n\t7olOazY1yTdJcVq8c6n60RUkcIvKZPyUT7hNO0UMvoshmCiQ0OHkdJTRB8JQgPdq\n\tDvgBAFfob5FvwDsI15dOIRR6MhL7Lm9KXmzi698NJdg=;", "X-AuditID": "c1b4fb3a-75d969c000003197-8d-5ba0f3697854", "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>", "To": "Jerin Jacob <jerin.jacob@caviumnetworks.com>", "CC": "Bruce Richardson <bruce.richardson@intel.com>, <dev@dpdk.org>,\n\t=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>", "Date": "Tue, 18 Sep 2018 14:45:07 +0200", "Message-ID": "<20180918124514.10615-4-mattias.ronnblom@ericsson.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180918124514.10615-1-mattias.ronnblom@ericsson.com>", "References": "<20180918124514.10615-1-mattias.ronnblom@ericsson.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding": "8bit", "X-Brightmail-Tracker": "H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsUyM2J7uW7m5wXRBg96rCxurLK3ePdpO5PF\n\txEkmDsweG070s3r8WrCU1WPxnpdMAcxRXDYpqTmZZalF+nYJXBnHP9xgLTilULHk+Fn2BsYv\n\tUl2MnBwSAiYSz6bNZO9i5OIQEjjKKLFq021WCOcbo8SXs4tYIJyLjBLzrj9kg3AuM0r8P32M\n\tBaSfTcBTYvK7bjBbRMBAYtGZ+8wgRcwCHYwSzVP/gCWEBewl9vZ+YQSxWQRUJfpOPmQHsXkF\n\tnCSafh9kgThEXmL1hgPMIDangLPE56nrmLoYOYC2OUlc3KAMUS4ocXLmE7ByZgFNidbtv9kh\n\tbHmJ5q2zwVqFBLQk7i/5wjyBUWgWkpZZSFpmIWlZwMi8ilG0OLW4ODfdyEgvtSgzubg4P08v\n\tL7VkEyMwuA9u+W21g/Hgc8dDjAIcjEo8vMmvFkQLsSaWFVfmHmKU4GBWEuHlzAEK8aYkVlal\n\tFuXHF5XmpBYfYpTmYFES53VKs4gSEkhPLEnNTk0tSC2CyTJxcEo1MGoFTvo5IU5wb9NEJTe9\n\t3+2nhDtZ5K/9cD/RZ3rtwOoJsUd9VM8oz/wfP6Wo5LvKg7PJ8pem6r9ZtjjAZFJKTH/u5bqT\n\tOo7GZis2bLKZ8maTbPzHOOPTdkW1990mtYULXZTKcLxVlO3MsmKZls33dSsze1bz8lv/K0xe\n\t/uzCqs9TDsa+uZ14cLkSS3FGoqEWc1FxIgDK5WAeagIAAA==", "Subject": "[dpdk-dev] [PATCH v4 03/10] event/dsw: add DSW port configuration", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Allow port setup and release in the DSW event device.\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\n---\n drivers/event/dsw/dsw_evdev.c | 60 +++++++++++++++++++++++++++++++++++\n drivers/event/dsw/dsw_evdev.h | 28 ++++++++++++++++\n 2 files changed, 88 insertions(+)", "diff": "diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c\nindex 1500d2426..91b1a2449 100644\n--- a/drivers/event/dsw/dsw_evdev.c\n+++ b/drivers/event/dsw/dsw_evdev.c\n@@ -9,6 +9,62 @@\n \n #define EVENTDEV_NAME_DSW_PMD event_dsw\n \n+static int\n+dsw_port_setup(struct rte_eventdev *dev, uint8_t port_id,\n+\t const struct rte_event_port_conf *conf)\n+{\n+\tstruct dsw_evdev *dsw = dsw_pmd_priv(dev);\n+\tstruct dsw_port *port;\n+\tstruct rte_event_ring *in_ring;\n+\tchar ring_name[RTE_RING_NAMESIZE];\n+\n+\tport = &dsw->ports[port_id];\n+\n+\t*port = (struct dsw_port) {\n+\t\t.id = port_id,\n+\t\t.dsw = dsw,\n+\t\t.dequeue_depth = conf->dequeue_depth,\n+\t\t.enqueue_depth = conf->enqueue_depth,\n+\t\t.new_event_threshold = conf->new_event_threshold\n+\t};\n+\n+\tsnprintf(ring_name, sizeof(ring_name), \"dsw%d_p%u\", dev->data->dev_id,\n+\t\t port_id);\n+\n+\tin_ring = rte_event_ring_create(ring_name, DSW_IN_RING_SIZE,\n+\t\t\t\t\tdev->data->socket_id,\n+\t\t\t\t\tRING_F_SC_DEQ|RING_F_EXACT_SZ);\n+\n+\tif (in_ring == NULL)\n+\t\treturn -ENOMEM;\n+\n+\tport->in_ring = in_ring;\n+\n+\tdev->data->ports[port_id] = port;\n+\n+\treturn 0;\n+}\n+\n+static void\n+dsw_port_def_conf(struct rte_eventdev *dev __rte_unused,\n+\t\t uint8_t port_id __rte_unused,\n+\t\t struct rte_event_port_conf *port_conf)\n+{\n+\t*port_conf = (struct rte_event_port_conf) {\n+\t\t.new_event_threshold = 1024,\n+\t\t.dequeue_depth = DSW_MAX_PORT_DEQUEUE_DEPTH / 4,\n+\t\t.enqueue_depth = DSW_MAX_PORT_ENQUEUE_DEPTH / 4\n+\t};\n+}\n+\n+static void\n+dsw_port_release(void *p)\n+{\n+\tstruct dsw_port *port = p;\n+\n+\trte_event_ring_free(port->in_ring);\n+}\n+\n static int\n dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,\n \t\tconst struct rte_event_queue_conf *conf)\n@@ -81,12 +137,16 @@ dsw_configure(const struct rte_eventdev *dev)\n \tstruct dsw_evdev *dsw = dsw_pmd_priv(dev);\n \tconst struct rte_event_dev_config *conf = &dev->data->dev_conf;\n \n+\tdsw->num_ports = conf->nb_event_ports;\n \tdsw->num_queues = conf->nb_event_queues;\n \n \treturn 0;\n }\n \n static struct rte_eventdev_ops dsw_evdev_ops = {\n+\t.port_setup = dsw_port_setup,\n+\t.port_def_conf = dsw_port_def_conf,\n+\t.port_release = dsw_port_release,\n \t.queue_setup = dsw_queue_setup,\n \t.queue_def_conf = dsw_queue_def_conf,\n \t.queue_release = dsw_queue_release,\ndiff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h\nindex 5eda8d114..2a4f10421 100644\n--- a/drivers/event/dsw/dsw_evdev.h\n+++ b/drivers/event/dsw/dsw_evdev.h\n@@ -5,6 +5,7 @@\n #ifndef _DSW_EVDEV_H_\n #define _DSW_EVDEV_H_\n \n+#include <rte_event_ring.h>\n #include <rte_eventdev.h>\n \n #define DSW_PMD_NAME RTE_STR(event_dsw)\n@@ -23,6 +24,31 @@\n #define DSW_MAX_FLOWS (1<<(DSW_MAX_FLOWS_BITS))\n #define DSW_MAX_FLOWS_MASK (DSW_MAX_FLOWS-1)\n \n+/* The rings are dimensioned so that all in-flight events can reside\n+ * on any one of the port rings, to avoid the trouble of having to\n+ * care about the case where there's no room on the destination port's\n+ * input ring.\n+ */\n+#define DSW_IN_RING_SIZE (DSW_MAX_EVENTS)\n+\n+struct dsw_port {\n+\tuint16_t id;\n+\n+\t/* Keeping a pointer here to avoid container_of() calls, which\n+\t * are expensive since they are very frequent and will result\n+\t * in an integer multiplication (since the port id is an index\n+\t * into the dsw_evdev port array).\n+\t */\n+\tstruct dsw_evdev *dsw;\n+\n+\tuint16_t dequeue_depth;\n+\tuint16_t enqueue_depth;\n+\n+\tint32_t new_event_threshold;\n+\n+\tstruct rte_event_ring *in_ring __rte_cache_aligned;\n+} __rte_cache_aligned;\n+\n struct dsw_queue {\n \tuint8_t schedule_type;\n \tuint16_t num_serving_ports;\n@@ -31,6 +57,8 @@ struct dsw_queue {\n struct dsw_evdev {\n \tstruct rte_eventdev_data *data;\n \n+\tstruct dsw_port ports[DSW_MAX_PORTS];\n+\tuint16_t num_ports;\n \tstruct dsw_queue queues[DSW_MAX_QUEUES];\n \tuint8_t num_queues;\n };\n", "prefixes": [ "v4", "03/10" ] }{ "id": 44831, "url": "