get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 802490,
    "url": "http://patchwork.ozlabs.org/api/patches/802490/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/150296562149.16910.5659916522674039966.stgit@anamdev.jf.intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<150296562149.16910.5659916522674039966.stgit@anamdev.jf.intel.com>",
    "list_archive_url": null,
    "date": "2017-08-17T10:27:01",
    "name": "[RFC,v2,3/6,net-next] net: i40e: Extend set switch config command to accept cloud filter mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "8c5ee656ac9464734d25825b5a43f38df1dedb4d",
    "submitter": {
        "id": 68504,
        "url": "http://patchwork.ozlabs.org/api/people/68504/?format=api",
        "name": "Nambiar, Amritha",
        "email": "amritha.nambiar@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/150296562149.16910.5659916522674039966.stgit@anamdev.jf.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/802490/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/802490/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xY2V663dCz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 17 Aug 2017 20:27:58 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2CA8688D5A;\n\tThu, 17 Aug 2017 10:27:57 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 0CYvd2tp98T8; Thu, 17 Aug 2017 10:27:55 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id BF52388CC5;\n\tThu, 17 Aug 2017 10:27:55 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9E6F91C16C1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 17 Aug 2017 10:27:54 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 957A289A83\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 17 Aug 2017 10:27:54 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Iy2w2ma-tyry for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 17 Aug 2017 10:27:53 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 8C56A8A01B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 17 Aug 2017 10:27:53 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Aug 2017 03:27:53 -0700",
            "from anamdev.jf.intel.com ([10.166.29.110])\n\tby FMSMGA003.fm.intel.com with ESMTP; 17 Aug 2017 03:27:52 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,387,1498546800\"; d=\"scan'208\";a=\"890992918\"",
        "From": "Amritha Nambiar <amritha.nambiar@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Thu, 17 Aug 2017 03:27:01 -0700",
        "Message-ID": "<150296562149.16910.5659916522674039966.stgit@anamdev.jf.intel.com>",
        "In-Reply-To": "<150296538797.16910.13738130623106637990.stgit@anamdev.jf.intel.com>",
        "References": "<150296538797.16910.13738130623106637990.stgit@anamdev.jf.intel.com>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Cc": "netdev@vger.kernel.org, mitch.a.williams@intel.com",
        "Subject": "[Intel-wired-lan] [RFC PATCH v2 3/6] [net-next]net: i40e: Extend\n\tset switch config command to accept cloud filter mode",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Add definitions for L4 filters and switch modes based on cloud filters\nmodes and extend the set switch config command to include the\nadditional cloud filter mode.\n\nSigned-off-by: Amritha Nambiar <amritha.nambiar@intel.com>\nSigned-off-by: Kiran Patil <kiran.patil@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h |   31 ++++++++++++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_common.c     |    4 ++-\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c    |    2 +\n drivers/net/ethernet/intel/i40e/i40e_main.c       |    2 +\n drivers/net/ethernet/intel/i40e/i40e_prototype.h  |    2 +\n drivers/net/ethernet/intel/i40e/i40e_type.h       |    9 ++++++\n 6 files changed, 45 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\nindex e2a9ec8..eac5ff5 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n@@ -773,7 +773,36 @@ struct i40e_aqc_set_switch_config {\n #define I40E_AQ_SET_SWITCH_CFG_PROMISC\t\t0x0001\n #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER\t0x0002\n \t__le16\tvalid_flags;\n-\tu8\treserved[12];\n+\tu8\trsvd6[6];\n+\t/* Next byte is split into following:\n+\t * Bit 7 : 0: No action, 1: Switch to mode defined by bits 6:0\n+\t * Bit 6: 0 : Destination Port, 1: source port\n+\t * Bit 5..4: L4 type\n+\t * 0: rsvd\n+\t * 1: TCP\n+\t * 2: UDP\n+\t * 3: Both TCP and UDP\n+\t * Bits 3:0 Mode\n+\t * 0: default mode\n+\t * 1: L4 port only mode\n+\t * 2: non-tunneled mode\n+\t * 3: tunneled mode\n+\t */\n+#define I40E_AQ_SET_SWITCH_BIT7_VALID\t\t0x80\n+\n+#define I40E_AQ_SET_SWITCH_L4_SRC_PORT\t\t0x40\n+\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_RSVD\t\t0x00\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_TCP\t\t0x10\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_UDP\t\t0x20\n+#define I40E_AQ_SET_SWITCH_L4_TYPE_BOTH\t\t0x30\n+\n+#define I40E_AQ_SET_SWITCH_MODE_DEFAULT\t\t0x00\n+#define I40E_AQ_SET_SWITCH_MODE_L4_PORT\t\t0x01\n+#define I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL\t0x02\n+#define I40E_AQ_SET_SWITCH_MODE_TUNNEL\t\t0x03\n+\tu8\tmode;\n+\tu8\trsvd5[5];\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex e4e86e0..d0e8138 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -2380,13 +2380,14 @@ i40e_status i40e_aq_get_switch_config(struct i40e_hw *hw,\n  * @hw: pointer to the hardware structure\n  * @flags: bit flag values to set\n  * @valid_flags: which bit flags to set\n+ * @mode: cloud filter mode\n  * @cmd_details: pointer to command details structure or NULL\n  *\n  * Set switch configuration bits\n  **/\n enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t\tu16 flags,\n-\t\t\t\t\t\tu16 valid_flags,\n+\t\t\t\t\t\tu16 valid_flags, u8 mode,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details)\n {\n \tstruct i40e_aq_desc desc;\n@@ -2398,6 +2399,7 @@ enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t  i40e_aqc_opc_set_switch_config);\n \tscfg->flags = cpu_to_le16(flags);\n \tscfg->valid_flags = cpu_to_le16(valid_flags);\n+\tscfg->mode = mode;\n \n \tstatus = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 326fc18..232e066e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -4181,7 +4181,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \t\t\tsw_flags = I40E_AQ_SET_SWITCH_CFG_PROMISC;\n \t\tvalid_flags = I40E_AQ_SET_SWITCH_CFG_PROMISC;\n \t\tret = i40e_aq_set_switch_config(&pf->hw, sw_flags, valid_flags,\n-\t\t\t\t\t\tNULL);\n+\t\t\t\t\t\t0, NULL);\n \t\tif (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) {\n \t\t\tdev_info(&pf->pdev->dev,\n \t\t\t\t \"couldn't set switch config bits, err %s aq_err %s\\n\",\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex b02da99..e53d1be 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -12146,7 +12146,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)\n \t\tu16 valid_flags;\n \n \t\tvalid_flags = I40E_AQ_SET_SWITCH_CFG_PROMISC;\n-\t\tret = i40e_aq_set_switch_config(&pf->hw, flags, valid_flags,\n+\t\tret = i40e_aq_set_switch_config(&pf->hw, flags, valid_flags, 0,\n \t\t\t\t\t\tNULL);\n \t\tif (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) {\n \t\t\tdev_info(&pf->pdev->dev,\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h\nindex df613ea..9142d0d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h\n@@ -190,7 +190,7 @@ i40e_status i40e_aq_get_switch_config(struct i40e_hw *hw,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t\tu16 flags,\n-\t\t\t\t\t\tu16 valid_flags,\n+\t\t\t\t\t\tu16 valid_flags, u8 mode,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n i40e_status i40e_aq_request_resource(struct i40e_hw *hw,\n \t\t\t\tenum i40e_aq_resources_ids resource,\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h\nindex fd4bbdd..0cfc89e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h\n@@ -276,6 +276,15 @@ struct i40e_hw_capabilities {\n #define I40E_NVM_IMAGE_TYPE_CLOUD\t0x2\n #define I40E_NVM_IMAGE_TYPE_UDP_CLOUD\t0x3\n \n+\t/* Cloud filter modes:\n+\t * Mode1: Filter on L4 port only\n+\t * Mode2: Filter for non-tunneled traffic\n+\t * Mode3: Filter for tunnel traffic\n+\t */\n+#define I40E_NVM_IMAGE_TYPE_MODE1\t0x6\n+#define I40E_NVM_IMAGE_TYPE_MODE2\t0x7\n+#define I40E_NVM_IMAGE_TYPE_MODE3\t0x8\n+\n \tu32  management_mode;\n \tu32  mng_protocols_over_mctp;\n #define I40E_MNG_PROTOCOL_PLDM\t\t0x2\n",
    "prefixes": [
        "RFC",
        "v2",
        "3/6",
        "net-next"
    ]
}