get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81185,
    "url": "http://patchwork.dpdk.org/api/patches/81185/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1602916089-18576-4-git-send-email-venkatkumar.duvvuru@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1602916089-18576-4-git-send-email-venkatkumar.duvvuru@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1602916089-18576-4-git-send-email-venkatkumar.duvvuru@broadcom.com",
    "date": "2020-10-17T06:27:58",
    "name": "[03/14] net/bnxt: changes to support 2 table scopes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4abd6cf59792be6edabbe47a65a9aa8d83f33f39",
    "submitter": {
        "id": 1635,
        "url": "http://patchwork.dpdk.org/api/people/1635/?format=api",
        "name": "Venkat Duvvuru",
        "email": "venkatkumar.duvvuru@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patchwork.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1602916089-18576-4-git-send-email-venkatkumar.duvvuru@broadcom.com/mbox/",
    "series": [
        {
            "id": 13073,
            "url": "http://patchwork.dpdk.org/api/series/13073/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=13073",
            "date": "2020-10-17T06:27:55",
            "name": "bnxt patches",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/13073/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/81185/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/81185/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 35F19A04DB;\n\tSat, 17 Oct 2020 08:29:21 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 95ACBE2EE;\n\tSat, 17 Oct 2020 08:28:22 +0200 (CEST)",
            "from relay.smtp-ext.broadcom.com (unknown [192.19.221.30])\n by dpdk.org (Postfix) with ESMTP id 5C052E26B\n for <dev@dpdk.org>; Sat, 17 Oct 2020 08:28:13 +0200 (CEST)",
            "from S60.dhcp.broadcom.net (unknown [10.123.66.170])\n (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))\n (No client certificate requested)\n by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id 284892433F;\n Fri, 16 Oct 2020 23:28:12 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 284892433F",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1602916092;\n bh=VNB8tm+Cp/uaXsWnn0NLNpEucnGQzx3lQDlpiTY6KtE=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=SNnnoXRsmO3IsE+rZcXvfrHOfWlKnta4OXNJBpSfkzInL5tFy8xSCu3sIOESx9dax\n GD7mEigCm1KuyYbGT2UKxo1J1sQtKMWjLN8ghDBeHAXT1fHJpAlSTJIbYh28VxX4FV\n 1gOs4L/vS5DXjMI43vjK05zJeaTfyjdS77LNuujo=",
        "From": "Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Jay Ding <jay.ding@broadcom.com>",
        "Date": "Sat, 17 Oct 2020 11:57:58 +0530",
        "Message-Id": "\n <1602916089-18576-4-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "\n <1602916089-18576-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "References": "\n <1602916089-18576-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 03/14] net/bnxt: changes to support 2 table scopes",
        "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: Jay Ding <jay.ding@broadcom.com>\n\nThis reverts commit 1312374a4e3c1851ae5e0d52cb8788c5b5e76fe0.\n\nSigned-off-by: Jay Ding <jay.ding@broadcom.com>\nReviewed-by: Randy Schacher <stuart.schacher@broadcom.com>\n---\n drivers/net/bnxt/tf_core/tf_em_common.c | 85 +--------------------------------\n drivers/net/bnxt/tf_core/tf_em_common.h | 27 +----------\n drivers/net/bnxt/tf_core/tf_em_host.c   | 23 +++++++--\n 3 files changed, 21 insertions(+), 114 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_core/tf_em_common.c b/drivers/net/bnxt/tf_core/tf_em_common.c\nindex 0d8b908..0f4b121 100644\n--- a/drivers/net/bnxt/tf_core/tf_em_common.c\n+++ b/drivers/net/bnxt/tf_core/tf_em_common.c\n@@ -44,28 +44,6 @@ static enum tf_mem_type mem_type;\n /** Table scope array */\n struct tf_tbl_scope_cb tbl_scopes[TF_NUM_TBL_SCOPE];\n \n-/** Table scope reversal table\n- *\n- * Table scope are allocated from 15 to 0 within HCAPI RM.  Because of the\n- * association between PFs and legacy table scopes, reverse table scope ids.\n- * 15 indicates 0, 14 indicates 1, etc... The application will only see the 0\n- * based number.  The firmware will only use the 0 based number.  Only HCAPI RM\n- * and Truflow RM believe the number is 15.  When HCAPI RM support allocation\n- * from low to high is supported, this adjust function can be removed.\n- */\n-const uint32_t tbl_scope_reverse[TF_NUM_TBL_SCOPE] = {\n-\t15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };\n-\n-static uint32_t\n-tf_tbl_scope_adjust(uint32_t tbl_scope_id)\n-{\n-\tif (tbl_scope_id < TF_NUM_TBL_SCOPE)\n-\t\treturn tbl_scope_reverse[tbl_scope_id];\n-\telse\n-\t\treturn TF_TBL_SCOPE_INVALID;\n-};\n-\n-\n /* API defined in tf_em.h */\n struct tf_tbl_scope_cb *\n tbl_scope_cb_find(uint32_t tbl_scope_id)\n@@ -73,17 +51,11 @@ tbl_scope_cb_find(uint32_t tbl_scope_id)\n \tint i;\n \tstruct tf_rm_is_allocated_parms parms = { 0 };\n \tint allocated;\n-\tuint32_t rm_tbl_scope_id;\n-\n-\trm_tbl_scope_id = tf_tbl_scope_adjust(tbl_scope_id);\n-\n-\tif (rm_tbl_scope_id == TF_TBL_SCOPE_INVALID)\n-\t\treturn NULL;\n \n \t/* Check that id is valid */\n \tparms.rm_db = eem_db[TF_DIR_RX];\n \tparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n-\tparms.index = rm_tbl_scope_id;\n+\tparms.index = tbl_scope_id;\n \tparms.allocated = &allocated;\n \n \ti = tf_rm_is_allocated(&parms);\n@@ -99,61 +71,6 @@ tbl_scope_cb_find(uint32_t tbl_scope_id)\n \treturn NULL;\n }\n \n-int tf_tbl_scope_alloc(uint32_t *tbl_scope_id)\n-{\n-\tint rc;\n-\tstruct tf_rm_allocate_parms parms = { 0 };\n-\tuint32_t rm_tbl_scope_id;\n-\tuint32_t usr_tbl_scope_id = TF_TBL_SCOPE_INVALID;\n-\n-\t/* Get Table Scope control block from the session pool */\n-\tparms.rm_db = eem_db[TF_DIR_RX];\n-\tparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n-\tparms.index = &rm_tbl_scope_id;\n-\n-\trc = tf_rm_allocate(&parms);\n-\tif (rc) {\n-\t\tTFP_DRV_LOG(ERR,\n-\t\t\t    \"Failed to allocate table scope rc:%s\\n\",\n-\t\t\t    strerror(-rc));\n-\t\treturn rc;\n-\t}\n-\n-\tusr_tbl_scope_id = tf_tbl_scope_adjust(rm_tbl_scope_id);\n-\n-\tif (usr_tbl_scope_id == TF_TBL_SCOPE_INVALID) {\n-\t\tTFP_DRV_LOG(ERR,\n-\t\t\t    \"Invalid table scope allocated id:%d\\n\",\n-\t\t\t    (int)rm_tbl_scope_id);\n-\t\treturn -EINVAL;\n-\t}\n-\t*tbl_scope_id = usr_tbl_scope_id;\n-\treturn 0;\n-};\n-\n-int tf_tbl_scope_free(uint32_t tbl_scope_id)\n-{\n-\tstruct tf_rm_free_parms parms = { 0 };\n-\tuint32_t rm_tbl_scope_id;\n-\tuint32_t rc;\n-\n-\trm_tbl_scope_id = tf_tbl_scope_adjust(tbl_scope_id);\n-\n-\tif (rm_tbl_scope_id == TF_TBL_SCOPE_INVALID) {\n-\t\tTFP_DRV_LOG(ERR,\n-\t\t\t    \"Invalid table scope allocated id:%d\\n\",\n-\t\t\t    (int)tbl_scope_id);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tparms.rm_db = eem_db[TF_DIR_RX];\n-\tparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n-\tparms.index = rm_tbl_scope_id;\n-\n-\trc = tf_rm_free(&parms);\n-\treturn rc;\n-};\n-\n int\n tf_create_tbl_pool_external(enum tf_dir dir,\n \t\t\t    struct tf_tbl_scope_cb *tbl_scope_cb,\ndiff --git a/drivers/net/bnxt/tf_core/tf_em_common.h b/drivers/net/bnxt/tf_core/tf_em_common.h\nindex f71a487..fa313c4 100644\n--- a/drivers/net/bnxt/tf_core/tf_em_common.h\n+++ b/drivers/net/bnxt/tf_core/tf_em_common.h\n@@ -9,6 +9,7 @@\n #include \"tf_core.h\"\n #include \"tf_session.h\"\n \n+\n /**\n  * Function to search for table scope control block structure\n  * with specified table scope ID.\n@@ -23,32 +24,6 @@\n struct tf_tbl_scope_cb *tbl_scope_cb_find(uint32_t tbl_scope_id);\n \n /**\n- * Table Scope Allocate\n- *\n- * Allocate a table scope\n- *\n- * [in/out] pointer to tbl_scope_id\n- *\n- * Returns:\n- *  0 - success\n- *  -EINVAL - error\n- */\n-int tf_tbl_scope_alloc(uint32_t *tbl_scope_id);\n-\n-/**\n- * Table Scope Free\n- *\n- * Free a table scope\n- *\n- * [in] tbl_scope_id to free\n- *\n- * Returns:\n- *  0 - success\n- *  -EINVAL - error\n- */\n-int tf_tbl_scope_free(uint32_t tbl_scope_id);\n-\n-/**\n  * Create and initialize a stack to use for action entries\n  *\n  * [in] dir\ndiff --git a/drivers/net/bnxt/tf_core/tf_em_host.c b/drivers/net/bnxt/tf_core/tf_em_host.c\nindex cfcb12f..b5db94f 100644\n--- a/drivers/net/bnxt/tf_core/tf_em_host.c\n+++ b/drivers/net/bnxt/tf_core/tf_em_host.c\n@@ -374,8 +374,14 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms)\n \tstruct tf_tbl_scope_cb *tbl_scope_cb;\n \tstruct hcapi_cfa_em_table *em_tables;\n \tstruct tf_free_tbl_scope_parms free_parms;\n-\n-\trc = tf_tbl_scope_alloc(&parms->tbl_scope_id);\n+\tstruct tf_rm_allocate_parms aparms = { 0 };\n+\tstruct tf_rm_free_parms fparms = { 0 };\n+\n+\t/* Get Table Scope control block from the session pool */\n+\taparms.rm_db = eem_db[TF_DIR_RX];\n+\taparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n+\taparms.index = (uint32_t *)&parms->tbl_scope_id;\n+\trc = tf_rm_allocate(&aparms);\n \tif (rc) {\n \t\tTFP_DRV_LOG(ERR,\n \t\t\t    \"Failed to allocate table scope\\n\");\n@@ -472,7 +478,11 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms)\n \treturn -EINVAL;\n \n cleanup:\n-\ttf_tbl_scope_free(parms->tbl_scope_id);\n+\t/* Free Table control block */\n+\tfparms.rm_db = eem_db[TF_DIR_RX];\n+\tfparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n+\tfparms.index = parms->tbl_scope_id;\n+\ttf_rm_free(&fparms);\n \treturn -EINVAL;\n }\n \n@@ -483,6 +493,7 @@ tf_em_ext_free(struct tf *tfp,\n \tint rc = 0;\n \tenum tf_dir  dir;\n \tstruct tf_tbl_scope_cb *tbl_scope_cb;\n+\tstruct tf_rm_free_parms aparms = { 0 };\n \n \ttbl_scope_cb = tbl_scope_cb_find(parms->tbl_scope_id);\n \n@@ -491,7 +502,11 @@ tf_em_ext_free(struct tf *tfp,\n \t\treturn -EINVAL;\n \t}\n \n-\trc = tf_tbl_scope_free(parms->tbl_scope_id);\n+\t/* Free Table control block */\n+\taparms.rm_db = eem_db[TF_DIR_RX];\n+\taparms.db_index = TF_EM_TBL_TYPE_TBL_SCOPE;\n+\taparms.index = parms->tbl_scope_id;\n+\trc = tf_rm_free(&aparms);\n \tif (rc) {\n \t\tTFP_DRV_LOG(ERR,\n \t\t\t    \"Failed to free table scope\\n\");\n",
    "prefixes": [
        "03/14"
    ]
}