get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57925,
    "url": "https://patches.dpdk.org/api/patches/57925/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-50-qi.z.zhang@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": "<20190826105105.19121-50-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-50-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:50:51",
    "name": "[49/63] net/ice/base: refactor removal of VLAN promiscuous rules",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0f1cf1f17186c6a3d3433c4214db86d493c2c203",
    "submitter": {
        "id": 504,
        "url": "https://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-50-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 6119,
            "url": "https://patches.dpdk.org/api/series/6119/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6119",
            "date": "2019-08-26T10:50:02",
            "name": "net/ice/base: update base code",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/6119/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/57925/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/57925/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 DFBBC1C20F;\n\tMon, 26 Aug 2019 12:51:18 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id B66171BFE5\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:49:55 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Aug 2019 03:49:55 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:49:53 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,431,1559545200\"; d=\"scan'208\";a=\"182402491\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "wenzhuo.lu@intel.com,\n\tqiming.yang@intel.com",
        "Cc": "dev@dpdk.org, xiaolong.ye@intel.com, Qi Zhang <qi.z.zhang@intel.com>,\n\tBrett Creeley <brett.creeley@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon, 26 Aug 2019 18:50:51 +0800",
        "Message-Id": "<20190826105105.19121-50-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "References": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 49/63] net/ice/base: refactor removal of VLAN\n\tpromiscuous rules",
        "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": "Currently ice_clear_vsi_promisc() detects if the VLAN ID sent is not 0\nand sets the recipe_id to ICE_SW_LKUP_PROMISC_VLAN in that case and\nICE_SW_LKUP_PROMISC if the VLAN_ID is 0. However this doesn't allow VLAN\n0 promiscuous rules to be removed, but they can be added. Fix this by\nchecking if the promisc_mask contains ICE_PROMISC_VLAN_RX or\nICE_PROMISC_VLAN_TX. This change was made to match what is being done\nfor ice_set_vsi_promisc().\n\nSigned-off-by: Brett Creeley <brett.creeley@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_switch.c | 13 +++++++++----\n 1 file changed, 9 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 9e85da530..1f077d562 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -3977,7 +3977,7 @@ ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n \tif (!ice_is_vsi_valid(hw, vsi_handle))\n \t\treturn ICE_ERR_PARAM;\n \n-\tif (vid)\n+\tif (promisc_mask & (ICE_PROMISC_VLAN_RX | ICE_PROMISC_VLAN_TX))\n \t\trecipe_id = ICE_SW_LKUP_PROMISC_VLAN;\n \telse\n \t\trecipe_id = ICE_SW_LKUP_PROMISC;\n@@ -3990,13 +3990,18 @@ ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n \tice_acquire_lock(rule_lock);\n \tLIST_FOR_EACH_ENTRY(itr, rule_head,\n \t\t\t    ice_fltr_mgmt_list_entry, list_entry) {\n+\t\tstruct ice_fltr_info *fltr_info;\n \t\tu8 fltr_promisc_mask = 0;\n \n \t\tif (!ice_vsi_uses_fltr(itr, vsi_handle))\n \t\t\tcontinue;\n+\t\tfltr_info = &itr->fltr_info;\n+\n+\t\tif (recipe_id == ICE_SW_LKUP_PROMISC_VLAN &&\n+\t\t    vid != fltr_info->l_data.mac_vlan.vlan_id)\n+\t\t\tcontinue;\n \n-\t\tfltr_promisc_mask |=\n-\t\t\tice_determine_promisc_mask(&itr->fltr_info);\n+\t\tfltr_promisc_mask |= ice_determine_promisc_mask(fltr_info);\n \n \t\t/* Skip if filter is not completely specified by given mask */\n \t\tif (fltr_promisc_mask & ~promisc_mask)\n@@ -4004,7 +4009,7 @@ ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n \n \t\tstatus = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,\n \t\t\t\t\t\t\t&remove_list_head,\n-\t\t\t\t\t\t\t&itr->fltr_info);\n+\t\t\t\t\t\t\tfltr_info);\n \t\tif (status) {\n \t\t\tice_release_lock(rule_lock);\n \t\t\tgoto free_fltr_list;\n",
    "prefixes": [
        "49/63"
    ]
}