get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71035,
    "url": "http://patches.dpdk.org/api/patches/71035/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200609120001.35110-29-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": "<20200609120001.35110-29-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200609120001.35110-29-qi.z.zhang@intel.com",
    "date": "2020-06-09T11:59:37",
    "name": "[v2,28/52] net/ice/base: return correct error code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6df33c861a5882cd58b570e0713c92f96a0d5e6d",
    "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/20200609120001.35110-29-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 10359,
            "url": "http://patches.dpdk.org/api/series/10359/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10359",
            "date": "2020-06-09T11:59:09",
            "name": "net/ice: base code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/10359/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71035/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/71035/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 7E302A0516;\n\tTue,  9 Jun 2020 14:00:45 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8515A1BF7F;\n\tTue,  9 Jun 2020 13:57:10 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id A718A1BEB2\n for <dev@dpdk.org>; Tue,  9 Jun 2020 13:56:58 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jun 2020 04:56:58 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.82])\n by fmsmga005.fm.intel.com with ESMTP; 09 Jun 2020 04:56:56 -0700"
        ],
        "IronPort-SDR": [
            "\n McDvyB5cqaXJsw0HfttqMnVxQn2jvbJb+tQsVENldXEfODiSIqI6ipHj+l8Mh7r3m6zbYvPDeY\n CvH38dMTqqlw==",
            "\n opAhkRtmm51kwxRYAOja/TC+Sb16i69wcQCNLqQs/4Unob0D64z01VQGhTewahrq6/m1oTf+3+\n FXR47H7UgSmg=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,492,1583222400\"; d=\"scan'208\";a=\"473044151\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com",
        "Cc": "xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Kiran Patil <kiran.patil@intel.com>,\n \"Paul M . Stillwell Jr\" <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  9 Jun 2020 19:59:37 +0800",
        "Message-Id": "<20200609120001.35110-29-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200609120001.35110-1-qi.z.zhang@intel.com>",
        "References": "<20200603024016.30636-1-qi.z.zhang@intel.com>\n <20200609120001.35110-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 28/52] net/ice/base: return correct error code",
        "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": "Return ICE_ERR_DOES_NOT_EXIST return code if admin command error code is\nICE_AQ_RC_ENOENT (not exist). ice_aq_sw_rules is used when switch\nrule is getting added/deleted/updated. In case of delete/update\nswitch rule, admin command can return ICE_AQ_RC_ENOENT error code\nif such rule does not exist, hence return ICE_ERR_DOES_NOT_EXIST error\ncode from ice_aq_sw_rule, so that caller of this fucnction can decide\nhow to handle ICE_ERR_DOES_NOT_EXIST.\n\nAllow proper cleanup of internal data structures from ice_rem_adv_rule\nfunction if ice_aq_sw_rules return error code ICE_ERR_DOES_NOT_EXIST\notherwise per recipe:rule list will never become empty.\n\nSigned-off-by: Kiran Patil <kiran.patil@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 | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 6387f9b84..fa3a59e51 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -1868,6 +1868,7 @@ ice_aq_sw_rules(struct ice_hw *hw, void *rule_list, u16 rule_list_sz,\n \t\tu8 num_rules, enum ice_adminq_opc opc, struct ice_sq_cd *cd)\n {\n \tstruct ice_aq_desc desc;\n+\tenum ice_status status;\n \n \tice_debug(hw, ICE_DBG_TRACE, \"%s\\n\", __func__);\n \n@@ -1881,7 +1882,12 @@ ice_aq_sw_rules(struct ice_hw *hw, void *rule_list, u16 rule_list_sz,\n \tdesc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);\n \tdesc.params.sw_rules.num_rules_fltr_entry_index =\n \t\tCPU_TO_LE16(num_rules);\n-\treturn ice_aq_send_cmd(hw, &desc, rule_list, rule_list_sz, cd);\n+\tstatus = ice_aq_send_cmd(hw, &desc, rule_list, rule_list_sz, cd);\n+\tif (opc != ice_aqc_opc_add_sw_rules &&\n+\t    hw->adminq.sq_last_status == ICE_AQ_RC_ENOENT)\n+\t\tstatus = ICE_ERR_DOES_NOT_EXIST;\n+\n+\treturn status;\n }\n \n /**\n@@ -7354,7 +7360,7 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n \t\tstatus = ice_aq_sw_rules(hw, (struct ice_aqc_sw_rules *)s_rule,\n \t\t\t\t\t rule_buf_sz, 1,\n \t\t\t\t\t ice_aqc_opc_remove_sw_rules, NULL);\n-\t\tif (status == ICE_SUCCESS) {\n+\t\tif (status == ICE_SUCCESS || status == ICE_ERR_DOES_NOT_EXIST) {\n \t\t\tice_acquire_lock(rule_lock);\n \t\t\tLIST_DEL(&list_elem->list_entry);\n \t\t\tice_free(hw, list_elem->lkups);\n",
    "prefixes": [
        "v2",
        "28/52"
    ]
}