Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75073/?format=api
http://patches.dpdk.org/api/patches/75073/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1596138614-17409-23-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-23-git-send-email-timothy.mcdaniel@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1596138614-17409-23-git-send-email-timothy.mcdaniel@intel.com", "date": "2020-07-30T19:50:09", "name": "[22/27] event/dlb: add port_unlink and port_unlinks_in_progress", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "837ac354fd64497444a5af52d56dd649a2df4734", "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-23-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/75073/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/75073/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 960C5A052B;\n\tThu, 30 Jul 2020 21:57:15 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5B9B51C1C8;\n\tThu, 30 Jul 2020 21:54:01 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 7861B1C0C5\n for <dev@dpdk.org>; Thu, 30 Jul 2020 21:53:22 +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:21 -0700" ], "IronPort-SDR": [ "\n enjAlYRf3/AgrpU7wMukRhSizrIqsW1lZrwLyw3JWy3czhI95F5v4BRXcenIDqeP5hk7kPSP5O\n DAN61ONRT1Ww==", "\n RGPP/v6tDicBF2gzfz0r7C2Ok+YW37a1LWT6wXjjUMhmid6JsuEeG5fNbSRJM3Wg9T9wxbFDaz\n bZEm3+Zs34Cw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9698\"; a=\"139672347\"", "E=Sophos;i=\"5.75,415,1589266800\"; d=\"scan'208\";a=\"139672347\"", "E=Sophos;i=\"5.75,415,1589266800\"; d=\"scan'208\";a=\"465378151\"" ], "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:09 -0500", "Message-Id": "<1596138614-17409-23-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 22/27] event/dlb: add port_unlink and\n\tport_unlinks_in_progress", "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: I06d4006786440a0454ce883dba0ce14640dfff92\nSigned-off-by: McDaniel, Timothy <timothy.mcdaniel@intel.com>\n---\n drivers/event/dlb/dlb.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 166 insertions(+)", "diff": "diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c\nindex 0eb0cf5..ed681a3 100644\n--- a/drivers/event/dlb/dlb.c\n+++ b/drivers/event/dlb/dlb.c\n@@ -862,6 +862,30 @@ int dlb_string_to_int(int *result, const char *str)\n \treturn ret;\n }\n \n+static int16_t\n+dlb_hw_unmap_ldb_qid_from_port(struct dlb_hw_dev *handle,\n+\t\t\t uint32_t qm_port_id,\n+\t\t\t uint16_t qm_qid)\n+{\n+\tstruct dlb_unmap_qid_args cfg;\n+\tstruct dlb_cmd_response response;\n+\tint32_t ret;\n+\n+\tif (handle == NULL)\n+\t\treturn -EINVAL;\n+\n+\tcfg.response = (uintptr_t)&response;\n+\tcfg.port_id = qm_port_id;\n+\tcfg.qid = qm_qid;\n+\n+\tret = dlb_iface_unmap_qid(handle, &cfg);\n+\tif (ret < 0)\n+\t\tDLB_LOG_ERR(\"dlb: unmap qid error, ret=%d (driver status: %s)\\n\",\n+\t\t\t ret, dlb_error_strings[response.status]);\n+\n+\treturn ret;\n+}\n+\n /* VDEV-only notes:\n * This function first unmaps all memory mappings and closes the\n * domain's file descriptor, which causes the driver to reset the\n@@ -1904,6 +1928,42 @@ int dlb_string_to_int(int *result, const char *str)\n }\n \n static int\n+dlb_event_queue_detach_ldb(struct dlb_eventdev *dlb,\n+\t\t\t struct dlb_eventdev_port *ev_port,\n+\t\t\t struct dlb_eventdev_queue *ev_queue)\n+{\n+\tint ret, i;\n+\n+\t/* Don't unlink until start time. */\n+\tif (dlb->run_state == DLB_RUN_STATE_STOPPED)\n+\t\treturn 0;\n+\n+\tfor (i = 0; i < DLB_MAX_NUM_QIDS_PER_LDB_CQ; i++) {\n+\t\tif (ev_port->link[i].valid &&\n+\t\t ev_port->link[i].queue_id == ev_queue->id)\n+\t\t\tbreak; /* found */\n+\t}\n+\n+\t/* This is expected with eventdev API!\n+\t * It blindly attemmpts to unmap all queues.\n+\t */\n+\tif (i == DLB_MAX_NUM_QIDS_PER_LDB_CQ) {\n+\t\tDLB_LOG_DBG(\"dlb: ignoring LB QID %d not mapped for qm_port %d.\\n\",\n+\t\t\t ev_queue->qm_queue.id,\n+\t\t\t ev_port->qm_port.id);\n+\t\treturn 0;\n+\t}\n+\n+\tret = dlb_hw_unmap_ldb_qid_from_port(&dlb->qm_instance,\n+\t\t\t\t\t ev_port->qm_port.id,\n+\t\t\t\t\t ev_queue->qm_queue.id);\n+\tif (!ret)\n+\t\tev_port->link[i].mapped = false;\n+\n+\treturn ret;\n+}\n+\n+static int\n dlb_do_port_link(struct rte_eventdev *dev,\n \t\t struct dlb_eventdev_queue *ev_queue,\n \t\t struct dlb_eventdev_port *ev_port,\n@@ -2476,6 +2536,109 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)\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+\tstruct dlb_eventdev_port *ev_port = event_port;\n+\tstruct dlb_eventdev *dlb;\n+\tint i;\n+\n+\tRTE_SET_USED(dev);\n+\n+\tif (!ev_port->setup_done) {\n+\t\tDLB_LOG_ERR(\"dlb: evport %d is not configured\\n\",\n+\t\t\t ev_port->id);\n+\t\trte_errno = -EINVAL;\n+\t\treturn 0;\n+\t}\n+\n+\tif (!queues || nb_unlinks == 0) {\n+\t\tDLB_LOG_DBG(\"dlb: queues is NULL or nb_unlinks is 0\\n\");\n+\t\treturn 0; /* Ignore and return success */\n+\t}\n+\n+\tif (ev_port->qm_port.is_directed) {\n+\t\tDLB_LOG_DBG(\"dlb: ignore unlink from dir port %d\\n\",\n+\t\t\t ev_port->id);\n+\t\trte_errno = 0;\n+\t\treturn nb_unlinks; /* as if success */\n+\t}\n+\n+\tdlb = ev_port->dlb;\n+\n+\tfor (i = 0; i < nb_unlinks; i++) {\n+\t\tstruct dlb_eventdev_queue *ev_queue;\n+\t\tint ret, j;\n+\n+\t\tif (queues[i] >= dlb->num_queues) {\n+\t\t\tDLB_LOG_ERR(\"dlb: invalid queue id %d\\n\", queues[i]);\n+\t\t\trte_errno = -EINVAL;\n+\t\t\treturn i; /* return index of offending queue */\n+\t\t}\n+\n+\t\tev_queue = &dlb->ev_queues[queues[i]];\n+\n+\t\t/* Does a link exist? */\n+\t\tfor (j = 0; j < DLB_MAX_NUM_QIDS_PER_LDB_CQ; j++)\n+\t\t\tif (ev_port->link[j].queue_id == queues[i] &&\n+\t\t\t ev_port->link[j].valid)\n+\t\t\t\tbreak;\n+\n+\t\tif (j == DLB_MAX_NUM_QIDS_PER_LDB_CQ)\n+\t\t\tcontinue;\n+\n+\t\tret = dlb_event_queue_detach_ldb(dlb, ev_port, ev_queue);\n+\t\tif (ret) {\n+\t\t\tDLB_LOG_ERR(\"unlink err=%d for port %d queue %d\\n\",\n+\t\t\t\t ret, ev_port->id, queues[i]);\n+\t\t\trte_errno = -ENOENT;\n+\t\t\treturn i; /* return index of offending queue */\n+\t\t}\n+\n+\t\tev_port->link[j].valid = false;\n+\t\tev_port->num_links--;\n+\t\tev_queue->num_links--;\n+\t}\n+\n+\treturn nb_unlinks;\n+}\n+\n+static int\n+dlb_eventdev_port_unlinks_in_progress(struct rte_eventdev *dev,\n+\t\t\t\t void *event_port)\n+{\n+\tstruct dlb_eventdev_port *ev_port = event_port;\n+\tstruct dlb_eventdev *dlb;\n+\tstruct dlb_hw_dev *handle;\n+\tstruct dlb_pending_port_unmaps_args cfg;\n+\tstruct dlb_cmd_response response;\n+\tint ret;\n+\n+\tRTE_SET_USED(dev);\n+\n+\tif (!ev_port->setup_done) {\n+\t\tDLB_LOG_ERR(\"dlb: evport %d is not configured\\n\",\n+\t\t\t ev_port->id);\n+\t\trte_errno = -EINVAL;\n+\t\treturn 0;\n+\t}\n+\n+\tcfg.port_id = ev_port->qm_port.id;\n+\tcfg.response = (uintptr_t)&response;\n+\tdlb = ev_port->dlb;\n+\thandle = &dlb->qm_instance;\n+\tret = dlb_iface_pending_port_unmaps(handle, &cfg);\n+\n+\tif (ret < 0) {\n+\t\tDLB_LOG_ERR(\"dlb: num_unlinks_in_progress ret=%d (driver status: %s)\\n\",\n+\t\t\t ret, dlb_error_strings[response.status]);\n+\t\treturn ret;\n+\t}\n+\n+\treturn response.id;\n+}\n+\n static void\n dlb_eventdev_port_release(void *port)\n {\n@@ -2582,6 +2745,9 @@ static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)\n \t\t.port_setup = dlb_eventdev_port_setup,\n \t\t.port_release = dlb_eventdev_port_release,\n \t\t.port_link = dlb_eventdev_port_link,\n+\t\t.port_unlink = dlb_eventdev_port_unlink,\n+\t\t.port_unlinks_in_progress =\n+\t\t\t\t dlb_eventdev_port_unlinks_in_progress,\n \t};\n \n \t/* Expose PMD's eventdev interface */\n", "prefixes": [ "22/27" ] }{ "id": 75073, "url": "