Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75074/?format=api
http://patches.dpdk.org/api/patches/75074/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1596138614-17409-24-git-send-email-timothy.mcdaniel@intel.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": "<1596138614-17409-24-git-send-email-timothy.mcdaniel@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1596138614-17409-24-git-send-email-timothy.mcdaniel@intel.com", "date": "2020-07-30T19:50:10", "name": "[23/27] event/dlb: add eventdev_start", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d406d309032f712c0e3efbebab7ba324dded3555", "submitter": { "id": 826, "url": "http://patches.dpdk.org/api/people/826/?format=api", "name": "Timothy McDaniel", "email": "timothy.mcdaniel@intel.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/1596138614-17409-24-git-send-email-timothy.mcdaniel@intel.com/mbox/", "series": [ { "id": 11425, "url": "http://patches.dpdk.org/api/series/11425/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11425", "date": "2020-07-30T19:49:47", "name": "Add Intel DLM PMD to 20.11", "version": 1, "mbox": "http://patches.dpdk.org/series/11425/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75074/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/75074/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 C7C93A052B;\n\tThu, 30 Jul 2020 21:57:24 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 847391C1CB;\n\tThu, 30 Jul 2020 21:54:03 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 379181C0CD\n for <dev@dpdk.org>; Thu, 30 Jul 2020 21:53:23 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 30 Jul 2020 12:53:22 -0700", "from txasoft-yocto.an.intel.com ([10.123.72.192])\n by orsmga005.jf.intel.com with ESMTP; 30 Jul 2020 12:53:22 -0700" ], "IronPort-SDR": [ "\n oTxS8j2AujjfQue6doTe737KLxWY2GsfpjlxfDIoUFq0R7KCE/C7Bj+I2CPRtfzl2vsdzyTBpq\n QsIspigYuGvw==", "\n PqPCivNfeGLjfmzvrQ+JxkzTWz+E7NHxzO1SJgjXKQtxa597jjX3kJh0uLMVhKCpMFFNnI8uGP\n T0ataMc3mwbA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9698\"; a=\"139672349\"", "E=Sophos;i=\"5.75,415,1589266800\"; d=\"scan'208\";a=\"139672349\"", "E=Sophos;i=\"5.75,415,1589266800\"; d=\"scan'208\";a=\"465378156\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "\"McDaniel, Timothy\" <timothy.mcdaniel@intel.com>", "To": "jerinj@marvell.com", "Cc": "mattias.ronnblom@ericsson.com, dev@dpdk.org, gage.eads@intel.com,\n harry.van.haaren@intel.com,\n \"McDaniel, Timothy\" <timothy.mcdaniel@intel.com>", "Date": "Thu, 30 Jul 2020 14:50:10 -0500", "Message-Id": "<1596138614-17409-24-git-send-email-timothy.mcdaniel@intel.com>", "X-Mailer": "git-send-email 1.7.10", "In-Reply-To": "<1596138614-17409-1-git-send-email-timothy.mcdaniel@intel.com>", "References": "<1593232671-5690-0-git-send-email-timothy.mcdaniel@intel.com>\n <1596138614-17409-1-git-send-email-timothy.mcdaniel@intel.com>", "Subject": "[dpdk-dev] [PATCH 23/27] event/dlb: add eventdev_start", "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": "From: \"McDaniel, Timothy\" <timothy.mcdaniel@intel.com>\n\nChange-Id: I9dcf8cf95c1001e09ab3e44e3fbd2ccbf0ddec72\nSigned-off-by: McDaniel, Timothy <timothy.mcdaniel@intel.com>\n---\n drivers/event/dlb/dlb.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 142 insertions(+)", "diff": "diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c\nindex ed681a3..7a78d59 100644\n--- a/drivers/event/dlb/dlb.c\n+++ b/drivers/event/dlb/dlb.c\n@@ -1163,6 +1163,72 @@ int dlb_string_to_int(int *result, const char *str)\n \t*dev_info = evdev_dlb_default_info;\n }\n \n+static int\n+dlb_eventdev_reapply_configuration(struct rte_eventdev *dev);\n+\n+static int\n+dlb_eventdev_apply_port_links(struct rte_eventdev *dev);\n+\n+static int\n+dlb_eventdev_start(struct rte_eventdev *dev)\n+{\n+\tstruct dlb_eventdev *dlb = dlb_pmd_priv(dev);\n+\tstruct dlb_hw_dev *handle = &dlb->qm_instance;\n+\tstruct dlb_start_domain_args cfg;\n+\tstruct dlb_cmd_response response;\n+\tint ret, i;\n+\n+\trte_spinlock_lock(&dlb->qm_instance.resource_lock);\n+\tif (dlb->run_state != DLB_RUN_STATE_STOPPED) {\n+\t\tDLB_LOG_ERR(\"bad state %d for dev_start\\n\",\n+\t\t\t (int)dlb->run_state);\n+\t\trte_spinlock_unlock(&dlb->qm_instance.resource_lock);\n+\t\treturn -EINVAL;\n+\t}\n+\tdlb->run_state\t= DLB_RUN_STATE_STARTING;\n+\trte_spinlock_unlock(&dlb->qm_instance.resource_lock);\n+\n+\t/* If the device was configured more than once, some event ports and/or\n+\t * queues may need to be reconfigured.\n+\t */\n+\tret = dlb_eventdev_reapply_configuration(dev);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* The DLB PMD delays port links until the device is started. */\n+\tret = dlb_eventdev_apply_port_links(dev);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tcfg.response = (uintptr_t)&response;\n+\n+\tfor (i = 0; i < dlb->num_ports; i++) {\n+\t\tif (!dlb->ev_ports[i].setup_done) {\n+\t\t\tDLB_LOG_ERR(\"dlb: port %d not setup\", i);\n+\t\t\treturn -ESTALE;\n+\t\t}\n+\t}\n+\n+\tfor (i = 0; i < dlb->num_queues; i++) {\n+\t\tif (dlb->ev_queues[i].num_links == 0) {\n+\t\t\tDLB_LOG_ERR(\"dlb: queue %d is not linked\", i);\n+\t\t\treturn -ENOLINK;\n+\t\t}\n+\t}\n+\n+\tret = dlb_iface_sched_domain_start(handle, &cfg);\n+\tif (ret < 0) {\n+\t\tDLB_LOG_ERR(\"dlb: sched_domain_start ret=%d (driver status: %s)\\n\",\n+\t\t\t ret, dlb_error_strings[response.status]);\n+\t\treturn ret;\n+\t}\n+\n+\tdlb->run_state = DLB_RUN_STATE_STARTED;\n+\tDLB_LOG_DBG(\"dlb: sched_domain_start completed OK\\n\");\n+\n+\treturn 0;\n+}\n+\n static inline int\n dlb_check_enqueue_sw_credits(struct dlb_eventdev *dlb,\n \t\t\t struct dlb_eventdev_port *ev_port)\n@@ -2057,6 +2123,40 @@ int dlb_string_to_int(int *result, const char *str)\n }\n \n static int\n+dlb_eventdev_apply_port_links(struct rte_eventdev *dev)\n+{\n+\tstruct dlb_eventdev *dlb = dlb_pmd_priv(dev);\n+\tint i;\n+\n+\t/* Perform requested port->queue links */\n+\tfor (i = 0; i < dlb->num_ports; i++) {\n+\t\tstruct dlb_eventdev_port *ev_port = &dlb->ev_ports[i];\n+\t\tint j;\n+\n+\t\tfor (j = 0; j < DLB_MAX_NUM_QIDS_PER_LDB_CQ; j++) {\n+\t\t\tstruct dlb_eventdev_queue *ev_queue;\n+\t\t\tuint8_t prio, queue_id;\n+\n+\t\t\tif (!ev_port->link[j].valid)\n+\t\t\t\tcontinue;\n+\n+\t\t\tprio = ev_port->link[j].priority;\n+\t\t\tqueue_id = ev_port->link[j].queue_id;\n+\n+\t\t\tif (dlb_validate_port_link(ev_port, queue_id, true, j))\n+\t\t\t\treturn -EINVAL;\n+\n+\t\t\tev_queue = &dlb->ev_queues[queue_id];\n+\n+\t\t\tif (dlb_do_port_link(dev, ev_queue, ev_port, prio))\n+\t\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n dlb_eventdev_port_link(struct rte_eventdev *dev, void *event_port,\n \t\t const uint8_t queues[], const uint8_t priorities[],\n \t\t uint16_t nb_links)\n@@ -2537,6 +2637,47 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)\n }\n \n static int\n+dlb_eventdev_reapply_configuration(struct rte_eventdev *dev)\n+{\n+\tstruct dlb_eventdev *dlb = dlb_pmd_priv(dev);\n+\tint ret, i;\n+\n+\t/* If an event queue or port was previously configured, but hasn't been\n+\t * reconfigured, reapply its original configuration.\n+\t */\n+\tfor (i = 0; i < dlb->num_queues; i++) {\n+\t\tstruct dlb_eventdev_queue *ev_queue;\n+\n+\t\tev_queue = &dlb->ev_queues[i];\n+\n+\t\tif (ev_queue->qm_queue.config_state != DLB_PREV_CONFIGURED)\n+\t\t\tcontinue;\n+\n+\t\tret = dlb_eventdev_queue_setup(dev, i, &ev_queue->conf);\n+\t\tif (ret < 0) {\n+\t\t\tDLB_LOG_ERR(\"dlb: failed to reconfigure queue %d\", i);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\tfor (i = 0; i < dlb->num_ports; i++) {\n+\t\tstruct dlb_eventdev_port *ev_port = &dlb->ev_ports[i];\n+\n+\t\tif (ev_port->qm_port.config_state != DLB_PREV_CONFIGURED)\n+\t\t\tcontinue;\n+\n+\t\tret = dlb_eventdev_port_setup(dev, i, &ev_port->conf);\n+\t\tif (ret < 0) {\n+\t\t\tDLB_LOG_ERR(\"dlb: failed to reconfigure ev_port %d\",\n+\t\t\t\t i);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n dlb_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,\n \t\t\t uint8_t queues[], uint16_t nb_unlinks)\n {\n@@ -2738,6 +2879,7 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)\n \tstatic struct rte_eventdev_ops dlb_eventdev_entry_ops = {\n \t\t.dev_infos_get = dlb_eventdev_info_get,\n \t\t.dev_configure = dlb_eventdev_configure,\n+\t\t.dev_start = dlb_eventdev_start,\n \t\t.queue_def_conf = dlb_eventdev_queue_default_conf_get,\n \t\t.queue_setup = dlb_eventdev_queue_setup,\n \t\t.queue_release = dlb_eventdev_queue_release,\n", "prefixes": [ "23/27" ] }{ "id": 75074, "url": "