get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50593,
    "url": "http://patches.dpdk.org/api/patches/50593/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190228055650.25237-35-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": "<20190228055650.25237-35-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190228055650.25237-35-qi.z.zhang@intel.com",
    "date": "2019-02-28T05:56:47",
    "name": "[34/37] net/ice/base: remove duplicate resource allocations",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "df4ade59639d76fbd11a504cc434ff384280c21b",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190228055650.25237-35-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 3567,
            "url": "http://patches.dpdk.org/api/series/3567/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3567",
            "date": "2019-02-28T05:56:13",
            "name": "share code update.",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3567/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50593/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/50593/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B79745587;\n\tThu, 28 Feb 2019 06:55:56 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id B52711B185\n\tfor <dev@dpdk.org>; Thu, 28 Feb 2019 06:55:53 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Feb 2019 21:55:53 -0800",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga006.fm.intel.com with ESMTP; 27 Feb 2019 21:55:51 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,422,1544515200\"; d=\"scan'208\";a=\"322784423\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "wenzhuo.lu@intel.com,\n\tqiming.yang@intel.com",
        "Cc": "paul.m.stillwell.jr@intel.com, dev@dpdk.org, ferruh.yigit@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>,\n\tVignesh Sridhar <vignesh.sridhar@intel.com>",
        "Date": "Thu, 28 Feb 2019 13:56:47 +0800",
        "Message-Id": "<20190228055650.25237-35-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20190228055650.25237-1-qi.z.zhang@intel.com>",
        "References": "<20190228055650.25237-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 34/37] net/ice/base: remove duplicate resource\n\tallocations",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch ensure that TCAM allocations made by a newly added VSIG\nthat has the same characteristic list of an existing VSIG are removed.\n\nSigned-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_flex_pipe.c | 85 +++++++++++++++++-------------------\n 1 file changed, 41 insertions(+), 44 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 37bb4cbb5..c9d8730d2 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -2302,21 +2302,23 @@ ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)\n \thw->blk[blk].xlt2.vsig_tbl[idx].in_use = false;\n \n \tvsi_cur = hw->blk[blk].xlt2.vsig_tbl[idx].first_vsi;\n-\tif (!vsi_cur)\n-\t\treturn ICE_ERR_CFG;\n-\n-\t/* remove all vsis associated with this VSIG XLT2 entry */\n-\tdo {\n-\t\tstruct ice_vsig_vsi *tmp = vsi_cur->next_vsi;\n-\n-\t\tvsi_cur->vsig = ICE_DEFAULT_VSIG;\n-\t\tvsi_cur->changed = 1;\n-\t\tvsi_cur->next_vsi = NULL;\n-\t\tvsi_cur = tmp;\n-\t} while (vsi_cur);\n-\n-\t/* NULL terminate head of vsi list */\n-\thw->blk[blk].xlt2.vsig_tbl[idx].first_vsi = NULL;\n+\t/* If the VSIG has at least 1 VSI then iterate through the\n+\t * list and remove the VSIs before deleting the group.\n+\t */\n+\tif (vsi_cur) {\n+\t\t/* remove all vsis associated with this VSIG XLT2 entry */\n+\t\tdo {\n+\t\t\tstruct ice_vsig_vsi *tmp = vsi_cur->next_vsi;\n+\n+\t\t\tvsi_cur->vsig = ICE_DEFAULT_VSIG;\n+\t\t\tvsi_cur->changed = 1;\n+\t\t\tvsi_cur->next_vsi = NULL;\n+\t\t\tvsi_cur = tmp;\n+\t\t} while (vsi_cur);\n+\n+\t\t/* NULL terminate head of VSI list */\n+\t\thw->blk[blk].xlt2.vsig_tbl[idx].first_vsi = NULL;\n+\t}\n \n \t/* free characteristic list */\n \tLIST_FOR_EACH_ENTRY_SAFE(del, dtmp,\n@@ -4267,36 +4269,32 @@ ice_rem_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,\n \n \t/* Move all VSIS associated with this VSIG to the default VSIG */\n \tvsi_cur = hw->blk[blk].xlt2.vsig_tbl[idx].first_vsi;\n-\tif (!vsi_cur)\n-\t\treturn ICE_ERR_CFG;\n-\n-\tdo {\n-\t\tstruct ice_vsig_vsi *tmp = vsi_cur->next_vsi;\n-\t\tstruct ice_chs_chg *p;\n-\n-\t\tp = (struct ice_chs_chg *)ice_malloc(hw, sizeof(*p));\n-\t\tif (!p)\n-\t\t\tgoto err_ice_rem_vsig;\n+\t/* If the VSIG has at least 1 VSI then iterate through the list\n+\t * and remove the VSIs before deleting the group.\n+\t */\n+\tif (vsi_cur) {\n+\t\tdo {\n+\t\t\tstruct ice_vsig_vsi *tmp = vsi_cur->next_vsi;\n+\t\t\tstruct ice_chs_chg *p;\n \n-\t\tp->type = ICE_VSIG_REM;\n-\t\tp->orig_vsig = vsig;\n-\t\tp->vsig = ICE_DEFAULT_VSIG;\n-\t\tp->vsi = vsi_cur - hw->blk[blk].xlt2.vsis;\n+\t\t\tp = (struct ice_chs_chg *)ice_malloc(hw, sizeof(*p));\n+\t\t\tif (!p)\n+\t\t\t\treturn ICE_ERR_NO_MEMORY;\n \n-\t\tLIST_ADD(&p->list_entry, chg);\n+\t\t\tp->type = ICE_VSIG_REM;\n+\t\t\tp->orig_vsig = vsig;\n+\t\t\tp->vsig = ICE_DEFAULT_VSIG;\n+\t\t\tp->vsi = vsi_cur - hw->blk[blk].xlt2.vsis;\n \n-\t\tstatus = ice_vsig_free(hw, blk, vsig);\n-\t\tif (status)\n-\t\t\treturn status;\n+\t\t\tLIST_ADD(&p->list_entry, chg);\n \n-\t\tvsi_cur = tmp;\n-\t} while (vsi_cur);\n+\t\t\tvsi_cur = tmp;\n+\t\t} while (vsi_cur);\n+\t}\n \n-\treturn ICE_SUCCESS;\n+\tstatus = ice_vsig_free(hw, blk, vsig);\n \n-err_ice_rem_vsig:\n-\t/* the caller will free up the change list */\n-\treturn ICE_ERR_NO_MEMORY;\n+\treturn status;\n }\n \n /**\n@@ -4493,7 +4491,7 @@ ice_get_profs_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,\n \n \t\tice_memcpy(p, ent1, sizeof(*p), ICE_NONDMA_TO_NONDMA);\n \n-\t\tLIST_ADD(&p->list, lst);\n+\t\tLIST_ADD_TAIL(&p->list, lst);\n \t}\n \n \treturn ICE_SUCCESS;\n@@ -5000,14 +4998,13 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \t\t/* search for an existing VSIG with an exact charc match */\n \t\tstatus = ice_find_dup_props_vsig(hw, blk, &union_lst, &vsig);\n \t\tif (!status) {\n-\t\t\t/* found an exact match */\n-\t\t\t/* move vsi to the VSIG that matches */\n+\t\t\t/* move VSI to the VSIG that matches */\n \t\t\tstatus = ice_move_vsi(hw, blk, vsi, vsig, &chg);\n \t\t\tif (status)\n \t\t\t\tgoto err_ice_add_prof_id_flow;\n \n-\t\t\t/* remove original VSIG if we just moved the only VSI\n-\t\t\t * from it\n+\t\t\t/* VSI has been moved out of or_vsig. If the or_vsig had\n+\t\t\t * only that VSI it is now empty and can be removed.\n \t\t\t */\n \t\t\tif (only_vsi) {\n \t\t\t\tstatus = ice_rem_vsig(hw, blk, or_vsig, &chg);\n",
    "prefixes": [
        "34/37"
    ]
}