get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57912,
    "url": "http://patches.dpdk.org/api/patches/57912/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-17-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": "<20190826105105.19121-17-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-17-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:50:18",
    "name": "[16/63] net/ice/base: move VSI to VSI group",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c0c9678ae8dc32cef74e73b4c4cd64301d4ee047",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@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/20190826105105.19121-17-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 6119,
            "url": "http://patches.dpdk.org/api/series/6119/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6119",
            "date": "2019-08-26T10:50:02",
            "name": "net/ice/base: update base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6119/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/57912/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/57912/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 1A3C81BFEA;\n\tMon, 26 Aug 2019 12:49:25 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id C828D1C032\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:48:54 +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:48:54 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:48:52 -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=\"182402149\"",
        "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\tVignesh Sridhar <vignesh.sridhar@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon, 26 Aug 2019 18:50:18 +0800",
        "Message-Id": "<20190826105105.19121-17-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 16/63] net/ice/base: move VSI to VSI group",
        "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 add a VSI to a given VSIG and update package with this\nentry. The usual flow in XLT management would iterate through all\ncharacteristics of the input VSI and create a new VSIG and TCAMs till a\nmatching characteristic is found. When a match is found the VSI is moved\ninto a matching VSIG and entries are collapsed, leading to added package\nupdate calls. This function serves as an optimization if we know\nbeforehand that the input VSI has characteristics same as VSI configured\npreviously added to a VSIG. This is particularly useful for VF VSIs\nwhich are all usually programmed with the same configurations.\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 | 41 ++++++++++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_flex_pipe.h |  2 ++\n drivers/net/ice/base/ice_flow.c      | 28 ++++++++++++++++++++++++\n drivers/net/ice/base/ice_flow.h      |  4 +++-\n 4 files changed, 74 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 5a5dbff5b..00e1ec7bd 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -4772,6 +4772,47 @@ ice_find_prof_vsig(struct ice_hw *hw, enum ice_block blk, u64 hdl, u16 *vsig)\n }\n \n /**\n+ * ice_add_vsi_flow - add VSI flow\n+ * @hw: pointer to the HW struct\n+ * @blk: hardware block\n+ * @vsi: input VSI\n+ * @vsig: target VSIG to include the input VSI\n+ *\n+ * Calling this function will add the VSI to a given VSIG and\n+ * update the HW tables accordingly. This call can be used to\n+ * add multiple VSIs to a VSIG if we know beforehand that those\n+ * VSIs have the same characteristics of the VSIG. This will\n+ * save time in generating a new VSIG and TCAMs till a match is\n+ * found and subsequent rollback when a matching VSIG is found.\n+ */\n+enum ice_status\n+ice_add_vsi_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)\n+{\n+\tstruct ice_chs_chg *tmp, *del;\n+\tstruct LIST_HEAD_TYPE chg;\n+\tenum ice_status status;\n+\n+\t/* if target VSIG is default the move is invalid */\n+\tif ((vsig & ICE_VSIG_IDX_M) == ICE_DEFAULT_VSIG)\n+\t\treturn ICE_ERR_PARAM;\n+\n+\tINIT_LIST_HEAD(&chg);\n+\n+\t/* move VSI to the VSIG that matches */\n+\tstatus = ice_move_vsi(hw, blk, vsi, vsig, &chg);\n+\t/* update hardware if success */\n+\tif (!status)\n+\t\tstatus = ice_upd_prof_hw(hw, blk, &chg);\n+\n+\tLIST_FOR_EACH_ENTRY_SAFE(del, tmp, &chg, ice_chs_chg, list_entry) {\n+\t\tLIST_DEL(&del->list_entry);\n+\t\tice_free(hw, del);\n+\t}\n+\n+\treturn status;\n+}\n+\n+/**\n  * ice_add_prof_id_flow - add profile flow\n  * @hw: pointer to the HW struct\n  * @blk: hardware block\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h\nindex 2801e1b50..f01dfbb98 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.h\n+++ b/drivers/net/ice/base/ice_flex_pipe.h\n@@ -50,6 +50,8 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],\n struct ice_prof_map *\n ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id);\n enum ice_status\n+ice_add_vsi_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig);\n+enum ice_status\n ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);\n enum ice_status\n ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);\ndiff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex 36d31fa13..fb9041b3e 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -1112,6 +1112,34 @@ ice_flow_rem_prof_sync(struct ice_hw *hw, enum ice_block blk,\n }\n \n /**\n+ * ice_flow_assoc_vsig_vsi - associate a VSI with VSIG\n+ * @hw: pointer to the hardware structure\n+ * @blk: classification stage\n+ * @vsi_handle: software VSI handle\n+ * @vsig: target VSI group\n+ *\n+ * Assumption: the caller has already verified that the VSI to\n+ * be added has the same characteristics as the VSIG and will\n+ * thereby have access to all resources added to that VSIG.\n+ */\n+enum ice_status\n+ice_flow_assoc_vsig_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi_handle,\n+\t\t\tu16 vsig)\n+{\n+\tenum ice_status status;\n+\n+\tif (!ice_is_vsi_valid(hw, vsi_handle) || blk >= ICE_BLK_COUNT)\n+\t\treturn ICE_ERR_PARAM;\n+\n+\tice_acquire_lock(&hw->fl_profs_locks[blk]);\n+\tstatus = ice_add_vsi_flow(hw, blk, ice_get_hw_vsi_num(hw, vsi_handle),\n+\t\t\t\t  vsig);\n+\tice_release_lock(&hw->fl_profs_locks[blk]);\n+\n+\treturn status;\n+}\n+\n+/**\n  * ice_flow_assoc_prof - associate a VSI with a flow profile\n  * @hw: pointer to the hardware structure\n  * @blk: classification stage\ndiff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h\nindex c6442dc14..3a0fd23c4 100644\n--- a/drivers/net/ice/base/ice_flow.h\n+++ b/drivers/net/ice/base/ice_flow.h\n@@ -317,7 +317,9 @@ ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,\n \t\t  struct ice_flow_prof **prof);\n enum ice_status\n ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id);\n-\n+enum ice_status\n+ice_flow_assoc_vsig_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi_handle,\n+\t\t\tu16 vsig);\n enum ice_status\n ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id,\n \t\t     u8 *hw_prof);\n",
    "prefixes": [
        "16/63"
    ]
}