get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/91309/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 91309,
    "url": "https://patches.dpdk.org/api/patches/91309/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1618344896-2090-11-git-send-email-timothy.mcdaniel@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": "<1618344896-2090-11-git-send-email-timothy.mcdaniel@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1618344896-2090-11-git-send-email-timothy.mcdaniel@intel.com",
    "date": "2021-04-13T20:14:40",
    "name": "[v3,10/26] event/dlb2: add v2.5 create dir queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "64eaf5ff6bcea3a28f17f1224b5d8c70a318340f",
    "submitter": {
        "id": 826,
        "url": "https://patches.dpdk.org/api/people/826/?format=api",
        "name": "Timothy McDaniel",
        "email": "timothy.mcdaniel@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1618344896-2090-11-git-send-email-timothy.mcdaniel@intel.com/mbox/",
    "series": [
        {
            "id": 16345,
            "url": "https://patches.dpdk.org/api/series/16345/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16345",
            "date": "2021-04-13T20:14:31",
            "name": "Add DLB V2.5",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/16345/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/91309/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91309/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 9AA94A0524;\n\tTue, 13 Apr 2021 22:17:50 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 69C22161322;\n\tTue, 13 Apr 2021 22:16:32 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 0725B1612C2\n for <dev@dpdk.org>; Tue, 13 Apr 2021 22:16:15 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2021 13:16:15 -0700",
            "from txasoft-yocto.an.intel.com ([10.123.72.192])\n by orsmga008.jf.intel.com with ESMTP; 13 Apr 2021 13:16:14 -0700"
        ],
        "IronPort-SDR": [
            "\n 4hYDbrdG3vgBWliuLmRp1YKSpDlwmoM2m1vacbiUk6kB1lcc3HAgZ82+L3E57wvZIOw7jw7duq\n fD4DDadP5LAw==",
            "\n KcQX7gwiprTwJGmy2A6CA+D0XIvbGRYweS91Vk+EQe7/7QzHEWFVdeqX17aHcKs8oZmooY5+uS\n /kBFVInMJArQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,9953\"; a=\"194519709\"",
            "E=Sophos;i=\"5.82,220,1613462400\"; d=\"scan'208\";a=\"194519709\"",
            "E=Sophos;i=\"5.82,220,1613462400\"; d=\"scan'208\";a=\"424406511\""
        ],
        "X-ExtLoop1": "1",
        "From": "Timothy McDaniel <timothy.mcdaniel@intel.com>",
        "To": "",
        "Cc": "dev@dpdk.org, erik.g.carrillo@intel.com, gage.eads@intel.com,\n harry.van.haaren@intel.com, jerinj@marvell.com, thomas@monjalon.net",
        "Date": "Tue, 13 Apr 2021 15:14:40 -0500",
        "Message-Id": "<1618344896-2090-11-git-send-email-timothy.mcdaniel@intel.com>",
        "X-Mailer": "git-send-email 1.7.10",
        "In-Reply-To": "<1618344896-2090-1-git-send-email-timothy.mcdaniel@intel.com>",
        "References": "<20210316221857.2254-2-timothy.mcdaniel@intel.com>\n <1618344896-2090-1-git-send-email-timothy.mcdaniel@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 10/26] event/dlb2: add v2.5 create dir queue",
        "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": "Updated low level hardware functions to account for new\nregister map and hardware access macros.\n\nSigned-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>\n---\n drivers/event/dlb2/pf/base/dlb2_resource.c    | 213 ------------------\n .../event/dlb2/pf/base/dlb2_resource_new.c    | 201 +++++++++++++++++\n 2 files changed, 201 insertions(+), 213 deletions(-)",
    "diff": "diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c\nindex 70c52e908..362deadfe 100644\n--- a/drivers/event/dlb2/pf/base/dlb2_resource.c\n+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c\n@@ -1225,219 +1225,6 @@ dlb2_get_domain_used_dir_pq(struct dlb2_hw *hw,\n \treturn NULL;\n }\n \n-static void dlb2_configure_dir_queue(struct dlb2_hw *hw,\n-\t\t\t\t     struct dlb2_hw_domain *domain,\n-\t\t\t\t     struct dlb2_dir_pq_pair *queue,\n-\t\t\t\t     struct dlb2_create_dir_queue_args *args,\n-\t\t\t\t     bool vdev_req,\n-\t\t\t\t     unsigned int vdev_id)\n-{\n-\tunion dlb2_sys_dir_vasqid_v r0 = { {0} };\n-\tunion dlb2_sys_dir_qid_its r1 = { {0} };\n-\tunion dlb2_lsp_qid_dir_depth_thrsh r2 = { {0} };\n-\tunion dlb2_sys_dir_qid_v r5 = { {0} };\n-\n-\tunsigned int offs;\n-\n-\t/* QID write permissions are turned on when the domain is started */\n-\tr0.field.vasqid_v = 0;\n-\n-\toffs = domain->id.phys_id * DLB2_MAX_NUM_DIR_QUEUES(hw->ver) +\n-\t\tqueue->id.phys_id;\n-\n-\tDLB2_CSR_WR(hw, DLB2_SYS_DIR_VASQID_V(offs), r0.val);\n-\n-\t/* Don't timestamp QEs that pass through this queue */\n-\tr1.field.qid_its = 0;\n-\n-\tDLB2_CSR_WR(hw,\n-\t\t    DLB2_SYS_DIR_QID_ITS(queue->id.phys_id),\n-\t\t    r1.val);\n-\n-\tr2.field.thresh = args->depth_threshold;\n-\n-\tDLB2_CSR_WR(hw,\n-\t\t    DLB2_LSP_QID_DIR_DEPTH_THRSH(queue->id.phys_id),\n-\t\t    r2.val);\n-\n-\tif (vdev_req) {\n-\t\tunion dlb2_sys_vf_dir_vqid_v r3 = { {0} };\n-\t\tunion dlb2_sys_vf_dir_vqid2qid r4 = { {0} };\n-\n-\t\toffs = vdev_id * DLB2_MAX_NUM_DIR_QUEUES(hw->ver)\n-\t\t\t+ queue->id.virt_id;\n-\n-\t\tr3.field.vqid_v = 1;\n-\n-\t\tDLB2_CSR_WR(hw, DLB2_SYS_VF_DIR_VQID_V(offs), r3.val);\n-\n-\t\tr4.field.qid = queue->id.phys_id;\n-\n-\t\tDLB2_CSR_WR(hw, DLB2_SYS_VF_DIR_VQID2QID(offs), r4.val);\n-\t}\n-\n-\tr5.field.qid_v = 1;\n-\n-\tDLB2_CSR_WR(hw, DLB2_SYS_DIR_QID_V(queue->id.phys_id), r5.val);\n-\n-\tqueue->queue_configured = true;\n-}\n-\n-static void\n-dlb2_log_create_dir_queue_args(struct dlb2_hw *hw,\n-\t\t\t       u32 domain_id,\n-\t\t\t       struct dlb2_create_dir_queue_args *args,\n-\t\t\t       bool vdev_req,\n-\t\t\t       unsigned int vdev_id)\n-{\n-\tDLB2_HW_DBG(hw, \"DLB2 create directed queue arguments:\\n\");\n-\tif (vdev_req)\n-\t\tDLB2_HW_DBG(hw, \"(Request from vdev %d)\\n\", vdev_id);\n-\tDLB2_HW_DBG(hw, \"\\tDomain ID: %d\\n\", domain_id);\n-\tDLB2_HW_DBG(hw, \"\\tPort ID:   %d\\n\", args->port_id);\n-}\n-\n-static int\n-dlb2_verify_create_dir_queue_args(struct dlb2_hw *hw,\n-\t\t\t\t  u32 domain_id,\n-\t\t\t\t  struct dlb2_create_dir_queue_args *args,\n-\t\t\t\t  struct dlb2_cmd_response *resp,\n-\t\t\t\t  bool vdev_req,\n-\t\t\t\t  unsigned int vdev_id)\n-{\n-\tstruct dlb2_hw_domain *domain;\n-\n-\tdomain = dlb2_get_domain_from_id(hw, domain_id, vdev_req, vdev_id);\n-\n-\tif (domain == NULL) {\n-\t\tresp->status = DLB2_ST_INVALID_DOMAIN_ID;\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (!domain->configured) {\n-\t\tresp->status = DLB2_ST_DOMAIN_NOT_CONFIGURED;\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (domain->started) {\n-\t\tresp->status = DLB2_ST_DOMAIN_STARTED;\n-\t\treturn -EINVAL;\n-\t}\n-\n-\t/*\n-\t * If the user claims the port is already configured, validate the port\n-\t * ID, its domain, and whether the port is configured.\n-\t */\n-\tif (args->port_id != -1) {\n-\t\tstruct dlb2_dir_pq_pair *port;\n-\n-\t\tport = dlb2_get_domain_used_dir_pq(hw,\n-\t\t\t\t\t\t   args->port_id,\n-\t\t\t\t\t\t   vdev_req,\n-\t\t\t\t\t\t   domain);\n-\n-\t\tif (port == NULL || port->domain_id.phys_id !=\n-\t\t\t\tdomain->id.phys_id || !port->port_configured) {\n-\t\t\tresp->status = DLB2_ST_INVALID_PORT_ID;\n-\t\t\treturn -EINVAL;\n-\t\t}\n-\t}\n-\n-\t/*\n-\t * If the queue's port is not configured, validate that a free\n-\t * port-queue pair is available.\n-\t */\n-\tif (args->port_id == -1 &&\n-\t    dlb2_list_empty(&domain->avail_dir_pq_pairs)) {\n-\t\tresp->status = DLB2_ST_DIR_QUEUES_UNAVAILABLE;\n-\t\treturn -EINVAL;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-/**\n- * dlb2_hw_create_dir_queue() - Allocate and initialize a DLB DIR queue.\n- * @hw:\tContains the current state of the DLB2 hardware.\n- * @domain_id: Domain ID\n- * @args: User-provided arguments.\n- * @resp: Response to user.\n- * @vdev_req: Request came from a virtual device.\n- * @vdev_id: If vdev_req is true, this contains the virtual device's ID.\n- *\n- * Return: returns < 0 on error, 0 otherwise. If the driver is unable to\n- * satisfy a request, resp->status will be set accordingly.\n- */\n-int dlb2_hw_create_dir_queue(struct dlb2_hw *hw,\n-\t\t\t     u32 domain_id,\n-\t\t\t     struct dlb2_create_dir_queue_args *args,\n-\t\t\t     struct dlb2_cmd_response *resp,\n-\t\t\t     bool vdev_req,\n-\t\t\t     unsigned int vdev_id)\n-{\n-\tstruct dlb2_dir_pq_pair *queue;\n-\tstruct dlb2_hw_domain *domain;\n-\tint ret;\n-\n-\tdlb2_log_create_dir_queue_args(hw, domain_id, args, vdev_req, vdev_id);\n-\n-\t/*\n-\t * Verify that hardware resources are available before attempting to\n-\t * satisfy the request. This simplifies the error unwinding code.\n-\t */\n-\tret = dlb2_verify_create_dir_queue_args(hw,\n-\t\t\t\t\t\tdomain_id,\n-\t\t\t\t\t\targs,\n-\t\t\t\t\t\tresp,\n-\t\t\t\t\t\tvdev_req,\n-\t\t\t\t\t\tvdev_id);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tdomain = dlb2_get_domain_from_id(hw, domain_id, vdev_req, vdev_id);\n-\tif (domain == NULL) {\n-\t\tDLB2_HW_ERR(hw,\n-\t\t\t    \"[%s():%d] Internal error: domain not found\\n\",\n-\t\t\t    __func__, __LINE__);\n-\t\treturn -EFAULT;\n-\t}\n-\n-\tif (args->port_id != -1)\n-\t\tqueue = dlb2_get_domain_used_dir_pq(hw,\n-\t\t\t\t\t\t    args->port_id,\n-\t\t\t\t\t\t    vdev_req,\n-\t\t\t\t\t\t    domain);\n-\telse\n-\t\tqueue = DLB2_DOM_LIST_HEAD(domain->avail_dir_pq_pairs,\n-\t\t\t\t\t   typeof(*queue));\n-\tif (queue == NULL) {\n-\t\tDLB2_HW_ERR(hw,\n-\t\t\t    \"[%s():%d] Internal error: no available dir queues\\n\",\n-\t\t\t    __func__, __LINE__);\n-\t\treturn -EFAULT;\n-\t}\n-\n-\tdlb2_configure_dir_queue(hw, domain, queue, args, vdev_req, vdev_id);\n-\n-\t/*\n-\t * Configuration succeeded, so move the resource from the 'avail' to\n-\t * the 'used' list (if it's not already there).\n-\t */\n-\tif (args->port_id == -1) {\n-\t\tdlb2_list_del(&domain->avail_dir_pq_pairs,\n-\t\t\t      &queue->domain_list);\n-\n-\t\tdlb2_list_add(&domain->used_dir_pq_pairs,\n-\t\t\t      &queue->domain_list);\n-\t}\n-\n-\tresp->status = 0;\n-\n-\tresp->id = (vdev_req) ? queue->id.virt_id : queue->id.phys_id;\n-\n-\treturn 0;\n-}\n-\n static bool\n dlb2_port_find_slot_with_pending_map_queue(struct dlb2_ldb_port *port,\n \t\t\t\t\t   struct dlb2_ldb_queue *queue,\ndiff --git a/drivers/event/dlb2/pf/base/dlb2_resource_new.c b/drivers/event/dlb2/pf/base/dlb2_resource_new.c\nindex 4e4b390dd..d4b401250 100644\n--- a/drivers/event/dlb2/pf/base/dlb2_resource_new.c\n+++ b/drivers/event/dlb2/pf/base/dlb2_resource_new.c\n@@ -4857,3 +4857,204 @@ int dlb2_hw_create_dir_port(struct dlb2_hw *hw,\n \n \treturn 0;\n }\n+\n+static void dlb2_configure_dir_queue(struct dlb2_hw *hw,\n+\t\t\t\t     struct dlb2_hw_domain *domain,\n+\t\t\t\t     struct dlb2_dir_pq_pair *queue,\n+\t\t\t\t     struct dlb2_create_dir_queue_args *args,\n+\t\t\t\t     bool vdev_req,\n+\t\t\t\t     unsigned int vdev_id)\n+{\n+\tunsigned int offs;\n+\tu32 reg = 0;\n+\n+\t/* QID write permissions are turned on when the domain is started */\n+\toffs = domain->id.phys_id * DLB2_MAX_NUM_DIR_QUEUES(hw->ver) +\n+\t\tqueue->id.phys_id;\n+\n+\tDLB2_CSR_WR(hw, DLB2_SYS_DIR_VASQID_V(offs), reg);\n+\n+\t/* Don't timestamp QEs that pass through this queue */\n+\tDLB2_CSR_WR(hw, DLB2_SYS_DIR_QID_ITS(queue->id.phys_id), reg);\n+\n+\treg = 0;\n+\tDLB2_BITS_SET(reg, args->depth_threshold,\n+\t\t      DLB2_LSP_QID_DIR_DEPTH_THRSH_THRESH);\n+\tDLB2_CSR_WR(hw,\n+\t\t    DLB2_LSP_QID_DIR_DEPTH_THRSH(hw->ver, queue->id.phys_id),\n+\t\t    reg);\n+\n+\tif (vdev_req) {\n+\t\toffs = vdev_id * DLB2_MAX_NUM_DIR_QUEUES(hw->ver) +\n+\t\t\tqueue->id.virt_id;\n+\n+\t\treg = 0;\n+\t\tDLB2_BIT_SET(reg, DLB2_SYS_VF_DIR_VQID_V_VQID_V);\n+\t\tDLB2_CSR_WR(hw, DLB2_SYS_VF_DIR_VQID_V(offs), reg);\n+\n+\t\treg = 0;\n+\t\tDLB2_BITS_SET(reg, queue->id.phys_id,\n+\t\t\t      DLB2_SYS_VF_DIR_VQID2QID_QID);\n+\t\tDLB2_CSR_WR(hw, DLB2_SYS_VF_DIR_VQID2QID(offs), reg);\n+\t}\n+\n+\treg = 0;\n+\tDLB2_BIT_SET(reg, DLB2_SYS_DIR_QID_V_QID_V);\n+\tDLB2_CSR_WR(hw, DLB2_SYS_DIR_QID_V(queue->id.phys_id), reg);\n+\n+\tqueue->queue_configured = true;\n+}\n+\n+static void\n+dlb2_log_create_dir_queue_args(struct dlb2_hw *hw,\n+\t\t\t       u32 domain_id,\n+\t\t\t       struct dlb2_create_dir_queue_args *args,\n+\t\t\t       bool vdev_req,\n+\t\t\t       unsigned int vdev_id)\n+{\n+\tDLB2_HW_DBG(hw, \"DLB2 create directed queue arguments:\\n\");\n+\tif (vdev_req)\n+\t\tDLB2_HW_DBG(hw, \"(Request from vdev %d)\\n\", vdev_id);\n+\tDLB2_HW_DBG(hw, \"\\tDomain ID: %d\\n\", domain_id);\n+\tDLB2_HW_DBG(hw, \"\\tPort ID:   %d\\n\", args->port_id);\n+}\n+\n+static int\n+dlb2_verify_create_dir_queue_args(struct dlb2_hw *hw,\n+\t\t\t\t  u32 domain_id,\n+\t\t\t\t  struct dlb2_create_dir_queue_args *args,\n+\t\t\t\t  struct dlb2_cmd_response *resp,\n+\t\t\t\t  bool vdev_req,\n+\t\t\t\t  unsigned int vdev_id,\n+\t\t\t\t  struct dlb2_hw_domain **out_domain,\n+\t\t\t\t  struct dlb2_dir_pq_pair **out_queue)\n+{\n+\tstruct dlb2_hw_domain *domain;\n+\tstruct dlb2_dir_pq_pair *pq;\n+\n+\tdomain = dlb2_get_domain_from_id(hw, domain_id, vdev_req, vdev_id);\n+\n+\tif (!domain) {\n+\t\tresp->status = DLB2_ST_INVALID_DOMAIN_ID;\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!domain->configured) {\n+\t\tresp->status = DLB2_ST_DOMAIN_NOT_CONFIGURED;\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (domain->started) {\n+\t\tresp->status = DLB2_ST_DOMAIN_STARTED;\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/*\n+\t * If the user claims the port is already configured, validate the port\n+\t * ID, its domain, and whether the port is configured.\n+\t */\n+\tif (args->port_id != -1) {\n+\t\tpq = dlb2_get_domain_used_dir_pq(hw,\n+\t\t\t\t\t\t args->port_id,\n+\t\t\t\t\t\t vdev_req,\n+\t\t\t\t\t\t domain);\n+\n+\t\tif (!pq || pq->domain_id.phys_id != domain->id.phys_id ||\n+\t\t    !pq->port_configured) {\n+\t\t\tresp->status = DLB2_ST_INVALID_PORT_ID;\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t} else {\n+\t\t/*\n+\t\t * If the queue's port is not configured, validate that a free\n+\t\t * port-queue pair is available.\n+\t\t */\n+\t\tpq = DLB2_DOM_LIST_HEAD(domain->avail_dir_pq_pairs,\n+\t\t\t\t\ttypeof(*pq));\n+\t\tif (!pq) {\n+\t\t\tresp->status = DLB2_ST_DIR_QUEUES_UNAVAILABLE;\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\t*out_domain = domain;\n+\t*out_queue = pq;\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * dlb2_hw_create_dir_queue() - create a directed queue\n+ * @hw: dlb2_hw handle for a particular device.\n+ * @domain_id: domain ID.\n+ * @args: queue creation arguments.\n+ * @resp: response structure.\n+ * @vdev_req: indicates whether this request came from a vdev.\n+ * @vdev_id: If vdev_req is true, this contains the vdev's ID.\n+ *\n+ * This function creates a directed queue.\n+ *\n+ * A vdev can be either an SR-IOV virtual function or a Scalable IOV virtual\n+ * device.\n+ *\n+ * Return:\n+ * Returns 0 upon success, < 0 otherwise. If an error occurs, resp->status is\n+ * assigned a detailed error code from enum dlb2_error. If successful, resp->id\n+ * contains the queue ID.\n+ *\n+ * resp->id contains a virtual ID if vdev_req is true.\n+ *\n+ * Errors:\n+ * EINVAL - A requested resource is unavailable, the domain is not configured,\n+ *\t    or the domain has already been started.\n+ * EFAULT - Internal error (resp->status not set).\n+ */\n+int dlb2_hw_create_dir_queue(struct dlb2_hw *hw,\n+\t\t\t     u32 domain_id,\n+\t\t\t     struct dlb2_create_dir_queue_args *args,\n+\t\t\t     struct dlb2_cmd_response *resp,\n+\t\t\t     bool vdev_req,\n+\t\t\t     unsigned int vdev_id)\n+{\n+\tstruct dlb2_dir_pq_pair *queue;\n+\tstruct dlb2_hw_domain *domain;\n+\tint ret;\n+\n+\tdlb2_log_create_dir_queue_args(hw, domain_id, args, vdev_req, vdev_id);\n+\n+\t/*\n+\t * Verify that hardware resources are available before attempting to\n+\t * satisfy the request. This simplifies the error unwinding code.\n+\t */\n+\tret = dlb2_verify_create_dir_queue_args(hw,\n+\t\t\t\t\t\tdomain_id,\n+\t\t\t\t\t\targs,\n+\t\t\t\t\t\tresp,\n+\t\t\t\t\t\tvdev_req,\n+\t\t\t\t\t\tvdev_id,\n+\t\t\t\t\t\t&domain,\n+\t\t\t\t\t\t&queue);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tdlb2_configure_dir_queue(hw, domain, queue, args, vdev_req, vdev_id);\n+\n+\t/*\n+\t * Configuration succeeded, so move the resource from the 'avail' to\n+\t * the 'used' list (if it's not already there).\n+\t */\n+\tif (args->port_id == -1) {\n+\t\tdlb2_list_del(&domain->avail_dir_pq_pairs,\n+\t\t\t      &queue->domain_list);\n+\n+\t\tdlb2_list_add(&domain->used_dir_pq_pairs,\n+\t\t\t      &queue->domain_list);\n+\t}\n+\n+\tresp->status = 0;\n+\n+\tresp->id = (vdev_req) ? queue->id.virt_id : queue->id.phys_id;\n+\n+\treturn 0;\n+}\n+\n",
    "prefixes": [
        "v3",
        "10/26"
    ]
}