get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57949,
    "url": "https://patches.dpdk.org/api/patches/57949/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-51-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-51-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-51-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:50:52",
    "name": "[50/63] net/ice/base: maximize switch recipe words per line",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "02e43ac2a3908ff18cdd1d3b9a5340c2a2dbdd7c",
    "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-51-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/57949/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/57949/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 3E8D31C211;\n\tMon, 26 Aug 2019 12:51:24 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 320EC1C025\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:49:58 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Aug 2019 03:49:57 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:49:55 -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=\"182402499\"",
        "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\tDan Nowlin <dan.nowlin@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon, 26 Aug 2019 18:50:52 +0800",
        "Message-Id": "<20190826105105.19121-51-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 50/63] net/ice/base: maximize switch recipe words\n\tper line",
        "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": "Remove grouping rules to maximize the number of words placed into\na recipe line. This will allow more recipes to be added by reducing\nthe number of result indices required.\n\nSigned-off-by: Dan Nowlin <dan.nowlin@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 | 128 --------------------------------------\n 1 file changed, 128 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 1f077d562..ef12df5db 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -4655,17 +4655,6 @@ static const struct ice_prot_ext_tbl_entry ice_prot_ext[] = {\n  * following combinations, then the recipe needs to be chained as per the\n  * following policy.\n  */\n-static const struct ice_pref_recipe_group ice_recipe_pack[] = {\n-\t{3, { { ICE_MAC_OFOS_HW, 0, 0 }, { ICE_MAC_OFOS_HW, 2, 0 },\n-\t      { ICE_MAC_OFOS_HW, 4, 0 } }, { 0xffff, 0xffff, 0xffff, 0xffff } },\n-\t{4, { { ICE_MAC_IL_HW, 0, 0 }, { ICE_MAC_IL_HW, 2, 0 },\n-\t      { ICE_MAC_IL_HW, 4, 0 }, { ICE_META_DATA_ID_HW, 44, 0 } },\n-\t\t{ 0xffff, 0xffff, 0xffff, 0xffff } },\n-\t{2, { { ICE_IPV4_IL_HW, 0, 0 }, { ICE_IPV4_IL_HW, 2, 0 } },\n-\t\t{ 0xffff, 0xffff, 0xffff, 0xffff } },\n-\t{2, { { ICE_IPV4_IL_HW, 12, 0 }, { ICE_IPV4_IL_HW, 14, 0 } },\n-\t\t{ 0xffff, 0xffff, 0xffff, 0xffff } },\n-};\n \n static const struct ice_protocol_entry ice_prot_id_tbl[] = {\n \t{ ICE_MAC_OFOS,\t\tICE_MAC_OFOS_HW },\n@@ -4812,75 +4801,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule,\n \treturn ret_val;\n }\n \n-/**\n- * ice_find_prot_off_ind - check for specific ID and offset in rule\n- * @lkup_exts: an array of protocol header extractions\n- * @prot_type: protocol type to check\n- * @off: expected offset of the extraction\n- *\n- * Check if the prot_ext has given protocol ID and offset\n- */\n-static u8\n-ice_find_prot_off_ind(struct ice_prot_lkup_ext *lkup_exts, u8 prot_type,\n-\t\t      u16 off)\n-{\n-\tu8 j;\n-\n-\tfor (j = 0; j < lkup_exts->n_val_words; j++)\n-\t\tif (lkup_exts->fv_words[j].off == off &&\n-\t\t    lkup_exts->fv_words[j].prot_id == prot_type)\n-\t\t\treturn j;\n-\n-\treturn ICE_MAX_CHAIN_WORDS;\n-}\n-\n-/**\n- * ice_is_recipe_subset - check if recipe group policy is a subset of lookup\n- * @lkup_exts: an array of protocol header extractions\n- * @r_policy: preferred recipe grouping policy\n- *\n- * Helper function to check if given recipe group is subset we need to check if\n- * all the words described by the given recipe group exist in the advanced rule\n- * look up information\n- */\n-static bool\n-ice_is_recipe_subset(struct ice_prot_lkup_ext *lkup_exts,\n-\t\t     const struct ice_pref_recipe_group *r_policy)\n-{\n-\tu8 ind[ICE_NUM_WORDS_RECIPE];\n-\tu8 count = 0;\n-\tu8 i;\n-\n-\t/* check if everything in the r_policy is part of the entire rule */\n-\tfor (i = 0; i < r_policy->n_val_pairs; i++) {\n-\t\tu8 j;\n-\n-\t\tj = ice_find_prot_off_ind(lkup_exts, r_policy->pairs[i].prot_id,\n-\t\t\t\t\t  r_policy->pairs[i].off);\n-\t\tif (j >= ICE_MAX_CHAIN_WORDS)\n-\t\t\treturn false;\n-\n-\t\t/* store the indexes temporarily found by the find function\n-\t\t * this will be used to mark the words as 'done'\n-\t\t */\n-\t\tind[count++] = j;\n-\t}\n-\n-\t/* If the entire policy recipe was a true match, then mark the fields\n-\t * that are covered by the recipe as 'done' meaning that these words\n-\t * will be clumped together in one recipe.\n-\t * \"Done\" here means in our searching if certain recipe group\n-\t * matches or is subset of the given rule, then we mark all\n-\t * the corresponding offsets as found. So the remaining recipes should\n-\t * be created with whatever words that were left.\n-\t */\n-\tfor (i = 0; i < count; i++) {\n-\t\tu8 in = ind[i];\n \n-\t\tice_set_bit(in, lkup_exts->done);\n-\t}\n-\treturn true;\n-}\n \n /**\n  * ice_create_first_fit_recp_def - Create a recipe grouping\n@@ -5389,51 +5310,11 @@ static enum ice_status\n ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm,\n \t\t\tstruct ice_prot_lkup_ext *lkup_exts)\n {\n-\tstruct ice_recp_grp_entry *entry;\n-\tstruct ice_recp_grp_entry *tmp;\n \tenum ice_status status;\n \tu8 recp_count = 0;\n-\tu16 groups, i;\n \n \trm->n_grp_count = 0;\n \n-\n-\tif (lkup_exts->n_val_words > ICE_NUM_WORDS_RECIPE) {\n-\t\t/* Each switch recipe can match up to 5 words or metadata. One\n-\t\t * word in each recipe is used to match the switch ID. Four\n-\t\t * words are left for matching other values. If the new advanced\n-\t\t * recipe requires more than 4 words, it needs to be split into\n-\t\t * multiple recipes which are chained together using the\n-\t\t * intermediate result that each produces as input to the other\n-\t\t * recipes in the sequence.\n-\t\t */\n-\t\tgroups = ARRAY_SIZE(ice_recipe_pack);\n-\n-\t\t/* Check if any of the preferred recipes from the grouping\n-\t\t * policy matches.\n-\t\t */\n-\t\tfor (i = 0; i < groups; i++)\n-\t\t\t/* Check if the recipe from the preferred grouping\n-\t\t\t * matches or is a subset of the fields that needs to be\n-\t\t\t * looked up.\n-\t\t\t */\n-\t\t\tif (ice_is_recipe_subset(lkup_exts,\n-\t\t\t\t\t\t &ice_recipe_pack[i])) {\n-\t\t\t\t/* This recipe can be used by itself or grouped\n-\t\t\t\t * with other recipes.\n-\t\t\t\t */\n-\t\t\t\tentry = (struct ice_recp_grp_entry *)\n-\t\t\t\t\tice_malloc(hw, sizeof(*entry));\n-\t\t\t\tif (!entry) {\n-\t\t\t\t\tstatus = ICE_ERR_NO_MEMORY;\n-\t\t\t\t\tgoto err_unroll;\n-\t\t\t\t}\n-\t\t\t\tentry->r_group = ice_recipe_pack[i];\n-\t\t\t\tLIST_ADD(&entry->l_entry, &rm->rg_list);\n-\t\t\t\trm->n_grp_count++;\n-\t\t\t}\n-\t}\n-\n \t/* Create recipes for words that are marked not done by packing them\n \t * as best fit.\n \t */\n@@ -5446,17 +5327,8 @@ ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm,\n \t\t\t   sizeof(rm->ext_words), ICE_NONDMA_TO_NONDMA);\n \t\tice_memcpy(rm->word_masks, lkup_exts->field_mask,\n \t\t\t   sizeof(rm->word_masks), ICE_NONDMA_TO_NONDMA);\n-\t\tgoto out;\n \t}\n \n-err_unroll:\n-\tLIST_FOR_EACH_ENTRY_SAFE(entry, tmp, &rm->rg_list, ice_recp_grp_entry,\n-\t\t\t\t l_entry) {\n-\t\tLIST_DEL(&entry->l_entry);\n-\t\tice_free(hw, entry);\n-\t}\n-\n-out:\n \treturn status;\n }\n \n",
    "prefixes": [
        "50/63"
    ]
}