get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1371046,
    "url": "http://patchwork.ozlabs.org/api/patches/1371046/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200925061130.9017-1-doshir@vmware.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20200925061130.9017-1-doshir@vmware.com>",
    "list_archive_url": null,
    "date": "2020-09-25T06:11:29",
    "name": "[net] vmxnet3: fix cksum offload issues for non-udp tunnels",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "570af13f2d0901cca3bf2839a9798fc8e2acb009",
    "submitter": {
        "id": 73629,
        "url": "http://patchwork.ozlabs.org/api/people/73629/?format=api",
        "name": "Ronak Doshi",
        "email": "doshir@vmware.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20200925061130.9017-1-doshir@vmware.com/mbox/",
    "series": [
        {
            "id": 204062,
            "url": "http://patchwork.ozlabs.org/api/series/204062/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=204062",
            "date": "2020-09-25T06:11:29",
            "name": "[net] vmxnet3: fix cksum offload issues for non-udp tunnels",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/204062/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1371046/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1371046/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming-netdev@ozlabs.org",
        "Delivered-To": "patchwork-incoming-netdev@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=23.128.96.18; helo=vger.kernel.org;\n envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=vmware.com"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby ozlabs.org (Postfix) with ESMTP id 4ByMQ302k6z9sSn\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n Fri, 25 Sep 2020 16:26:51 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1727176AbgIYG0r (ORCPT\n        <rfc822;patchwork-incoming-netdev@ozlabs.org>);\n        Fri, 25 Sep 2020 02:26:47 -0400",
            "from ex13-edg-ou-001.vmware.com ([208.91.0.189]:57931 \"EHLO\n        EX13-EDG-OU-001.vmware.com\" rhost-flags-OK-OK-OK-OK)\n        by vger.kernel.org with ESMTP id S1726925AbgIYG0r (ORCPT\n        <rfc822;netdev@vger.kernel.org>); Fri, 25 Sep 2020 02:26:47 -0400",
            "from sc9-mailhost1.vmware.com (10.113.161.71) by\n EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id\n 15.0.1156.6; Thu, 24 Sep 2020 23:11:41 -0700",
            "from ubuntu.eng.vmware.com (unknown [10.20.113.240])\n        by sc9-mailhost1.vmware.com (Postfix) with ESMTP id C95B42026A;\n        Thu, 24 Sep 2020 23:11:45 -0700 (PDT)"
        ],
        "X-Greylist": "delayed 900 seconds by postgrey-1.27 at vger.kernel.org;\n Fri, 25 Sep 2020 02:26:46 EDT",
        "From": "Ronak Doshi <doshir@vmware.com>",
        "To": "<netdev@vger.kernel.org>",
        "CC": "Ronak Doshi <doshir@vmware.com>,\n        \"VMware, Inc.\" <pv-drivers@vmware.com>,\n        \"David S. Miller\" <davem@davemloft.net>,\n        Jakub Kicinski <kuba@kernel.org>,\n        open list <linux-kernel@vger.kernel.org>",
        "Subject": "[PATCH net] vmxnet3: fix cksum offload issues for non-udp tunnels",
        "Date": "Thu, 24 Sep 2020 23:11:29 -0700",
        "Message-ID": "<20200925061130.9017-1-doshir@vmware.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "Received-SPF": "None (EX13-EDG-OU-001.vmware.com: doshir@vmware.com does not\n designate permitted sender hosts)",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Commit dacce2be3312 (\"vmxnet3: add geneve and vxlan tunnel offload\nsupport\") added support for encapsulation offload. However, the inner\noffload capability is to be restrictued to UDP tunnels.\n\nThis patch fixes the issue for non-udp tunnels by adding features\ncheck capability and filtering appropriate features for non-udp tunnels.\n\nFixes: dacce2be3312 (\"vmxnet3: add geneve and vxlan tunnel offload support\")\nSigned-off-by: Ronak Doshi <doshir@vmware.com>\n---\n drivers/net/vmxnet3/vmxnet3_drv.c     |  5 ++---\n drivers/net/vmxnet3/vmxnet3_ethtool.c | 28 ++++++++++++++++++++++++++++\n drivers/net/vmxnet3/vmxnet3_int.h     |  4 ++++\n 3 files changed, 34 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c\nindex 2818015324b8..336504b7531d 100644\n--- a/drivers/net/vmxnet3/vmxnet3_drv.c\n+++ b/drivers/net/vmxnet3/vmxnet3_drv.c\n@@ -1032,7 +1032,6 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,\n \t/* Use temporary descriptor to avoid touching bits multiple times */\n \tunion Vmxnet3_GenericDesc tempTxDesc;\n #endif\n-\tstruct udphdr *udph;\n \n \tcount = txd_estimate(skb);\n \n@@ -1135,8 +1134,7 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,\n \t\t\tgdesc->txd.om = VMXNET3_OM_ENCAP;\n \t\t\tgdesc->txd.msscof = ctx.mss;\n \n-\t\t\tudph = udp_hdr(skb);\n-\t\t\tif (udph->check)\n+\t\t\tif (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM)\n \t\t\t\tgdesc->txd.oco = 1;\n \t\t} else {\n \t\t\tgdesc->txd.hlen = ctx.l4_offset + ctx.l4_hdr_size;\n@@ -3371,6 +3369,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,\n \t\t.ndo_change_mtu = vmxnet3_change_mtu,\n \t\t.ndo_fix_features = vmxnet3_fix_features,\n \t\t.ndo_set_features = vmxnet3_set_features,\n+\t\t.ndo_features_check = vmxnet3_features_check,\n \t\t.ndo_get_stats64 = vmxnet3_get_stats64,\n \t\t.ndo_tx_timeout = vmxnet3_tx_timeout,\n \t\t.ndo_set_rx_mode = vmxnet3_set_mc,\ndiff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c\nindex 1014693a5ceb..7ec8652f2c26 100644\n--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c\n+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c\n@@ -267,6 +267,34 @@ netdev_features_t vmxnet3_fix_features(struct net_device *netdev,\n \treturn features;\n }\n \n+netdev_features_t vmxnet3_features_check(struct sk_buff *skb,\n+\t\t\t\t\t struct net_device *netdev,\n+\t\t\t\t\t netdev_features_t features)\n+{\n+\tstruct vmxnet3_adapter *adapter = netdev_priv(netdev);\n+\n+\t/* Validate if the tunneled packet is being offloaded by the device */\n+\tif (VMXNET3_VERSION_GE_4(adapter) &&\n+\t    skb->encapsulation && skb->ip_summed == CHECKSUM_PARTIAL) {\n+\t\tu8 l4_proto = 0;\n+\n+\t\tswitch (vlan_get_protocol(skb)) {\n+\t\tcase htons(ETH_P_IP):\n+\t\t\tl4_proto = ip_hdr(skb)->protocol;\n+\t\t\tbreak;\n+\t\tcase htons(ETH_P_IPV6):\n+\t\t\tl4_proto = ipv6_hdr(skb)->nexthdr;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\treturn features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);\n+\t\t}\n+\n+\t\tif (l4_proto != IPPROTO_UDP)\n+\t\t\treturn features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);\n+\t}\n+\treturn features;\n+}\n+\n static void vmxnet3_enable_encap_offloads(struct net_device *netdev)\n {\n \tstruct vmxnet3_adapter *adapter = netdev_priv(netdev);\ndiff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h\nindex 5d2b062215a2..d958b92c9429 100644\n--- a/drivers/net/vmxnet3/vmxnet3_int.h\n+++ b/drivers/net/vmxnet3/vmxnet3_int.h\n@@ -470,6 +470,10 @@ vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter);\n netdev_features_t\n vmxnet3_fix_features(struct net_device *netdev, netdev_features_t features);\n \n+netdev_features_t\n+vmxnet3_features_check(struct sk_buff *skb,\n+\t\t       struct net_device *netdev, netdev_features_t features);\n+\n int\n vmxnet3_set_features(struct net_device *netdev, netdev_features_t features);\n \n",
    "prefixes": [
        "net"
    ]
}