get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 547387,
    "url": "http://patchwork.ozlabs.org/api/patches/547387/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1448262224-71480-7-git-send-email-anjali.singhai@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": "<1448262224-71480-7-git-send-email-anjali.singhai@intel.com>",
    "list_archive_url": null,
    "date": "2015-11-23T07:03:44",
    "name": "[v6,6/6] i40e:Add geneve tunnel offload support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "9f033cf4cc9b2ad765b808b815561d2194df788f",
    "submitter": {
        "id": 65487,
        "url": "http://patchwork.ozlabs.org/api/people/65487/?format=api",
        "name": "Singhai, Anjali",
        "email": "anjali.singhai@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/1448262224-71480-7-git-send-email-anjali.singhai@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/547387/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/547387/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 6F0211402B2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 23 Nov 2015 17:47:01 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id A10BF925D8;\n\tMon, 23 Nov 2015 06:47:00 +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 R7UhwLs0FXvW; Mon, 23 Nov 2015 06:46:57 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0D781926F9;\n\tMon, 23 Nov 2015 06:46:54 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5BCAF1C0ED0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Nov 2015 06:46:51 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 551A2925E7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Nov 2015 06:46:51 +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 oCjI-A1B214V for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Nov 2015 06:46:49 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1883E926E5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Nov 2015 06:46:49 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP; 22 Nov 2015 22:46:48 -0800",
            "from asinghai-cp.jf.intel.com ([134.134.3.84])\n\tby orsmga001.jf.intel.com with ESMTP; 22 Nov 2015 22:46:47 -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.20,336,1444719600\"; d=\"scan'208\";a=\"826891651\"",
        "From": "Anjali Singhai Jain <anjali.singhai@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Sun, 22 Nov 2015 23:03:44 -0800",
        "Message-Id": "<1448262224-71480-7-git-send-email-anjali.singhai@intel.com>",
        "X-Mailer": "git-send-email 1.8.1.4",
        "In-Reply-To": "<1448262224-71480-1-git-send-email-anjali.singhai@intel.com>",
        "References": "<anjali.singhai@intel.com>\n\t<1448262224-71480-1-git-send-email-anjali.singhai@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH v6 6/6] i40e:Add geneve tunnel offload\n\tsupport",
        "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 adds driver hooks to implement ndo_ops to add/del udp\nport in the HW to identify GENEVE tunnels.\n\nAlso cleans up the features_check path now that we support\nmultiple udp based tunnels.\n\nSigned-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>\nSigned-off-by: Kiran Patil <kiran.patil@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h      |  1 +\n drivers/net/ethernet/intel/i40e/i40e_main.c | 35 +++++++++++++++++++++--------\n drivers/net/ethernet/intel/i40e/i40e_txrx.c |  2 +-\n 3 files changed, 28 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex c24008f..93f1083 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -338,6 +338,7 @@ struct i40e_pf {\n #define I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE\tBIT_ULL(38)\n #define I40E_FLAG_LINK_POLLING_ENABLED\t\tBIT_ULL(39)\n #define I40E_FLAG_VEB_MODE_ENABLED\t\tBIT_ULL(40)\n+#define I40E_FLAG_GENEVE_OFFLOAD_CAPABLE\tBIT_ULL(41)\n #define I40E_FLAG_NO_PCI_LINK_CHECK\t\tBIT_ULL(42)\n \n \t/* tracks features that get auto disabled by errors */\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 21b6285..f8aff2b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -30,6 +30,9 @@\n #if IS_ENABLED(CONFIG_VXLAN)\n #include <net/vxlan.h>\n #endif\n+#if IS_ENABLED(CONFIG_GENEVE)\n+#include <net/geneve.h>\n+#endif\n #include <net/udp_tunnel.h>\n #include <net/protocol.h>\n \n@@ -6996,7 +6999,7 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)\n  **/\n static void i40e_sync_udp_filters_subtask(struct i40e_pf *pf)\n {\n-#if IS_ENABLED(CONFIG_VXLAN)\n+#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)\n \tstruct i40e_hw *hw = &pf->hw;\n \ti40e_status ret;\n \t__be16 port;\n@@ -8332,7 +8335,8 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \t\t\t     I40E_FLAG_HW_ATR_EVICT_CAPABLE |\n \t\t\t     I40E_FLAG_OUTER_UDP_CSUM_CAPABLE |\n \t\t\t     I40E_FLAG_WB_ON_ITR_CAPABLE |\n-\t\t\t     I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE;\n+\t\t\t     I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE |\n+\t\t\t     I40E_FLAG_GENEVE_OFFLOAD_CAPABLE;\n \t}\n \tpf->eeprom_version = 0xDEAD;\n \tpf->lan_veb = I40E_NO_VEB;\n@@ -8431,7 +8435,7 @@ static int i40e_set_features(struct net_device *netdev,\n \treturn 0;\n }\n \n-#if IS_ENABLED(CONFIG_VXLAN)\n+#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)\n /**\n  * i40e_get_udp_port_idx - Lookup a possibly offloaded for Rx UDP port\n  * @pf: board private structure\n@@ -8466,14 +8470,18 @@ static void i40e_add_tunnel_port(struct net_device *netdev,\n \t\t\t\t sa_family_t sa_family, __be16 port,\n \t\t\t\t u32 type)\n {\n-#if IS_ENABLED(CONFIG_VXLAN)\n+#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_pf *pf = vsi->back;\n \tu8 next_idx;\n \tu8 idx;\n \n-\tif (type != UDP_TUNNEL_VXLAN)\n+\tif (!(type == UDP_TUNNEL_VXLAN || type == UDP_TUNNEL_GENEVE))\n+\t\treturn;\n+\n+\tif ((type == UDP_TUNNEL_GENEVE) &&\n+\t    (!(pf->flags & I40E_FLAG_GENEVE_OFFLOAD_CAPABLE)))\n \t\treturn;\n \n \tif (sa_family == AF_INET6)\n@@ -8501,6 +8509,8 @@ static void i40e_add_tunnel_port(struct net_device *netdev,\n \tpf->udp_ports[next_idx].index = port;\n \tif (type == UDP_TUNNEL_VXLAN)\n \t\tpf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_VXLAN;\n+\telse if (type == UDP_TUNNEL_GENEVE)\n+\t\tpf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_NGE;\n \n \tpf->pending_udp_bitmap |= BIT_ULL(next_idx);\n \tpf->flags |= I40E_FLAG_UDP_FILTER_SYNC;\n@@ -8521,13 +8531,13 @@ static void i40e_del_tunnel_port(struct net_device *netdev,\n \t\t\t\t sa_family_t sa_family, __be16 port,\n \t\t\t\t u32 type)\n {\n-#if IS_ENABLED(CONFIG_VXLAN)\n+#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_pf *pf = vsi->back;\n \tu8 idx;\n \n-\tif (type != UDP_TUNNEL_VXLAN)\n+\tif (!(type == UDP_TUNNEL_VXLAN || type == UDP_TUNNEL_GENEVE))\n \t\treturn;\n \n \tif (sa_family == AF_INET6)\n@@ -8727,7 +8737,10 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,\n \t\t\t\t       nlflags, 0, 0, filter_mask, NULL);\n }\n \n-#define I40E_MAX_TUNNEL_HDR_LEN 80\n+/* Hardware supports L4 tunnel length of 128B (=2^7) which includes\n+ * inner mac plus all inner ethertypes.\n+ */\n+#define I40E_MAX_TUNNEL_HDR_LEN 128\n /**\n  * i40e_features_check - Validate encapsulated packet conforms to limits\n  * @skb: skb buff\n@@ -8739,7 +8752,7 @@ static netdev_features_t i40e_features_check(struct sk_buff *skb,\n \t\t\t\t\t     netdev_features_t features)\n {\n \tif (skb->encapsulation &&\n-\t    (skb_inner_mac_header(skb) - skb_transport_header(skb) >\n+\t    ((skb_inner_network_header(skb) - skb_transport_header(skb)) >\n \t     I40E_MAX_TUNNEL_HDR_LEN))\n \t\treturn features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);\n \n@@ -8809,6 +8822,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \tnp->vsi = vsi;\n \n \tnetdev->hw_enc_features |= NETIF_F_IP_CSUM\t |\n+\t\t\t\t  NETIF_F_RXCSUM\t |\n \t\t\t\t  NETIF_F_GSO_UDP_TUNNEL |\n \t\t\t\t  NETIF_F_GSO_GRE\t |\n \t\t\t\t  NETIF_F_TSO;\n@@ -10326,6 +10340,9 @@ static void i40e_print_features(struct i40e_pf *pf)\n #if IS_ENABLED(CONFIG_VXLAN)\n \ti += snprintf(&buf[i], REMAIN(i), \"VxLAN \");\n #endif\n+#if IS_ENABLED(CONFIG_GENVE)\n+\ti += snprintf(&buf[i], REMAIN(i), \"Geneve \");\n+#endif\n \tif (pf->flags & I40E_FLAG_PTP)\n \t\ti += snprintf(&buf[i], REMAIN(i), \"PTP \");\n #ifdef I40E_FCOE\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 2729a48..5dfe15c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1383,7 +1383,7 @@ static inline void i40e_rx_checksum(struct i40e_vsi *vsi,\n \tif (rx_error & BIT(I40E_RX_DESC_ERROR_PPRS_SHIFT))\n \t\treturn;\n \n-\t/* If VXLAN traffic has an outer UDPv4 checksum we need to check\n+\t/* If VXLAN/GENEVE traffic has an outer UDPv4 checksum we need to check\n \t * it in the driver, hardware does not do it for us.\n \t * Since L3L4P bit was set we assume a valid IHL value (>=5)\n \t * so the total length of IPv4 header is IHL*4 bytes\n",
    "prefixes": [
        "v6",
        "6/6"
    ]
}