get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77417,
    "url": "http://patches.dpdk.org/api/patches/77417/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-31-qi.z.zhang@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": "<20200911131954.15999-31-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200911131954.15999-31-qi.z.zhang@intel.com",
    "date": "2020-09-11T13:19:44",
    "name": "[v2,30/40] net/ice/base: misc minor ACL changes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "05b8b348e8a20ac52eedb1f6fc20ea645baeed00",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-31-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 12148,
            "url": "http://patches.dpdk.org/api/series/12148/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12148",
            "date": "2020-09-11T13:19:15",
            "name": "ice base code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/12148/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77417/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77417/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 4CBA3A04B7;\n\tFri, 11 Sep 2020 15:22:10 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A538D1C22A;\n\tFri, 11 Sep 2020 15:16:58 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id B9C2B1C1EE\n for <dev@dpdk.org>; Fri, 11 Sep 2020 15:16:44 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 06:16:44 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.82])\n by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:43 -0700"
        ],
        "IronPort-SDR": [
            "\n /2mo5CrbqFP05emsM8Zjo4pVCUwH3w7t+Paync+cRzF6wB2FI3JsI0t0aMbRkUC82B4i3bpAnf\n 5bbmevwu5rkg==",
            "\n 8W8tJAiMzR8TaLNEM4vTYuywyVADfK/ld0bUS5PUk3qAL5flrGX7D9ngXFb+y6/JfE6Kuf0Lj9\n IhWdc41vihaQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"146482375\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"146482375\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"342296721\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Tony Nguyen <anthony.l.nguyen@intel.com>",
        "Date": "Fri, 11 Sep 2020 21:19:44 +0800",
        "Message-Id": "<20200911131954.15999-31-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200911131954.15999-1-qi.z.zhang@intel.com>",
        "References": "<20200907112826.48493-1-qi.z.zhang@intel.com>\n <20200911131954.15999-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 30/40] net/ice/base: misc minor ACL changes",
        "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": "This is a collection of minor ACL style changes including:\n\n- When there is nothing to unroll, return a value directly.\n- Return ICE_SUCCESS(0) in cases where an error was previously checked\n  so ICE_SUCCESS is the only possible return.\n- Remove unnecessary parentheses and newlines\n- Move unroll of allocation to end of function and use goto on errors to\n  free.\n- Fix function header comment style\n- Remove 'else' from an 'if else' condition where both conditions return\n  a value to reduce indentation.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_acl_ctrl.c | 24 +++++++++++-------------\n 1 file changed, 11 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c\nindex 02a1dd34f..bd09e9d77 100644\n--- a/drivers/net/ice/base/ice_acl_ctrl.c\n+++ b/drivers/net/ice/base/ice_acl_ctrl.c\n@@ -149,10 +149,8 @@ static enum ice_status ice_acl_init_tbl(struct ice_hw *hw)\n \tu16 idx;\n \n \ttbl = hw->acl_tbl;\n-\tif (!tbl) {\n-\t\tstatus = ICE_ERR_CFG;\n-\t\treturn status;\n-\t}\n+\tif (!tbl)\n+\t\treturn ICE_ERR_CFG;\n \n \tice_memset(&buf, 0, sizeof(buf), ICE_NONDMA_MEM);\n \tice_memset(&act_buf, 0, sizeof(act_buf), ICE_NONDMA_MEM);\n@@ -526,7 +524,7 @@ ice_acl_alloc_partition(struct ice_hw *hw, struct ice_acl_scen *req)\n \t\t\tbreak;\n \t\t}\n \n-\t\trow = (dir > 0) ? (row + width) : (row - width);\n+\t\trow = dir > 0 ? row + width : row - width;\n \t\tif (row > hw->acl_tbl->last_tcam ||\n \t\t    row < hw->acl_tbl->first_tcam) {\n \t\t\t/* All rows have been checked. Increment 'off' that\n@@ -668,8 +666,7 @@ static void\n ice_acl_assign_act_mem_for_scen(struct ice_acl_tbl *tbl,\n \t\t\t\tstruct ice_acl_scen *scen,\n \t\t\t\tstruct ice_aqc_acl_scen *scen_buf,\n-\t\t\t\tu8 current_tcam_idx,\n-\t\t\t\tu8 target_tcam_idx)\n+\t\t\t\tu8 current_tcam_idx, u8 target_tcam_idx)\n {\n \tu8 i;\n \n@@ -761,10 +758,8 @@ ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,\n \tscen->num_entry = num_entries;\n \n \tstatus = ice_acl_alloc_partition(hw, scen);\n-\tif (status) {\n-\t\tice_free(hw, scen);\n-\t\treturn status;\n-\t}\n+\tif (status)\n+\t\tgoto out;\n \n \tice_memset(&scen_buf, 0, sizeof(scen_buf), ICE_NONDMA_MEM);\n \n@@ -829,8 +824,7 @@ ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,\n \tif (status) {\n \t\tice_debug(hw, ICE_DBG_ACL, \"AQ allocation of ACL scenario failed. status: %d\\n\",\n \t\t\t  status);\n-\t\tice_free(hw, scen);\n-\t\treturn status;\n+\t\tgoto out;\n \t}\n \n \tscen->id = *scen_id;\n@@ -838,6 +832,10 @@ ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,\n \tice_acl_init_entry(scen);\n \tLIST_ADD(&scen->list_entry, &hw->acl_tbl->scens);\n \n+out:\n+\tif (status)\n+\t\tice_free(hw, scen);\n+\n \treturn status;\n }\n \n",
    "prefixes": [
        "v2",
        "30/40"
    ]
}