get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 653097,
    "url": "http://patchwork.ozlabs.org/api/patches/653097/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1469598563-42383-1-git-send-email-kiran.patil@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": "<1469598563-42383-1-git-send-email-kiran.patil@intel.com>",
    "list_archive_url": null,
    "date": "2016-07-27T05:49:23",
    "name": "[V0] i40e: Program device correctly as part of adding flow director entry",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "dcb89c671d1c2a9e8d3e0ca8092c79bcad20369b",
    "submitter": {
        "id": 6691,
        "url": "http://patchwork.ozlabs.org/api/people/6691/?format=api",
        "name": "Patil, Kiran",
        "email": "kiran.patil@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/1469598563-42383-1-git-send-email-kiran.patil@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/653097/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/653097/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3rzkVN5qlQz9t1v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Jul 2016 15:45:31 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 211BF309C5;\n\tWed, 27 Jul 2016 05:45:30 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 0U7MtN0RK6n3; Wed, 27 Jul 2016 05:45:28 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id ADC5930FE9;\n\tWed, 27 Jul 2016 05:45:28 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id E4D871C1453\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Jul 2016 05:45:27 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id DBF6585204\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Jul 2016 05:45:27 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id jTZu5Q55X9jk for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Jul 2016 05:45:26 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BA54C85312\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Jul 2016 05:45:26 +0000 (UTC)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP; 26 Jul 2016 22:45:26 -0700",
            "from kap-devel2.jf.intel.com ([134.134.3.66])\n\tby orsmga002.jf.intel.com with ESMTP; 26 Jul 2016 22:45:26 -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.28,428,1464678000\"; d=\"scan'208\";\n\ta=\"1024664393\"",
        "From": "Kiran Patil <kiran.patil@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 26 Jul 2016 22:49:23 -0700",
        "Message-Id": "<1469598563-42383-1-git-send-email-kiran.patil@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[Intel-wired-lan] [PATCH V0] i40e: Program device correctly as part\n\tof adding flow director entry",
        "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "This patch fixes the problem where driver was not programming\nunderlying device correctly when user specifies less than full tuple\nset as part of adding flow director entry (for flow-type tcp4/udp4)\nusing ethtool.\n\nSigned-off-by: Kiran Patil <kiran.patil@intel.com>\nChange-Id: I90052508f8c172c0da5a4b78b949704b4a59ea78\nTested-by: Andrew Bowers <andrewx.bowers@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 116 +++++++++++++++++++++++++\n 1 file changed, 116 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex c912e04..e7613b2 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -2563,6 +2563,116 @@ static int i40e_del_fdir_entry(struct i40e_vsi *vsi,\n }\n \n /**\n+ * i40e_handle_input_set - Detect and handle input set changes\n+ * @vsi: pointer to the targeted VSI\n+ * @fsp: pointer to RX flow classification spec\n+ *\n+ * Reads register, detect change in input set based on existing register\n+ * value and what user has passed. Update input set mask register if needed.\n+ **/\n+static int i40e_handle_input_set(struct i40e_vsi *vsi,\n+\t\t\t\t struct ethtool_rx_flow_spec *fsp)\n+{\n+\tbool inset_mask_change = false;\n+\tstruct i40e_pf *pf;\n+\tu64 val;\n+\tu8 idx;\n+\n+\tif (unlikely(!vsi))\n+\t\treturn -EINVAL;\n+\n+\tpf = vsi->back;\n+\tswitch (fsp->flow_type & ~FLOW_EXT) {\n+\tcase TCP_V4_FLOW:\n+\t\tidx = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;\n+\t\tbreak;\n+\tcase UDP_V4_FLOW:\n+\t\tidx = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;\n+\t\tbreak;\n+\tdefault:\n+\t\t/* for all other flow types */\n+\t\treturn 0;\n+\t}\n+\n+\tval = ((u64)i40e_read_rx_ctl(&pf->hw,\n+\t\t\t\t     I40E_PRTQF_FD_INSET(idx, 1)) << 32) |\n+\t       (u64)i40e_read_rx_ctl(&pf->hw,\n+\t\t\t\t     I40E_PRTQF_FD_INSET(idx, 0));\n+\n+\t/* Default input set (TCP/UDP/SCTP) contains following\n+\t * fields: srcip + dest ip + src port + dest port\n+\t * For SCTP, there is one extra field, \"verification tag\"\n+\t */\n+\tif (val & I40E_L3_SRC_MASK) {\n+\t\tif (!fsp->h_u.tcp_ip4_spec.ip4src) {\n+\t\t\tval &= ~I40E_L3_SRC_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t} else {\n+\t\tif (fsp->h_u.tcp_ip4_spec.ip4src) {\n+\t\t\tval |= I40E_L3_SRC_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t}\n+\tif (val & I40E_L3_DST_MASK) {\n+\t\tif (!fsp->h_u.tcp_ip4_spec.ip4dst) {\n+\t\t\tval &= ~I40E_L3_DST_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t} else {\n+\t\tif (fsp->h_u.tcp_ip4_spec.ip4dst) {\n+\t\t\tval |= I40E_L3_DST_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t}\n+\tif (val & I40E_L4_SRC_MASK) {\n+\t\tif (!fsp->h_u.tcp_ip4_spec.psrc) {\n+\t\t\tval &= ~I40E_L4_SRC_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t} else {\n+\t\tif (fsp->h_u.tcp_ip4_spec.psrc) {\n+\t\t\tval |= I40E_L4_SRC_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t}\n+\tif (val & I40E_L4_DST_MASK) {\n+\t\tif (!fsp->h_u.tcp_ip4_spec.pdst) {\n+\t\t\tval &= ~I40E_L4_DST_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t} else {\n+\t\tif (fsp->h_u.tcp_ip4_spec.pdst) {\n+\t\t\tval |= I40E_L4_DST_MASK;\n+\t\t\tinset_mask_change = true;\n+\t\t}\n+\t}\n+\n+\tif (inset_mask_change) {\n+\t\tif (pf->flags & I40E_FLAG_MFP_ENABLED) {\n+\t\t\tnetif_err(pf, drv, vsi->netdev, \"Change of input set is not supported when MFP mode is enabled\\n\");\n+\t\t\treturn -EOPNOTSUPP;\n+\t\t}\n+\t\tif (pf->fdir_pf_active_filters) {\n+\t\t\tnetif_err(pf, drv, vsi->netdev, \"Change of input set is not supported when there are existing filters. Please delete them and re-try\\n\");\n+\t\t\treturn -EOPNOTSUPP;\n+\t\t}\n+\n+\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n+\t\t\tnetif_info(pf, drv, vsi->netdev, \"FD_INSET mask is changing to 0x%016llx\\n\",\n+\t\t\t\t   val);\n+\t\t/* Update input mask register since input set mask changed */\n+\t\ti40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(idx, 1),\n+\t\t\t\t  (u32)(val >> 32));\n+\t\ti40e_write_rx_ctl(&pf->hw, I40E_PRTQF_FD_INSET(idx, 0),\n+\t\t\t\t  (u32)val);\n+\t\tnetif_info(pf, drv, vsi->netdev, \"Input set mask change has been successful. Please note that this and all other interfaces on (related and derived from) this part are affected as well.\\n\");\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/**\n  * i40e_add_fdir_ethtool - Add/Remove Flow Director filters\n  * @vsi: pointer to the targeted VSI\n  * @cmd: command to get or set RX flow classification rules\n@@ -2637,6 +2747,12 @@ static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,\n \tinput->dst_ip[0] = fsp->h_u.tcp_ip4_spec.ip4src;\n \tinput->src_ip[0] = fsp->h_u.tcp_ip4_spec.ip4dst;\n \n+\tret = i40e_handle_input_set(vsi, fsp);\n+\tif (ret) {\n+\t\tnetif_err(pf, drv, vsi->netdev, \"Unable to handle change in input set mask\\n\");\n+\t\tgoto free_input;\n+\t}\n+\n \tif (ntohl(fsp->m_ext.data[1])) {\n \t\tvf_id = ntohl(fsp->h_ext.data[1]);\n \t\tif (vf_id >= pf->num_alloc_vfs) {\n",
    "prefixes": [
        "V0"
    ]
}