get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57958,
    "url": "https://patches.dpdk.org/api/patches/57958/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-63-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-63-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-63-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:51:04",
    "name": "[62/63] net/ice/base: update profile to recipe bitmap array",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7c3a049423ee49a0c3c2dc6495060318bd94e2b0",
    "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-63-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/57958/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/57958/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 535851C29C;\n\tMon, 26 Aug 2019 12:51:59 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 2D1391C1A0\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:50:19 +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:50:18 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:50:17 -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=\"182402664\"",
        "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:51:04 +0800",
        "Message-Id": "<20190826105105.19121-63-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 62/63] net/ice/base: update profile to recipe\n\tbitmap array",
        "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": "Correctly update profile to recipe bitmap array after adding and\nassociating recipes. This fixes an issue where determining unused\nrecipe result index slots was incorrect.\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 | 21 ++++++++++++++++++---\n 1 file changed, 18 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 8f20b9ed6..59da7eaa8 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -594,11 +594,14 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,\n \t\t/* Propagate some data to the recipe database */\n \t\trecps[idx].is_root = is_root;\n \t\trecps[idx].priority = root_bufs.content.act_ctrl_fwd_priority;\n-\t\tif (root_bufs.content.result_indx & ICE_AQ_RECIPE_RESULT_EN)\n+\t\tice_zero_bitmap(recps[idx].res_idxs, ICE_MAX_FV_WORDS);\n+\t\tif (root_bufs.content.result_indx & ICE_AQ_RECIPE_RESULT_EN) {\n \t\t\trecps[idx].chain_idx = root_bufs.content.result_indx &\n \t\t\t\t~ICE_AQ_RECIPE_RESULT_EN;\n-\t\telse\n+\t\t\tice_set_bit(recps[idx].chain_idx, recps[idx].res_idxs);\n+\t\t} else {\n \t\t\trecps[idx].chain_idx = ICE_INVAL_CHAIN_IND;\n+\t\t}\n \n \t\tif (!is_root)\n \t\t\tcontinue;\n@@ -609,11 +612,11 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,\n \t\trecps[idx].root_rid = root_bufs.content.rid &\n \t\t\t~ICE_AQ_RECIPE_ID_IS_ROOT;\n \t\trecps[idx].priority = root_bufs.content.act_ctrl_fwd_priority;\n-\t\trecps[idx].big_recp = (recps[rid].n_grp_count > 1);\n \t}\n \n \t/* Complete initialization of the root recipe entry */\n \tlkup_exts->n_val_words = fv_word_idx;\n+\trecps[rid].big_recp = (num_recps > 1);\n \trecps[rid].n_grp_count = num_recps;\n \trecps[rid].root_buf = (struct ice_aqc_recipe_data_elem *)\n \t\tice_calloc(hw, recps[rid].n_grp_count,\n@@ -5287,6 +5290,7 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,\n \t\trecp->n_ext_words = entry->r_group.n_val_pairs;\n \t\trecp->chain_idx = entry->chain_idx;\n \t\trecp->priority = buf[buf_idx].content.act_ctrl_fwd_priority;\n+\t\trecp->n_grp_count = rm->n_grp_count;\n \t\trecp->tun_type = rm->tun_type;\n \t\trecp->recp_created = true;\n \t\trecp->adv_rule = 1;\n@@ -5568,6 +5572,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n \tLIST_FOR_EACH_ENTRY(fvit, &rm->fv_list, ice_sw_fv_list_entry,\n \t\t\t    list_entry) {\n \t\tice_declare_bitmap(r_bitmap, ICE_MAX_NUM_RECIPES);\n+\t\tu16 j;\n \n \t\tstatus = ice_aq_get_recipe_to_profile(hw, fvit->profile_id,\n \t\t\t\t\t\t      (u8 *)r_bitmap, NULL);\n@@ -5587,6 +5592,16 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n \n \t\tif (status)\n \t\t\tgoto err_unroll;\n+\n+\t\t/* Update profile to recipe bitmap array */\n+\t\tice_memcpy(profile_to_recipe[fvit->profile_id], rm->r_bitmap,\n+\t\t\t   sizeof(rm->r_bitmap), ICE_NONDMA_TO_NONDMA);\n+\n+\t\t/* Update recipe to profile bitmap array */\n+\t\tfor (j = 0; j < ICE_MAX_NUM_RECIPES; j++)\n+\t\t\tif (ice_is_bit_set(rm->r_bitmap, j))\n+\t\t\t\tice_set_bit((u16)fvit->profile_id,\n+\t\t\t\t\t    recipe_to_profile[j]);\n \t}\n \n \t*rid = rm->root_rid;\n",
    "prefixes": [
        "62/63"
    ]
}