get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55060,
    "url": "http://patches.dpdk.org/api/patches/55060/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190619151846.113820-68-leyi.rong@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": "<20190619151846.113820-68-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190619151846.113820-68-leyi.rong@intel.com",
    "date": "2019-06-19T15:18:44",
    "name": "[v3,67/69] net/ice/base: changes in flow and profile removal",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "757d0cbe5a81ab4490e45752abfe2ec8a73fdcf5",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190619151846.113820-68-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 5083,
            "url": "http://patches.dpdk.org/api/series/5083/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5083",
            "date": "2019-06-19T15:17:37",
            "name": "shared code update",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/5083/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55060/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/55060/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 E91E61CFE1;\n\tWed, 19 Jun 2019 17:22:55 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 80FFA1C3A5\n\tfor <dev@dpdk.org>; Wed, 19 Jun 2019 17:21:40 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Jun 2019 08:21:40 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga006.jf.intel.com with ESMTP; 19 Jun 2019 08:21:39 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,392,1557212400\"; d=\"scan'208\";a=\"165050609\"",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tVignesh Sridhar <vignesh.sridhar@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Wed, 19 Jun 2019 23:18:44 +0800",
        "Message-Id": "<20190619151846.113820-68-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190619151846.113820-1-leyi.rong@intel.com>",
        "References": "<20190611155221.2703-1-leyi.rong@intel.com>\n\t<20190619151846.113820-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 67/69] net/ice/base: changes in flow and\n\tprofile removal",
        "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": "- Add function to remove ES profile map as it is now being used in\nclearing and freeing HW tables.\n- Locks were initially not used for releasing ES profile maps and\nflow profiles as the sequence is part of driver unload. Adding\ncalls to acquire and release locks to ensure that any calls made\nby the VF VSI during VFR or unload do not result in memory\naccess violations.\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: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_flex_pipe.c | 35 +++++++++++++++++++---------\n 1 file changed, 24 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 5f14d0488..c1f23ec02 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -2988,6 +2988,26 @@ void ice_fill_blk_tbls(struct ice_hw *hw)\n \tice_init_sw_db(hw);\n }\n \n+/**\n+ * ice_free_prof_map - free profile map\n+ * @hw: pointer to the hardware structure\n+ * @blk_idx: HW block index\n+ */\n+static void ice_free_prof_map(struct ice_hw *hw, u8 blk_idx)\n+{\n+\tstruct ice_es *es = &hw->blk[blk_idx].es;\n+\tstruct ice_prof_map *del, *tmp;\n+\n+\tice_acquire_lock(&es->prof_map_lock);\n+\tLIST_FOR_EACH_ENTRY_SAFE(del, tmp, &es->prof_map,\n+\t\t\t\t ice_prof_map, list) {\n+\t\tLIST_DEL(&del->list);\n+\t\tice_free(hw, del);\n+\t}\n+\tINIT_LIST_HEAD(&es->prof_map);\n+\tice_release_lock(&es->prof_map_lock);\n+}\n+\n /**\n  * ice_free_flow_profs - free flow profile entries\n  * @hw: pointer to the hardware structure\n@@ -2997,10 +3017,7 @@ static void ice_free_flow_profs(struct ice_hw *hw, u8 blk_idx)\n {\n \tstruct ice_flow_prof *p, *tmp;\n \n-\t/* This call is being made as part of resource deallocation\n-\t * during unload. Lock acquire and release will not be\n-\t * necessary here.\n-\t */\n+\tice_acquire_lock(&hw->fl_profs_locks[blk_idx]);\n \tLIST_FOR_EACH_ENTRY_SAFE(p, tmp, &hw->fl_profs[blk_idx],\n \t\t\t\t ice_flow_prof, l_entry) {\n \t\tstruct ice_flow_entry *e, *t;\n@@ -3014,6 +3031,7 @@ static void ice_free_flow_profs(struct ice_hw *hw, u8 blk_idx)\n \t\t\tice_free(hw, p->acts);\n \t\tice_free(hw, p);\n \t}\n+\tice_release_lock(&hw->fl_profs_locks[blk_idx]);\n \n \t/* if driver is in reset and tables are being cleared\n \t * re-initialize the flow profile list heads\n@@ -3050,17 +3068,12 @@ void ice_free_hw_tbls(struct ice_hw *hw)\n \tfor (i = 0; i < ICE_BLK_COUNT; i++) {\n \t\tif (hw->blk[i].is_list_init) {\n \t\t\tstruct ice_es *es = &hw->blk[i].es;\n-\t\t\tstruct ice_prof_map *del, *tmp;\n-\n-\t\t\tLIST_FOR_EACH_ENTRY_SAFE(del, tmp, &es->prof_map,\n-\t\t\t\t\t\t ice_prof_map, list) {\n-\t\t\t\tLIST_DEL(&del->list);\n-\t\t\t\tice_free(hw, del);\n-\t\t\t}\n \n+\t\t\tice_free_prof_map(hw, i);\n \t\t\tice_destroy_lock(&es->prof_map_lock);\n \t\t\tice_free_flow_profs(hw, i);\n \t\t\tice_destroy_lock(&hw->fl_profs_locks[i]);\n+\n \t\t\thw->blk[i].is_list_init = false;\n \t\t}\n \t\tice_free_vsig_tbl(hw, (enum ice_block)i);\n",
    "prefixes": [
        "v3",
        "67/69"
    ]
}