get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54709,
    "url": "http://patches.dpdk.org/api/patches/54709/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190611155221.2703-51-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": "<20190611155221.2703-51-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190611155221.2703-51-leyi.rong@intel.com",
    "date": "2019-06-11T15:52:05",
    "name": "[v2,50/66] net/ice/base: cleanup ice flex pipe files",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "02a0a24bfdddc9e20266239df379f6b3703b777a",
    "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/20190611155221.2703-51-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4981,
            "url": "http://patches.dpdk.org/api/series/4981/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4981",
            "date": "2019-06-11T15:51:15",
            "name": "shared code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4981/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54709/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54709/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 84AE41C5D8;\n\tTue, 11 Jun 2019 17:55:29 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 843C11C24E\n\tfor <dev@dpdk.org>; Tue, 11 Jun 2019 17:54:41 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jun 2019 08:54:40 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga001.jf.intel.com with ESMTP; 11 Jun 2019 08:54:38 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tBruce Allan <bruce.w.allan@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue, 11 Jun 2019 23:52:05 +0800",
        "Message-Id": "<20190611155221.2703-51-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190611155221.2703-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>\n\t<20190611155221.2703-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 50/66] net/ice/base: cleanup ice flex pipe\n\tfiles",
        "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": "Make functions that can be, static. Remove some code that is not\ncurrently called.\n\nSigned-off-by: Bruce Allan <bruce.w.allan@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 | 579 ++++-----------------------\n drivers/net/ice/base/ice_flex_pipe.h |  59 ---\n 2 files changed, 78 insertions(+), 560 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 8f19b9fef..c136c03db 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -461,7 +461,7 @@ ice_enum_labels(struct ice_seg *ice_seg, u32 type, struct ice_pkg_enum *state,\n  * since the first call to ice_enum_labels requires a pointer to an actual\n  * ice_seg structure.\n  */\n-void ice_init_pkg_hints(struct ice_hw *hw, struct ice_seg *ice_seg)\n+static void ice_init_pkg_hints(struct ice_hw *hw, struct ice_seg *ice_seg)\n {\n \tstruct ice_pkg_enum state;\n \tchar *label_name;\n@@ -808,27 +808,6 @@ ice_aq_download_pkg(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf,\n \treturn status;\n }\n \n-/**\n- * ice_aq_upload_section\n- * @hw: pointer to the hardware structure\n- * @pkg_buf: the package buffer which will receive the section\n- * @buf_size: the size of the package buffer\n- * @cd: pointer to command details structure or NULL\n- *\n- * Upload Section (0x0C41)\n- */\n-enum ice_status\n-ice_aq_upload_section(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf,\n-\t\t      u16 buf_size, struct ice_sq_cd *cd)\n-{\n-\tstruct ice_aq_desc desc;\n-\n-\tice_debug(hw, ICE_DBG_TRACE, \"ice_aq_upload_section\");\n-\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_upload_section);\n-\tdesc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);\n-\n-\treturn ice_aq_send_cmd(hw, &desc, pkg_buf, buf_size, cd);\n-}\n \n /**\n  * ice_aq_update_pkg\n@@ -890,7 +869,7 @@ ice_aq_update_pkg(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf, u16 buf_size,\n  * success it returns a pointer to the segment header, otherwise it will\n  * return NULL.\n  */\n-struct ice_generic_seg_hdr *\n+static struct ice_generic_seg_hdr *\n ice_find_seg_in_pkg(struct ice_hw *hw, u32 seg_type,\n \t\t    struct ice_pkg_hdr *pkg_hdr)\n {\n@@ -1052,7 +1031,8 @@ ice_aq_get_pkg_info_list(struct ice_hw *hw,\n  *\n  * Handles the download of a complete package.\n  */\n-enum ice_status ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg)\n+static enum ice_status\n+ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg)\n {\n \tstruct ice_buf_table *ice_buf_tbl;\n \n@@ -1081,7 +1061,7 @@ enum ice_status ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg)\n  *\n  * Saves off the package details into the HW structure.\n  */\n-enum ice_status\n+static enum ice_status\n ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr)\n {\n \tstruct ice_global_metadata_seg *meta_seg;\n@@ -1133,8 +1113,7 @@ ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr)\n  *\n  * Store details of the package currently loaded in HW into the HW structure.\n  */\n-enum ice_status\n-ice_get_pkg_info(struct ice_hw *hw)\n+static enum ice_status ice_get_pkg_info(struct ice_hw *hw)\n {\n \tstruct ice_aqc_get_pkg_info_resp *pkg_info;\n \tenum ice_status status;\n@@ -1187,40 +1166,6 @@ ice_get_pkg_info(struct ice_hw *hw)\n \treturn status;\n }\n \n-/**\n- * ice_find_label_value\n- * @ice_seg: pointer to the ice segment (non-NULL)\n- * @name: name of the label to search for\n- * @type: the section type that will contain the label\n- * @value: pointer to a value that will return the label's value if found\n- *\n- * Finds a label's value given the label name and the section type to search.\n- * The ice_seg parameter must not be NULL since the first call to\n- * ice_enum_labels requires a pointer to an actual ice_seg structure.\n- */\n-enum ice_status\n-ice_find_label_value(struct ice_seg *ice_seg, char const *name, u32 type,\n-\t\t     u16 *value)\n-{\n-\tstruct ice_pkg_enum state;\n-\tchar *label_name;\n-\tu16 val;\n-\n-\tif (!ice_seg)\n-\t\treturn ICE_ERR_PARAM;\n-\n-\tdo {\n-\t\tlabel_name = ice_enum_labels(ice_seg, type, &state, &val);\n-\t\tif (label_name && !strcmp(label_name, name)) {\n-\t\t\t*value = val;\n-\t\t\treturn ICE_SUCCESS;\n-\t\t}\n-\n-\t\tice_seg = NULL;\n-\t} while (label_name);\n-\n-\treturn ICE_ERR_CFG;\n-}\n \n /**\n  * ice_verify_pkg - verify package\n@@ -1499,7 +1444,7 @@ enum ice_status ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len)\n  * Allocates a package buffer and returns a pointer to the buffer header.\n  * Note: all package contents must be in Little Endian form.\n  */\n-struct ice_buf_build *ice_pkg_buf_alloc(struct ice_hw *hw)\n+static struct ice_buf_build *ice_pkg_buf_alloc(struct ice_hw *hw)\n {\n \tstruct ice_buf_build *bld;\n \tstruct ice_buf_hdr *buf;\n@@ -1623,40 +1568,15 @@ ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,\n }\n \n /**\n- * ice_pkg_buf_alloc_single_section\n+ * ice_pkg_buf_free\n  * @hw: pointer to the HW structure\n- * @type: the section type value\n- * @size: the size of the section to reserve (in bytes)\n- * @section: returns pointer to the section\n+ * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())\n  *\n- * Allocates a package buffer with a single section.\n- * Note: all package contents must be in Little Endian form.\n+ * Frees a package buffer\n  */\n-static struct ice_buf_build *\n-ice_pkg_buf_alloc_single_section(struct ice_hw *hw, u32 type, u16 size,\n-\t\t\t\t void **section)\n+static void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld)\n {\n-\tstruct ice_buf_build *buf;\n-\n-\tif (!section)\n-\t\treturn NULL;\n-\n-\tbuf = ice_pkg_buf_alloc(hw);\n-\tif (!buf)\n-\t\treturn NULL;\n-\n-\tif (ice_pkg_buf_reserve_section(buf, 1))\n-\t\tgoto ice_pkg_buf_alloc_single_section_err;\n-\n-\t*section = ice_pkg_buf_alloc_section(buf, type, size);\n-\tif (!*section)\n-\t\tgoto ice_pkg_buf_alloc_single_section_err;\n-\n-\treturn buf;\n-\n-ice_pkg_buf_alloc_single_section_err:\n-\tice_pkg_buf_free(hw, buf);\n-\treturn NULL;\n+\tice_free(hw, bld);\n }\n \n /**\n@@ -1672,7 +1592,7 @@ ice_pkg_buf_alloc_single_section(struct ice_hw *hw, u32 type, u16 size,\n  * result in some wasted space in the buffer.\n  * Note: all package contents must be in Little Endian form.\n  */\n-enum ice_status\n+static enum ice_status\n ice_pkg_buf_reserve_section(struct ice_buf_build *bld, u16 count)\n {\n \tstruct ice_buf_hdr *buf;\n@@ -1700,48 +1620,6 @@ ice_pkg_buf_reserve_section(struct ice_buf_build *bld, u16 count)\n \treturn ICE_SUCCESS;\n }\n \n-/**\n- * ice_pkg_buf_unreserve_section\n- * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())\n- * @count: the number of sections to unreserve\n- *\n- * Unreserves one or more section table entries in a package buffer, releasing\n- * space that can be used for section data. This routine can be called\n- * multiple times as long as they are made before calling\n- * ice_pkg_buf_alloc_section(). Once ice_pkg_buf_alloc_section()\n- * is called once, the number of sections that can be allocated will not be able\n- * to be increased; not using all reserved sections is fine, but this will\n- * result in some wasted space in the buffer.\n- * Note: all package contents must be in Little Endian form.\n- */\n-enum ice_status\n-ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count)\n-{\n-\tstruct ice_buf_hdr *buf;\n-\tu16 section_count;\n-\tu16 data_end;\n-\n-\tif (!bld)\n-\t\treturn ICE_ERR_PARAM;\n-\n-\tbuf = (struct ice_buf_hdr *)&bld->buf;\n-\n-\t/* already an active section, can't decrease table size */\n-\tsection_count = LE16_TO_CPU(buf->section_count);\n-\tif (section_count > 0)\n-\t\treturn ICE_ERR_CFG;\n-\n-\tif (count > bld->reserved_section_table_entries)\n-\t\treturn ICE_ERR_CFG;\n-\tbld->reserved_section_table_entries -= count;\n-\n-\tdata_end = LE16_TO_CPU(buf->data_end) -\n-\t\t   (count * sizeof(buf->section_entry[0]));\n-\tbuf->data_end = CPU_TO_LE16(data_end);\n-\n-\treturn ICE_SUCCESS;\n-}\n-\n /**\n  * ice_pkg_buf_alloc_section\n  * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())\n@@ -1754,7 +1632,7 @@ ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count)\n  * section contents.\n  * Note: all package contents must be in Little Endian form.\n  */\n-void *\n+static void *\n ice_pkg_buf_alloc_section(struct ice_buf_build *bld, u32 type, u16 size)\n {\n \tstruct ice_buf_hdr *buf;\n@@ -1795,23 +1673,8 @@ ice_pkg_buf_alloc_section(struct ice_buf_build *bld, u32 type, u16 size)\n \treturn NULL;\n }\n \n-/**\n- * ice_pkg_buf_get_free_space\n- * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())\n- *\n- * Returns the number of free bytes remaining in the buffer.\n- * Note: all package contents must be in Little Endian form.\n- */\n-u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld)\n-{\n-\tstruct ice_buf_hdr *buf;\n \n-\tif (!bld)\n-\t\treturn 0;\n \n-\tbuf = (struct ice_buf_hdr *)&bld->buf;\n-\treturn ICE_MAX_S_DATA_END - LE16_TO_CPU(buf->data_end);\n-}\n \n /**\n  * ice_pkg_buf_get_active_sections\n@@ -1823,7 +1686,7 @@ u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld)\n  * not be used.\n  * Note: all package contents must be in Little Endian form.\n  */\n-u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)\n+static u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)\n {\n \tstruct ice_buf_hdr *buf;\n \n@@ -1840,7 +1703,7 @@ u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)\n  *\n  * Return a pointer to the buffer's header\n  */\n-struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld)\n+static struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld)\n {\n \tif (!bld)\n \t\treturn NULL;\n@@ -1848,17 +1711,6 @@ struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld)\n \treturn &bld->buf;\n }\n \n-/**\n- * ice_pkg_buf_free\n- * @hw: pointer to the HW structure\n- * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())\n- *\n- * Frees a package buffer\n- */\n-void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld)\n-{\n-\tice_free(hw, bld);\n-}\n \n /**\n  * ice_find_prot_off - find prot ID and offset pair, based on prof and FV index\n@@ -1891,38 +1743,6 @@ ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u8 fv_idx,\n \n /* PTG Management */\n \n-/**\n- * ice_ptg_update_xlt1 - Updates packet type groups in HW via XLT1 table\n- * @hw: pointer to the hardware structure\n- * @blk: HW block\n- *\n- * This function will update the XLT1 hardware table to reflect the new\n- * packet type group configuration.\n- */\n-enum ice_status ice_ptg_update_xlt1(struct ice_hw *hw, enum ice_block blk)\n-{\n-\tstruct ice_xlt1_section *sect;\n-\tstruct ice_buf_build *bld;\n-\tenum ice_status status;\n-\tu16 index;\n-\n-\tbld = ice_pkg_buf_alloc_single_section(hw, ice_sect_id(blk, ICE_XLT1),\n-\t\t\t\t\t       ICE_XLT1_SIZE(ICE_XLT1_CNT),\n-\t\t\t\t\t       (void **)&sect);\n-\tif (!bld)\n-\t\treturn ICE_ERR_NO_MEMORY;\n-\n-\tsect->count = CPU_TO_LE16(ICE_XLT1_CNT);\n-\tsect->offset = CPU_TO_LE16(0);\n-\tfor (index = 0; index < ICE_XLT1_CNT; index++)\n-\t\tsect->value[index] = hw->blk[blk].xlt1.ptypes[index].ptg;\n-\n-\tstatus = ice_update_pkg(hw, ice_pkg_buf(bld), 1);\n-\n-\tice_pkg_buf_free(hw, bld);\n-\n-\treturn status;\n-}\n \n /**\n  * ice_ptg_find_ptype - Search for packet type group using packet type (ptype)\n@@ -1935,7 +1755,7 @@ enum ice_status ice_ptg_update_xlt1(struct ice_hw *hw, enum ice_block blk)\n  * PTG ID that contains it through the ptg parameter, with the value of\n  * ICE_DEFAULT_PTG (0) meaning it is part the default PTG.\n  */\n-enum ice_status\n+static enum ice_status\n ice_ptg_find_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 *ptg)\n {\n \tif (ptype >= ICE_XLT1_CNT || !ptg)\n@@ -1969,7 +1789,7 @@ void ice_ptg_alloc_val(struct ice_hw *hw, enum ice_block blk, u8 ptg)\n  * that 0 is the default packet type group, so successfully created PTGs will\n  * have a non-zero ID value; which means a 0 return value indicates an error.\n  */\n-u8 ice_ptg_alloc(struct ice_hw *hw, enum ice_block blk)\n+static u8 ice_ptg_alloc(struct ice_hw *hw, enum ice_block blk)\n {\n \tu16 i;\n \n@@ -1984,30 +1804,6 @@ u8 ice_ptg_alloc(struct ice_hw *hw, enum ice_block blk)\n \treturn 0;\n }\n \n-/**\n- * ice_ptg_free - Frees a packet type group\n- * @hw: pointer to the hardware structure\n- * @blk: HW block\n- * @ptg: the ptg ID to free\n- *\n- * This function frees a packet type group, and returns all the current ptypes\n- * within it to the default PTG.\n- */\n-void ice_ptg_free(struct ice_hw *hw, enum ice_block blk, u8 ptg)\n-{\n-\tstruct ice_ptg_ptype *p, *temp;\n-\n-\thw->blk[blk].xlt1.ptg_tbl[ptg].in_use = false;\n-\tp = hw->blk[blk].xlt1.ptg_tbl[ptg].first_ptype;\n-\twhile (p) {\n-\t\tp->ptg = ICE_DEFAULT_PTG;\n-\t\ttemp = p->next_ptype;\n-\t\tp->next_ptype = NULL;\n-\t\tp = temp;\n-\t}\n-\n-\thw->blk[blk].xlt1.ptg_tbl[ptg].first_ptype = NULL;\n-}\n \n /**\n  * ice_ptg_remove_ptype - Removes ptype from a particular packet type group\n@@ -2066,7 +1862,7 @@ ice_ptg_remove_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)\n  * a destination PTG ID of ICE_DEFAULT_PTG (0) will move the ptype to the\n  * default PTG.\n  */\n-enum ice_status\n+static enum ice_status\n ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)\n {\n \tenum ice_status status;\n@@ -2202,70 +1998,6 @@ ice_match_prop_lst(struct LIST_HEAD_TYPE *list1, struct LIST_HEAD_TYPE *list2)\n \n /* VSIG Management */\n \n-/**\n- * ice_vsig_update_xlt2_sect - update one section of XLT2 table\n- * @hw: pointer to the hardware structure\n- * @blk: HW block\n- * @vsi: HW VSI number to program\n- * @vsig: vsig for the VSI\n- *\n- * This function will update the XLT2 hardware table with the input VSI\n- * group configuration.\n- */\n-static enum ice_status\n-ice_vsig_update_xlt2_sect(struct ice_hw *hw, enum ice_block blk, u16 vsi,\n-\t\t\t  u16 vsig)\n-{\n-\tstruct ice_xlt2_section *sect;\n-\tstruct ice_buf_build *bld;\n-\tenum ice_status status;\n-\n-\tbld = ice_pkg_buf_alloc_single_section(hw, ice_sect_id(blk, ICE_XLT2),\n-\t\t\t\t\t       sizeof(struct ice_xlt2_section),\n-\t\t\t\t\t       (void **)&sect);\n-\tif (!bld)\n-\t\treturn ICE_ERR_NO_MEMORY;\n-\n-\tsect->count = CPU_TO_LE16(1);\n-\tsect->offset = CPU_TO_LE16(vsi);\n-\tsect->value[0] = CPU_TO_LE16(vsig);\n-\n-\tstatus = ice_update_pkg(hw, ice_pkg_buf(bld), 1);\n-\n-\tice_pkg_buf_free(hw, bld);\n-\n-\treturn status;\n-}\n-\n-/**\n- * ice_vsig_update_xlt2 - update XLT2 table with VSIG configuration\n- * @hw: pointer to the hardware structure\n- * @blk: HW block\n- *\n- * This function will update the XLT2 hardware table with the input VSI\n- * group configuration of used vsis.\n- */\n-enum ice_status ice_vsig_update_xlt2(struct ice_hw *hw, enum ice_block blk)\n-{\n-\tu16 vsi;\n-\n-\tfor (vsi = 0; vsi < ICE_MAX_VSI; vsi++) {\n-\t\t/* update only vsis that have been changed */\n-\t\tif (hw->blk[blk].xlt2.vsis[vsi].changed) {\n-\t\t\tenum ice_status status;\n-\t\t\tu16 vsig;\n-\n-\t\t\tvsig = hw->blk[blk].xlt2.vsis[vsi].vsig;\n-\t\t\tstatus = ice_vsig_update_xlt2_sect(hw, blk, vsi, vsig);\n-\t\t\tif (status)\n-\t\t\t\treturn status;\n-\n-\t\t\thw->blk[blk].xlt2.vsis[vsi].changed = 0;\n-\t\t}\n-\t}\n-\n-\treturn ICE_SUCCESS;\n-}\n \n /**\n  * ice_vsig_find_vsi - find a VSIG that contains a specified VSI\n@@ -2346,7 +2078,7 @@ static u16 ice_vsig_alloc(struct ice_hw *hw, enum ice_block blk)\n  * for, the list must match exactly, including the order in which the\n  * characteristics are listed.\n  */\n-enum ice_status\n+static enum ice_status\n ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk,\n \t\t\tstruct LIST_HEAD_TYPE *chs, u16 *vsig)\n {\n@@ -2373,7 +2105,7 @@ ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk,\n  * The function will remove all VSIs associated with the input VSIG and move\n  * them to the DEFAULT_VSIG and mark the VSIG available.\n  */\n-enum ice_status\n+static enum ice_status\n ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)\n {\n \tstruct ice_vsig_prof *dtmp, *del;\n@@ -2424,6 +2156,62 @@ ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)\n \treturn ICE_SUCCESS;\n }\n \n+/**\n+ * ice_vsig_remove_vsi - remove VSI from VSIG\n+ * @hw: pointer to the hardware structure\n+ * @blk: HW block\n+ * @vsi: VSI to remove\n+ * @vsig: VSI group to remove from\n+ *\n+ * The function will remove the input VSI from its VSI group and move it\n+ * to the DEFAULT_VSIG.\n+ */\n+static enum ice_status\n+ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)\n+{\n+\tstruct ice_vsig_vsi **vsi_head, *vsi_cur, *vsi_tgt;\n+\tu16 idx;\n+\n+\tidx = vsig & ICE_VSIG_IDX_M;\n+\n+\tif (vsi >= ICE_MAX_VSI || idx >= ICE_MAX_VSIGS)\n+\t\treturn ICE_ERR_PARAM;\n+\n+\tif (!hw->blk[blk].xlt2.vsig_tbl[idx].in_use)\n+\t\treturn ICE_ERR_DOES_NOT_EXIST;\n+\n+\t/* entry already in default VSIG, don't have to remove */\n+\tif (idx == ICE_DEFAULT_VSIG)\n+\t\treturn ICE_SUCCESS;\n+\n+\tvsi_head = &hw->blk[blk].xlt2.vsig_tbl[idx].first_vsi;\n+\tif (!(*vsi_head))\n+\t\treturn ICE_ERR_CFG;\n+\n+\tvsi_tgt = &hw->blk[blk].xlt2.vsis[vsi];\n+\tvsi_cur = (*vsi_head);\n+\n+\t/* iterate the VSI list, skip over the entry to be removed */\n+\twhile (vsi_cur) {\n+\t\tif (vsi_tgt == vsi_cur) {\n+\t\t\t(*vsi_head) = vsi_cur->next_vsi;\n+\t\t\tbreak;\n+\t\t}\n+\t\tvsi_head = &vsi_cur->next_vsi;\n+\t\tvsi_cur = vsi_cur->next_vsi;\n+\t}\n+\n+\t/* verify if VSI was removed from group list */\n+\tif (!vsi_cur)\n+\t\treturn ICE_ERR_DOES_NOT_EXIST;\n+\n+\tvsi_cur->vsig = ICE_DEFAULT_VSIG;\n+\tvsi_cur->changed = 1;\n+\tvsi_cur->next_vsi = NULL;\n+\n+\treturn ICE_SUCCESS;\n+}\n+\n /**\n  * ice_vsig_add_mv_vsi - add or move a VSI to a VSI group\n  * @hw: pointer to the hardware structure\n@@ -2436,7 +2224,7 @@ ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)\n  * move the entry to the DEFAULT_VSIG, update the original VSIG and\n  * then move entry to the new VSIG.\n  */\n-enum ice_status\n+static enum ice_status\n ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)\n {\n \tstruct ice_vsig_vsi *tmp;\n@@ -2487,62 +2275,6 @@ ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)\n \treturn ICE_SUCCESS;\n }\n \n-/**\n- * ice_vsig_remove_vsi - remove VSI from VSIG\n- * @hw: pointer to the hardware structure\n- * @blk: HW block\n- * @vsi: VSI to remove\n- * @vsig: VSI group to remove from\n- *\n- * The function will remove the input VSI from its VSI group and move it\n- * to the DEFAULT_VSIG.\n- */\n-enum ice_status\n-ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)\n-{\n-\tstruct ice_vsig_vsi **vsi_head, *vsi_cur, *vsi_tgt;\n-\tu16 idx;\n-\n-\tidx = vsig & ICE_VSIG_IDX_M;\n-\n-\tif (vsi >= ICE_MAX_VSI || idx >= ICE_MAX_VSIGS)\n-\t\treturn ICE_ERR_PARAM;\n-\n-\tif (!hw->blk[blk].xlt2.vsig_tbl[idx].in_use)\n-\t\treturn ICE_ERR_DOES_NOT_EXIST;\n-\n-\t/* entry already in default VSIG, don't have to remove */\n-\tif (idx == ICE_DEFAULT_VSIG)\n-\t\treturn ICE_SUCCESS;\n-\n-\tvsi_head = &hw->blk[blk].xlt2.vsig_tbl[idx].first_vsi;\n-\tif (!(*vsi_head))\n-\t\treturn ICE_ERR_CFG;\n-\n-\tvsi_tgt = &hw->blk[blk].xlt2.vsis[vsi];\n-\tvsi_cur = (*vsi_head);\n-\n-\t/* iterate the VSI list, skip over the entry to be removed */\n-\twhile (vsi_cur) {\n-\t\tif (vsi_tgt == vsi_cur) {\n-\t\t\t(*vsi_head) = vsi_cur->next_vsi;\n-\t\t\tbreak;\n-\t\t}\n-\t\tvsi_head = &vsi_cur->next_vsi;\n-\t\tvsi_cur = vsi_cur->next_vsi;\n-\t}\n-\n-\t/* verify if VSI was removed from group list */\n-\tif (!vsi_cur)\n-\t\treturn ICE_ERR_DOES_NOT_EXIST;\n-\n-\tvsi_cur->vsig = ICE_DEFAULT_VSIG;\n-\tvsi_cur->changed = 1;\n-\tvsi_cur->next_vsi = NULL;\n-\n-\treturn ICE_SUCCESS;\n-}\n-\n /**\n  * ice_find_prof_id - find profile ID for a given field vector\n  * @hw: pointer to the hardware structure\n@@ -3142,70 +2874,6 @@ static void ice_init_flow_profs(struct ice_hw *hw, u8 blk_idx)\n \tINIT_LIST_HEAD(&hw->fl_profs[blk_idx]);\n }\n \n-/**\n- * ice_clear_hw_tbls - clear HW tables and flow profiles\n- * @hw: pointer to the hardware structure\n- */\n-void ice_clear_hw_tbls(struct ice_hw *hw)\n-{\n-\tu8 i;\n-\n-\tfor (i = 0; i < ICE_BLK_COUNT; i++) {\n-\t\tstruct ice_prof_redir *prof_redir = &hw->blk[i].prof_redir;\n-\t\tstruct ice_prof_tcam *prof = &hw->blk[i].prof;\n-\t\tstruct ice_xlt1 *xlt1 = &hw->blk[i].xlt1;\n-\t\tstruct ice_xlt2 *xlt2 = &hw->blk[i].xlt2;\n-\t\tstruct ice_es *es = &hw->blk[i].es;\n-\n-\t\tif (hw->blk[i].is_list_init) {\n-\t\t\tstruct ice_prof_map *del, *tmp;\n-\n-\t\t\tice_acquire_lock(&es->prof_map_lock);\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-\t\t\tINIT_LIST_HEAD(&es->prof_map);\n-\t\t\tice_release_lock(&es->prof_map_lock);\n-\n-\t\t\tice_acquire_lock(&hw->fl_profs_locks[i]);\n-\t\t\tice_free_flow_profs(hw, i);\n-\t\t\tice_release_lock(&hw->fl_profs_locks[i]);\n-\t\t}\n-\n-\t\tice_free_vsig_tbl(hw, (enum ice_block)i);\n-\n-\t\tice_memset(xlt1->ptypes, 0, xlt1->count * sizeof(*xlt1->ptypes),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(xlt1->ptg_tbl, 0,\n-\t\t\t   ICE_MAX_PTGS * sizeof(*xlt1->ptg_tbl),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(xlt1->t, 0, xlt1->count * sizeof(*xlt1->t),\n-\t\t\t   ICE_NONDMA_MEM);\n-\n-\t\tice_memset(xlt2->vsis, 0, xlt2->count * sizeof(*xlt2->vsis),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(xlt2->vsig_tbl, 0,\n-\t\t\t   xlt2->count * sizeof(*xlt2->vsig_tbl),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(xlt2->t, 0, xlt2->count * sizeof(*xlt2->t),\n-\t\t\t   ICE_NONDMA_MEM);\n-\n-\t\tice_memset(prof->t, 0, prof->count * sizeof(*prof->t),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(prof_redir->t, 0,\n-\t\t\t   prof_redir->count * sizeof(*prof_redir->t),\n-\t\t\t   ICE_NONDMA_MEM);\n-\n-\t\tice_memset(es->t, 0, es->count * sizeof(*es->t),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(es->ref_count, 0, es->count * sizeof(*es->ref_count),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t\tice_memset(es->written, 0, es->count * sizeof(*es->written),\n-\t\t\t   ICE_NONDMA_MEM);\n-\t}\n-}\n \n /**\n  * ice_init_hw_tbls - init hardware table memory\n@@ -4100,43 +3768,6 @@ ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id)\n \treturn entry;\n }\n \n-/**\n- * ice_set_prof_context - Set context for a given profile\n- * @hw: pointer to the HW struct\n- * @blk: hardware block\n- * @id: profile tracking ID\n- * @cntxt: context\n- */\n-struct ice_prof_map *\n-ice_set_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 cntxt)\n-{\n-\tstruct ice_prof_map *entry;\n-\n-\tentry = ice_search_prof_id(hw, blk, id);\n-\tif (entry)\n-\t\tentry->context = cntxt;\n-\n-\treturn entry;\n-}\n-\n-/**\n- * ice_get_prof_context - Get context for a given profile\n- * @hw: pointer to the HW struct\n- * @blk: hardware block\n- * @id: profile tracking ID\n- * @cntxt: pointer to variable to receive the context\n- */\n-struct ice_prof_map *\n-ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 *cntxt)\n-{\n-\tstruct ice_prof_map *entry;\n-\n-\tentry = ice_search_prof_id(hw, blk, id);\n-\tif (entry)\n-\t\t*cntxt = entry->context;\n-\n-\treturn entry;\n-}\n \n /**\n  * ice_vsig_prof_id_count - count profiles in a VSIG\n@@ -5094,33 +4725,6 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \treturn status;\n }\n \n-/**\n- * ice_add_flow - add flow\n- * @hw: pointer to the HW struct\n- * @blk: hardware block\n- * @vsi: array of VSIs to enable with the profile specified by ID\n- * @count: number of elements in the VSI array\n- * @id: profile tracking ID\n- *\n- * Calling this function will update the hardware tables to enable the\n- * profile indicated by the ID parameter for the VSIs specified in the VSI\n- * array. Once successfully called, the flow will be enabled.\n- */\n-enum ice_status\n-ice_add_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi[], u8 count,\n-\t     u64 id)\n-{\n-\tenum ice_status status;\n-\tu16 i;\n-\n-\tfor (i = 0; i < count; i++) {\n-\t\tstatus = ice_add_prof_id_flow(hw, blk, vsi[i], id);\n-\t\tif (status)\n-\t\t\treturn status;\n-\t}\n-\n-\treturn ICE_SUCCESS;\n-}\n \n /**\n  * ice_rem_prof_from_list - remove a profile from list\n@@ -5276,30 +4880,3 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \treturn status;\n }\n \n-/**\n- * ice_rem_flow - remove flow\n- * @hw: pointer to the HW struct\n- * @blk: hardware block\n- * @vsi: array of VSIs from which to remove the profile specified by ID\n- * @count: number of elements in the VSI array\n- * @id: profile tracking ID\n- *\n- * The function will remove flows from the specified VSIs that were enabled\n- * using ice_add_flow. The ID value will indicated which profile will be\n- * removed. Once successfully called, the flow will be disabled.\n- */\n-enum ice_status\n-ice_rem_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi[], u8 count,\n-\t     u64 id)\n-{\n-\tenum ice_status status;\n-\tu16 i;\n-\n-\tfor (i = 0; i < count; i++) {\n-\t\tstatus = ice_rem_prof_id_flow(hw, blk, vsi[i], id);\n-\t\tif (status)\n-\t\t\treturn status;\n-\t}\n-\n-\treturn ICE_SUCCESS;\n-}\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h\nindex 4714fe646..7142ae7fe 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.h\n+++ b/drivers/net/ice/base/ice_flex_pipe.h\n@@ -27,66 +27,18 @@ void ice_release_change_lock(struct ice_hw *hw);\n enum ice_status\n ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u8 fv_idx,\n \t\t  u8 *prot, u16 *off);\n-struct ice_generic_seg_hdr *\n-ice_find_seg_in_pkg(struct ice_hw *hw, u32 seg_type,\n-\t\t    struct ice_pkg_hdr *pkg_hdr);\n-enum ice_status ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg);\n-\n-enum ice_status\n-ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_header);\n-enum ice_status\n-ice_get_pkg_info(struct ice_hw *hw);\n-\n-void ice_init_pkg_hints(struct ice_hw *hw, struct ice_seg *ice_seg);\n-\n enum ice_status\n ice_find_label_value(struct ice_seg *ice_seg, char const *name, u32 type,\n \t\t     u16 *value);\n enum ice_status\n ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,\n \t\t   struct LIST_HEAD_TYPE *fv_list);\n-enum ice_status\n-ice_aq_upload_section(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf,\n-\t\t      u16 buf_size, struct ice_sq_cd *cd);\n \n-enum ice_status\n-ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count);\n-u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld);\n-u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld);\n-\n-/* package buffer building routines */\n-\n-struct ice_buf_build *ice_pkg_buf_alloc(struct ice_hw *hw);\n-enum ice_status\n-ice_pkg_buf_reserve_section(struct ice_buf_build *bld, u16 count);\n-void *ice_pkg_buf_alloc_section(struct ice_buf_build *bld, u32 type, u16 size);\n-struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld);\n-void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld);\n-\n-/* XLT1/PType group functions */\n-enum ice_status ice_ptg_update_xlt1(struct ice_hw *hw, enum ice_block blk);\n-enum ice_status\n-ice_ptg_find_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 *ptg);\n-u8 ice_ptg_alloc(struct ice_hw *hw, enum ice_block blk);\n-void ice_ptg_free(struct ice_hw *hw, enum ice_block blk, u8 ptg);\n-enum ice_status\n-ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg);\n \n /* XLT2/VSI group functions */\n-enum ice_status ice_vsig_update_xlt2(struct ice_hw *hw, enum ice_block blk);\n enum ice_status\n ice_vsig_find_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 *vsig);\n-enum ice_status\n-ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk,\n-\t\t\tstruct LIST_HEAD_TYPE *chs, u16 *vsig);\n \n-enum ice_status\n-ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig);\n-enum ice_status ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig);\n-enum ice_status\n-ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig);\n-enum ice_status\n-ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig);\n enum ice_status\n ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],\n \t     struct ice_fv_word *es);\n@@ -98,10 +50,6 @@ 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);\n-struct ice_prof_map *\n-ice_set_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 cntxt);\n-struct ice_prof_map *\n-ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 *cntxt);\n enum ice_status\n ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);\n enum ice_status\n@@ -109,15 +57,8 @@ ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);\n enum ice_status ice_init_hw_tbls(struct ice_hw *hw);\n void ice_free_seg(struct ice_hw *hw);\n void ice_fill_blk_tbls(struct ice_hw *hw);\n-void ice_clear_hw_tbls(struct ice_hw *hw);\n void ice_free_hw_tbls(struct ice_hw *hw);\n enum ice_status\n-ice_add_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi[], u8 count,\n-\t     u64 id);\n-enum ice_status\n-ice_rem_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi[], u8 count,\n-\t     u64 id);\n-enum ice_status\n ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id);\n \n enum ice_status\n",
    "prefixes": [
        "v2",
        "50/66"
    ]
}