get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99011,
    "url": "https://patches.dpdk.org/api/patches/99011/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210916095304.3058210-5-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": "<20210916095304.3058210-5-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210916095304.3058210-5-qi.z.zhang@intel.com",
    "date": "2021-09-16T09:52:56",
    "name": "[04/12] net/ice/base: allow to enable LAN and loopback in switch",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "91128c52b26687d3138b28024f193855cd155db2",
    "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/20210916095304.3058210-5-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 18975,
            "url": "https://patches.dpdk.org/api/series/18975/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18975",
            "date": "2021-09-16T09:52:52",
            "name": "ice base code batch 2 for DPDK 21.11",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/18975/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/99011/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/99011/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 667D9A0C41;\n\tThu, 16 Sep 2021 11:50:24 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 90285410FE;\n\tThu, 16 Sep 2021 11:50:10 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 1DBE1410FE\n for <dev@dpdk.org>; Thu, 16 Sep 2021 11:50:08 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Sep 2021 02:50:08 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by fmsmga008.fm.intel.com with ESMTP; 16 Sep 2021 02:50:07 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10108\"; a=\"222185856\"",
            "E=Sophos;i=\"5.85,298,1624345200\"; d=\"scan'208\";a=\"222185856\"",
            "E=Sophos;i=\"5.85,298,1624345200\"; d=\"scan'208\";a=\"509246911\""
        ],
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com",
        "Cc": "junfeng.guo@intel.com, dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Wojciech Drewek <wojciech.drewek@intel.com>",
        "Date": "Thu, 16 Sep 2021 17:52:56 +0800",
        "Message-Id": "<20210916095304.3058210-5-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20210916095304.3058210-1-qi.z.zhang@intel.com>",
        "References": "<20210916095304.3058210-1-qi.z.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 04/12] net/ice/base: allow to enable LAN and\n loopback in switch",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Currently shared code API oes not allow to set/unset lb_en\nand lan_en flags for advanced rules during their creation.\nBecause of that we have to use a workaround in switchdev\nwhich is to update rule immediately after its creation.\nThis change will allow us to set/unset those flags right\naway.\n\nSigned-off-by: Wojciech Drewek <wojciech.drewek@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c |  7 ++++++-\n drivers/net/ice/base/ice_switch.h | 11 +++++++++++\n 2 files changed, 17 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 93cd79e8ef..b945e1499d 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -8750,7 +8750,12 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n \ts_rule = (struct ice_aqc_sw_rules_elem *)ice_malloc(hw, rule_buf_sz);\n \tif (!s_rule)\n \t\treturn ICE_ERR_NO_MEMORY;\n-\tact |= ICE_SINGLE_ACT_LAN_ENABLE;\n+\tif (!rinfo->flags_info.act_valid)\n+\t\tact |= ICE_SINGLE_ACT_LAN_ENABLE;\n+\telse\n+\t\tact |= rinfo->flags_info.act & (ICE_SINGLE_ACT_LAN_ENABLE |\n+\t\t\t\t\t\tICE_SINGLE_ACT_LB_ENABLE);\n+\n \tswitch (rinfo->sw_act.fltr_act) {\n \tcase ICE_FWD_TO_VSI:\n \t\tact |= (rinfo->sw_act.fwd_id.hw_vsi_id <<\ndiff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h\nindex 980bae5806..a2b3c80107 100644\n--- a/drivers/net/ice/base/ice_switch.h\n+++ b/drivers/net/ice/base/ice_switch.h\n@@ -250,12 +250,23 @@ struct ice_rule_query_data {\n \tu16 vsi_handle;\n };\n \n+/* This structure allows to pass info about lb_en and lan_en\n+ * flags to ice_add_adv_rule. Values in act would be used\n+ * only if act_valid was set to true, otherwise dflt\n+ * values would be used.\n+ */\n+struct ice_adv_rule_flags_info {\n+\tu32 act;\n+\tu8 act_valid;\t\t/* indicate if flags in act are valid */\n+};\n+\n struct ice_adv_rule_info {\n \tenum ice_sw_tunnel_type tun_type;\n \tstruct ice_sw_act_ctrl sw_act;\n \tu32 priority;\n \tu8 rx; /* true means LOOKUP_RX otherwise LOOKUP_TX */\n \tu16 fltr_rule_id;\n+\tstruct ice_adv_rule_flags_info flags_info;\n };\n \n /* A collection of one or more four word recipe */\n",
    "prefixes": [
        "04/12"
    ]
}