get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 724776,
    "url": "http://patchwork.ozlabs.org/api/patches/724776/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170206223846.31052-2-jacob.e.keller@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": "<20170206223846.31052-2-jacob.e.keller@intel.com>",
    "list_archive_url": null,
    "date": "2017-02-06T22:38:38",
    "name": "[PART1,01/11] i40e: send correct port number to AdminQ when enabling UDP tunnels",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2e974e71074ded731974dfc33554046fef5bb47d",
    "submitter": {
        "id": 9784,
        "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api",
        "name": "Jacob Keller",
        "email": "jacob.e.keller@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/20170206223846.31052-2-jacob.e.keller@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/724776/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/724776/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 3vHMp93XZzz9s2P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  7 Feb 2017 09:38:57 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0347630A70;\n\tMon,  6 Feb 2017 22:38:56 +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 S9DC7VlyQrtw; Mon,  6 Feb 2017 22:38:51 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 5CCB630A47;\n\tMon,  6 Feb 2017 22:38:51 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 89C9F1BFF07\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  6 Feb 2017 22:38:49 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 856B38A34D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  6 Feb 2017 22:38:49 +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 KIjhh-GQdnkO for <intel-wired-lan@lists.osuosl.org>;\n\tMon,  6 Feb 2017 22:38:49 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id EA19B89EF6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  6 Feb 2017 22:38:48 +0000 (UTC)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga102.jf.intel.com with ESMTP; 06 Feb 2017 14:38:48 -0800",
            "from jekeller-desk.amr.corp.intel.com (HELO\n\tjekeller-desk.jekeller.internal) ([10.166.35.174])\n\tby fmsmga006.fm.intel.com with ESMTP; 06 Feb 2017 14:38:48 -0800"
        ],
        "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.33,342,1477983600\"; d=\"scan'208\";a=\"62577433\"",
        "From": "Jacob Keller <jacob.e.keller@intel.com>",
        "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>",
        "Date": "Mon,  6 Feb 2017 14:38:38 -0800",
        "Message-Id": "<20170206223846.31052-2-jacob.e.keller@intel.com>",
        "X-Mailer": "git-send-email 2.12.0.rc0.151.g8a5726c42288",
        "In-Reply-To": "<20170206223846.31052-1-jacob.e.keller@intel.com>",
        "References": "<20170206223846.31052-1-jacob.e.keller@intel.com>",
        "Subject": "[Intel-wired-lan] [PART1 PATCH 01/11] i40e: send correct port\n\tnumber to AdminQ when enabling UDP tunnels",
        "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": "The firmware expects the port numbers for offloaded UDP tunnels in\nLittle Endian format. We accidentally sent the value in Big Endian\nformat which obviously will cause the wrong port number to be put into\nthe UDP tunnels list. This results in VxLAN and Geneve tunnel Rx\noffloads being essentially disabled, unless the port number happens to\nbe identical after byte swapping. Note that i40e_aq_add_udp_tunnel()\nwill byteswap the parameter from host order into Little Endian so we\ndon't need worry about passing strictly a __le16 value to the command.\n\nThis patch essentially reverts b3f5c7bc88ba (\"i40e: Fix for extra byte\nswap in tunnel setup\", 2016-08-24), but in a way that makes the result\nmuch more clear to the reader.\n\nFixes: b3f5c7bc88ba (\"i40e: Fix for extra byte swap in tunnel setup\", 2016-08-24)\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nReviewed-by: Williams, Mitch A <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h      |  3 ++-\n drivers/net/ethernet/intel/i40e/i40e_main.c | 17 ++++++++---------\n 2 files changed, 10 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 43c041d82fe4..8bb6c5c88fce 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -248,7 +248,8 @@ struct i40e_tc_configuration {\n };\n \n struct i40e_udp_port_config {\n-\t__be16 index;\n+\t/* AdminQ command interface expects port number in Host byte order */\n+\tu16 index;\n \tu8 type;\n };\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex d8a10a10da86..8414973cebef 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -7494,7 +7494,7 @@ static void i40e_sync_udp_filters_subtask(struct i40e_pf *pf)\n {\n \tstruct i40e_hw *hw = &pf->hw;\n \ti40e_status ret;\n-\t__be16 port;\n+\tu16 port;\n \tint i;\n \n \tif (!(pf->flags & I40E_FLAG_UDP_FILTER_SYNC))\n@@ -7518,7 +7518,7 @@ static void i40e_sync_udp_filters_subtask(struct i40e_pf *pf)\n \t\t\t\t\t\"%s %s port %d, index %d failed, err %s aq_err %s\\n\",\n \t\t\t\t\tpf->udp_ports[i].type ? \"vxlan\" : \"geneve\",\n \t\t\t\t\tport ? \"add\" : \"delete\",\n-\t\t\t\t\tntohs(port), i,\n+\t\t\t\t\tport, i,\n \t\t\t\t\ti40e_stat_str(&pf->hw, ret),\n \t\t\t\t\ti40e_aq_str(&pf->hw,\n \t\t\t\t\t\t    pf->hw.aq.asq_last_status));\n@@ -9201,7 +9201,7 @@ static int i40e_set_features(struct net_device *netdev,\n  *\n  * Returns the index number or I40E_MAX_PF_UDP_OFFLOAD_PORTS if port not found\n  **/\n-static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port)\n+static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, u16 port)\n {\n \tu8 i;\n \n@@ -9224,7 +9224,7 @@ static void i40e_udp_tunnel_add(struct net_device *netdev,\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_pf *pf = vsi->back;\n-\t__be16 port = ti->port;\n+\tu16 port = ntohs(ti->port);\n \tu8 next_idx;\n \tu8 idx;\n \n@@ -9232,8 +9232,7 @@ static void i40e_udp_tunnel_add(struct net_device *netdev,\n \n \t/* Check if port already exists */\n \tif (idx < I40E_MAX_PF_UDP_OFFLOAD_PORTS) {\n-\t\tnetdev_info(netdev, \"port %d already offloaded\\n\",\n-\t\t\t    ntohs(port));\n+\t\tnetdev_info(netdev, \"port %d already offloaded\\n\", port);\n \t\treturn;\n \t}\n \n@@ -9242,7 +9241,7 @@ static void i40e_udp_tunnel_add(struct net_device *netdev,\n \n \tif (next_idx == I40E_MAX_PF_UDP_OFFLOAD_PORTS) {\n \t\tnetdev_info(netdev, \"maximum number of offloaded UDP ports reached, not adding port %d\\n\",\n-\t\t\t    ntohs(port));\n+\t\t\t    port);\n \t\treturn;\n \t}\n \n@@ -9276,7 +9275,7 @@ static void i40e_udp_tunnel_del(struct net_device *netdev,\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_pf *pf = vsi->back;\n-\t__be16 port = ti->port;\n+\tu16 port = ntohs(ti->port);\n \tu8 idx;\n \n \tidx = i40e_get_udp_port_idx(pf, port);\n@@ -9308,7 +9307,7 @@ static void i40e_udp_tunnel_del(struct net_device *netdev,\n \treturn;\n not_found:\n \tnetdev_warn(netdev, \"UDP port %d was not found, not deleting\\n\",\n-\t\t    ntohs(port));\n+\t\t    port);\n }\n \n static int i40e_get_phys_port_id(struct net_device *netdev,\n",
    "prefixes": [
        "PART1",
        "01/11"
    ]
}