get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 70774,
    "url": "http://patches.dpdk.org/api/patches/70774/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200603024016.30636-13-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": "<20200603024016.30636-13-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200603024016.30636-13-qi.z.zhang@intel.com",
    "date": "2020-06-03T02:39:36",
    "name": "[12/52] net/ice/base: consolidate VF Promiscuous mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "69641c7642111967762acc86b340d57ce9e44415",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200603024016.30636-13-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 10300,
            "url": "http://patches.dpdk.org/api/series/10300/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10300",
            "date": "2020-06-03T02:39:24",
            "name": "net/ice: base code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10300/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/70774/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/70774/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 8304BA04EF;\n\tWed,  3 Jun 2020 04:38:20 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AB68A1C1B8;\n\tWed,  3 Jun 2020 04:36:47 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 1F4A31C1B4\n for <dev@dpdk.org>; Wed,  3 Jun 2020 04:36:44 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Jun 2020 19:36:44 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.82])\n by orsmga001.jf.intel.com with ESMTP; 02 Jun 2020 19:36:42 -0700"
        ],
        "IronPort-SDR": [
            "\n 9yZtmM6qFqLDr13HE79YxcglBQ+/I4tEiAxKHKXhSiIOKPSY0W5+vd9WP/8+5e+R7g5oUQuHV3\n W22KB8mY4W4Q==",
            "\n CP0wUu+6ZYj6abQ1/vXcBuZmM0Py5OC9VF9wIoWhdVfaxBcXsaMesKTh5rFXyotrrpwrbOHIUN\n ClFGJbB4dXMg=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,466,1583222400\"; d=\"scan'208\";a=\"347613927\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com",
        "Cc": "dev@dpdk.org, xiaolong.ye@intel.com, Qi Zhang <qi.z.zhang@intel.com>,\n Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>,\n \"Paul M . Stillwell Jr\" <paul.m.stillwell.jr@intel.com>",
        "Date": "Wed,  3 Jun 2020 10:39:36 +0800",
        "Message-Id": "<20200603024016.30636-13-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200603024016.30636-1-qi.z.zhang@intel.com>",
        "References": "<20200603024016.30636-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 12/52] net/ice/base: consolidate VF Promiscuous\n\tmode",
        "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": "Consolidate the Promiscuous rule for SMBM on the chosen logical port.\n\nSigned-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@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 | 145 ++++++++++++++++++++++++++++++--------\n 1 file changed, 115 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 910fb5236..f5dd86bf4 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -4354,17 +4354,17 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi)\n }\n \n /**\n- * ice_get_vsi_promisc - get promiscuous mode of given VSI\n+ * _ice_get_vsi_promisc - get promiscuous mode of given VSI\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to retrieve info from\n  * @promisc_mask: pointer to mask to be filled in\n  * @vid: VLAN ID of promisc VLAN VSI\n+ * @sw: pointer to switch info struct for which function add rule\n  */\n-enum ice_status\n-ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n-\t\t    u16 *vid)\n+static enum ice_status\n+_ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n+\t\t     u16 *vid, struct ice_switch_info *sw)\n {\n-\tstruct ice_switch_info *sw = hw->switch_info;\n \tstruct ice_fltr_mgmt_list_entry *itr;\n \tstruct LIST_HEAD_TYPE *rule_head;\n \tstruct ice_lock *rule_lock;\t/* Lock to protect filter rule list */\n@@ -4394,17 +4394,32 @@ ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n }\n \n /**\n- * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI\n+ * ice_get_vsi_promisc - get promiscuous mode of given VSI\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to retrieve info from\n  * @promisc_mask: pointer to mask to be filled in\n  * @vid: VLAN ID of promisc VLAN VSI\n  */\n enum ice_status\n-ice_get_vsi_vlan_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n-\t\t\t u16 *vid)\n+ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n+\t\t    u16 *vid)\n+{\n+\treturn _ice_get_vsi_promisc(hw, vsi_handle, promisc_mask,\n+\t\t\t\t    vid, hw->switch_info);\n+}\n+\n+/**\n+ * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: VSI handle to retrieve info from\n+ * @promisc_mask: pointer to mask to be filled in\n+ * @vid: VLAN ID of promisc VLAN VSI\n+ * @sw: pointer to switch info struct for which function add rule\n+ */\n+static enum ice_status\n+_ice_get_vsi_vlan_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n+\t\t\t  u16 *vid, struct ice_switch_info *sw)\n {\n-\tstruct ice_switch_info *sw = hw->switch_info;\n \tstruct ice_fltr_mgmt_list_entry *itr;\n \tstruct LIST_HEAD_TYPE *rule_head;\n \tstruct ice_lock *rule_lock;\t/* Lock to protect filter rule list */\n@@ -4434,6 +4449,21 @@ ice_get_vsi_vlan_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n }\n \n /**\n+ * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: VSI handle to retrieve info from\n+ * @promisc_mask: pointer to mask to be filled in\n+ * @vid: VLAN ID of promisc VLAN VSI\n+ */\n+enum ice_status\n+ice_get_vsi_vlan_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,\n+\t\t\t u16 *vid)\n+{\n+\treturn _ice_get_vsi_vlan_promisc(hw, vsi_handle, promisc_mask,\n+\t\t\t\t\t vid, hw->switch_info);\n+}\n+\n+/**\n  * ice_remove_promisc - Remove promisc based filter rules\n  * @hw: pointer to the hardware structure\n  * @recp_id: recipe ID for which the rule needs to removed\n@@ -4458,17 +4488,17 @@ ice_remove_promisc(struct ice_hw *hw, u8 recp_id,\n }\n \n /**\n- * ice_clear_vsi_promisc - clear specified promiscuous mode(s) for given VSI\n+ * _ice_clear_vsi_promisc - clear specified promiscuous mode(s)\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to clear mode\n  * @promisc_mask: mask of promiscuous config bits to clear\n  * @vid: VLAN ID to clear VLAN promiscuous\n+ * @sw: pointer to switch info struct for which function add rule\n  */\n-enum ice_status\n-ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n-\t\t      u16 vid)\n+static enum ice_status\n+_ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n+\t\t       u16 vid, struct ice_switch_info *sw)\n {\n-\tstruct ice_switch_info *sw = hw->switch_info;\n \tstruct ice_fltr_list_entry *fm_entry, *tmp;\n \tstruct LIST_HEAD_TYPE remove_list_head;\n \tstruct ice_fltr_mgmt_list_entry *itr;\n@@ -4533,14 +4563,32 @@ ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n }\n \n /**\n- * ice_set_vsi_promisc - set given VSI to given promiscuous mode(s)\n+ * ice_clear_vsi_promisc - clear specified promiscuous mode(s) for given VSI\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: VSI handle to clear mode\n+ * @promisc_mask: mask of promiscuous config bits to clear\n+ * @vid: VLAN ID to clear VLAN promiscuous\n+ */\n+enum ice_status\n+ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,\n+\t\t      u8 promisc_mask, u16 vid)\n+{\n+\treturn _ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask,\n+\t\t\t\t      vid, hw->switch_info);\n+}\n+\n+/**\n+ * _ice_set_vsi_promisc - set given VSI to given promiscuous mode(s)\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to configure\n  * @promisc_mask: mask of promiscuous config bits\n  * @vid: VLAN ID to set VLAN promiscuous\n+ * @lport: logical port number to configure promisc mode\n+ * @sw: pointer to switch info struct for which function add rule\n  */\n-enum ice_status\n-ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid)\n+static enum ice_status\n+_ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n+\t\t     u16 vid, u8 lport, struct ice_switch_info *sw)\n {\n \tenum { UCAST_FLTR = 1, MCAST_FLTR, BCAST_FLTR };\n \tstruct ice_fltr_list_entry f_list_entry;\n@@ -4631,17 +4679,16 @@ ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid)\n \t\t\tnew_fltr.src = hw_vsi_id;\n \t\t} else {\n \t\t\tnew_fltr.flag |= ICE_FLTR_RX;\n-\t\t\tnew_fltr.src = hw->port_info->lport;\n+\t\t\tnew_fltr.src = lport;\n \t\t}\n \n \t\tnew_fltr.fltr_act = ICE_FWD_TO_VSI;\n \t\tnew_fltr.vsi_handle = vsi_handle;\n \t\tnew_fltr.fwd_id.hw_vsi_id = hw_vsi_id;\n \t\tf_list_entry.fltr_info = new_fltr;\n-\t\trecp_list = &hw->switch_info->recp_list[recipe_id];\n+\t\trecp_list = &sw->recp_list[recipe_id];\n \n-\t\tstatus = ice_add_rule_internal(hw, recp_list,\n-\t\t\t\t\t       hw->port_info->lport,\n+\t\tstatus = ice_add_rule_internal(hw, recp_list, lport,\n \t\t\t\t\t       &f_list_entry);\n \t\tif (status != ICE_SUCCESS)\n \t\t\tgoto set_promisc_exit;\n@@ -4652,19 +4699,37 @@ ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid)\n }\n \n /**\n- * ice_set_vlan_vsi_promisc\n+ * ice_set_vsi_promisc - set given VSI to given promiscuous mode(s)\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: VSI handle to configure\n+ * @promisc_mask: mask of promiscuous config bits\n+ * @vid: VLAN ID to set VLAN promiscuous\n+ */\n+enum ice_status\n+ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n+\t\t    u16 vid)\n+{\n+\treturn _ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid,\n+\t\t\t\t    hw->port_info->lport,\n+\t\t\t\t    hw->switch_info);\n+}\n+\n+/**\n+ * _ice_set_vlan_vsi_promisc\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to configure\n  * @promisc_mask: mask of promiscuous config bits\n  * @rm_vlan_promisc: Clear VLANs VSI promisc mode\n+ * @lport: logical port number to configure promisc mode\n+ * @sw: pointer to switch info struct for which function add rule\n  *\n  * Configure VSI with all associated VLANs to given promiscuous mode(s)\n  */\n-enum ice_status\n-ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n-\t\t\t bool rm_vlan_promisc)\n+static enum ice_status\n+_ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n+\t\t\t  bool rm_vlan_promisc, u8 lport,\n+\t\t\t  struct ice_switch_info *sw)\n {\n-\tstruct ice_switch_info *sw = hw->switch_info;\n \tstruct ice_fltr_list_entry *list_itr, *tmp;\n \tstruct LIST_HEAD_TYPE vsi_list_head;\n \tstruct LIST_HEAD_TYPE *vlan_head;\n@@ -4686,11 +4751,13 @@ ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n \t\t\t    list_entry) {\n \t\tvlan_id = list_itr->fltr_info.l_data.vlan.vlan_id;\n \t\tif (rm_vlan_promisc)\n-\t\t\tstatus = ice_clear_vsi_promisc(hw, vsi_handle,\n-\t\t\t\t\t\t       promisc_mask, vlan_id);\n+\t\t\tstatus =  _ice_clear_vsi_promisc(hw, vsi_handle,\n+\t\t\t\t\t\t\t promisc_mask,\n+\t\t\t\t\t\t\t vlan_id, sw);\n \t\telse\n-\t\t\tstatus = ice_set_vsi_promisc(hw, vsi_handle,\n-\t\t\t\t\t\t     promisc_mask, vlan_id);\n+\t\t\tstatus =  _ice_set_vsi_promisc(hw, vsi_handle,\n+\t\t\t\t\t\t       promisc_mask, vlan_id,\n+\t\t\t\t\t\t       lport, sw);\n \t\tif (status)\n \t\t\tbreak;\n \t}\n@@ -4705,6 +4772,24 @@ ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n }\n \n /**\n+ * ice_set_vlan_vsi_promisc\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: VSI handle to configure\n+ * @promisc_mask: mask of promiscuous config bits\n+ * @rm_vlan_promisc: Clear VLANs VSI promisc mode\n+ *\n+ * Configure VSI with all associated VLANs to given promiscuous mode(s)\n+ */\n+enum ice_status\n+ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,\n+\t\t\t bool rm_vlan_promisc)\n+{\n+\treturn _ice_set_vlan_vsi_promisc(hw, vsi_handle, promisc_mask,\n+\t\t\t\t\t rm_vlan_promisc, hw->port_info->lport,\n+\t\t\t\t\t hw->switch_info);\n+}\n+\n+/**\n  * ice_remove_vsi_lkup_fltr - Remove lookup type filters for a VSI\n  * @hw: pointer to the hardware structure\n  * @vsi_handle: VSI handle to remove filters from\n",
    "prefixes": [
        "12/52"
    ]
}