get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 605390,
    "url": "http://patchwork.ozlabs.org/api/patches/605390/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160402070319.13504.88242.stgit@localhost.localdomain/",
    "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": "<20160402070319.13504.88242.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2016-04-02T07:05:14",
    "name": "[next,1/2] i40e/i40evf: Clean up feature flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "70413fe2787e885a39baba02ab65ca3133afeb39",
    "submitter": {
        "id": 67293,
        "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api",
        "name": "Alexander Duyck",
        "email": "aduyck@mirantis.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/20160402070319.13504.88242.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/605390/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/605390/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 3qcTm00V3Sz9ssP\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Apr 2016 18:05:20 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5A3108AFF0;\n\tSat,  2 Apr 2016 07:05:19 +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 nMbjnQcoE+1l; Sat,  2 Apr 2016 07:05:18 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9C3D98AFDA;\n\tSat,  2 Apr 2016 07:05:18 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 24F261C11DF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat,  2 Apr 2016 07:05:17 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 164BA30B35\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat,  2 Apr 2016 07:05:17 +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 sfE18QtJZNZI for <intel-wired-lan@lists.osuosl.org>;\n\tSat,  2 Apr 2016 07:05:15 +0000 (UTC)",
            "from mail-pf0-f176.google.com (mail-pf0-f176.google.com\n\t[209.85.192.176])\n\tby silver.osuosl.org (Postfix) with ESMTPS id C805230A4C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat,  2 Apr 2016 07:05:15 +0000 (UTC)",
            "by mail-pf0-f176.google.com with SMTP id n1so1850526pfn.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 02 Apr 2016 00:05:15 -0700 (PDT)",
            "from localhost.localdomain\n\t(static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36])\n\tby smtp.gmail.com with ESMTPSA id\n\tdg1sm26470312pad.18.2016.04.02.00.05.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 02 Apr 2016 00:05:14 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=e9Orov1i; dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=JTuPbE7BroGslsbDokxXVmQnU/YlkidKrKEYlq6/CpY=;\n\tb=e9Orov1ifg05n2AlfHnu7uDXoYHe7bIWKHafCw772qnt+0+cLOvsh0fUQdiMuK24GH\n\tKJx7ZwLUTB7fyuku09XhN+ZQhpAOpwfrkfmnU4inp3zdneYVeoJgqLMNSimWa0y+TDTg\n\tLOAAToYmo5wXO5MdzauoEsmqLR+J0SFj7bw68=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:subject:from:to:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=JTuPbE7BroGslsbDokxXVmQnU/YlkidKrKEYlq6/CpY=;\n\tb=KeunblL1awauq9lC3MavIvpEnTbvbMKtARTZ/7JFAhgscl19JKefhXTvpjEC3pTvs1\n\t0rO+t/PO4pt1UseY+PlHfMzsz6mry4vyCmMj21YbjYrfm3UMaMGM5F5qoK7Z7A4TVG9i\n\taJp9g27SL7udMFNbvTtlBVtWcXlpXktyjPweCWOIG9aAjBOJQMfgAZxvDxCfq1dZlrxw\n\tbQ4eJ328EZUeQah8PSXebe1vViajbAhHJRG/2Jv9mwoP58aSphci/sAM0a8XXUwfhxOk\n\tspMK+Gq6kbiVnNAdtA0HVfib4G8QEETJPvGXXS/X9xgGtKkp911yzLWkKuH5jZrXnkCe\n\tbEHQ==",
        "X-Gm-Message-State": "AD7BkJKR7dB0PijVGOZTdtYX88W9+6ce2DxupKfmTNnZ8uard2zg7FOV2701eWBQkAuTlvqo",
        "X-Received": "by 10.98.44.73 with SMTP id s70mr4305280pfs.2.1459580715424;\n\tSat, 02 Apr 2016 00:05:15 -0700 (PDT)",
        "From": "Alexander Duyck <aduyck@mirantis.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com,\n\talexander.duyck@gmail.com",
        "Date": "Sat, 02 Apr 2016 00:05:14 -0700",
        "Message-ID": "<20160402070319.13504.88242.stgit@localhost.localdomain>",
        "In-Reply-To": "<20160402070114.13504.22615.stgit@localhost.localdomain>",
        "References": "<20160402070114.13504.22615.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH 1/2] i40e/i40evf: Clean up feature\n\tflags",
        "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>",
        "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 feature flags list for i40e and i40evf is beginning to become pretty\nmassive.  I plan to add another 4 or so features to these drivers and\nduplicating the flags for each and every flags list is becoming a bit\nrepetitive.\n\nThe primary change here is that we now build our features list around\nhw_encap_features.  After that we assign that to vlan_features,\nhw_features, and finally map that onto features.  In addition we end up\nthrowing features onto hw_encap_features that end up having no effect such\nas the Rx offloads and SCTP_CRC.  However that should have no impact and\nmakes things a bit easier for us as hw_encap_features is one of the less\nupdated features maps available.\n\nFor i40evf I went through and sanity checked a few features as well.\nSpecifically RXCSUM was being set as a read-only feature which didn't make\nmuch sense.  I have updated things so we can clear the NETIF_F_RXCSUM flag\nsince that is really a software feature and not a hardware one anyway so\ndisabling it is just a matter of ignoring the result from the hardware.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n\nTesting-hints:\n  The only real testing required for this patch is to verify the features\n  make sense after the patch has been applied.  Most of the change is to\n  deal with things like the fact that we were allowing VLAN filtering to be\n  toggled but didn't actually do anything to disable it when it was.\n\n drivers/net/ethernet/intel/i40e/i40e_main.c     |   61 +++++++++------------\n drivers/net/ethernet/intel/i40evf/i40evf_main.c |   66 +++++++++++------------\n 2 files changed, 58 insertions(+), 69 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex d6147f899062..9100d34913a7 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9110,40 +9110,36 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \tnp = netdev_priv(netdev);\n \tnp->vsi = vsi;\n \n-\tnetdev->hw_enc_features |= NETIF_F_IP_CSUM\t       |\n-\t\t\t\t   NETIF_F_IPV6_CSUM\t       |\n-\t\t\t\t   NETIF_F_TSO\t\t       |\n-\t\t\t\t   NETIF_F_TSO6\t\t       |\n-\t\t\t\t   NETIF_F_TSO_ECN\t       |\n-\t\t\t\t   NETIF_F_GSO_GRE\t       |\n-\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL      |\n-\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL_CSUM |\n+\tnetdev->hw_enc_features |= NETIF_F_SG\t\t\t|\n+\t\t\t\t   NETIF_F_IP_CSUM\t\t|\n+\t\t\t\t   NETIF_F_IPV6_CSUM\t\t|\n+\t\t\t\t   NETIF_F_HIGHDMA\t\t|\n+\t\t\t\t   NETIF_F_SOFT_FEATURES\t|\n+\t\t\t\t   NETIF_F_TSO\t\t\t|\n+\t\t\t\t   NETIF_F_TSO_ECN\t\t|\n+\t\t\t\t   NETIF_F_TSO6\t\t\t|\n+\t\t\t\t   NETIF_F_GSO_GRE\t\t|\n+\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL\t|\n+\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL_CSUM\t|\n+\t\t\t\t   NETIF_F_SCTP_CRC\t\t|\n+\t\t\t\t   NETIF_F_RXHASH\t\t|\n+\t\t\t\t   NETIF_F_RXCSUM\t\t|\n \t\t\t\t   0;\n \n-\tnetdev->features = NETIF_F_SG\t\t       |\n-\t\t\t   NETIF_F_IP_CSUM\t       |\n-\t\t\t   NETIF_F_SCTP_CRC\t       |\n-\t\t\t   NETIF_F_HIGHDMA\t       |\n-\t\t\t   NETIF_F_GSO_UDP_TUNNEL      |\n-\t\t\t   NETIF_F_GSO_GRE\t       |\n-\t\t\t   NETIF_F_HW_VLAN_CTAG_TX     |\n-\t\t\t   NETIF_F_HW_VLAN_CTAG_RX     |\n-\t\t\t   NETIF_F_HW_VLAN_CTAG_FILTER |\n-\t\t\t   NETIF_F_IPV6_CSUM\t       |\n-\t\t\t   NETIF_F_TSO\t\t       |\n-\t\t\t   NETIF_F_TSO_ECN\t       |\n-\t\t\t   NETIF_F_TSO6\t\t       |\n-\t\t\t   NETIF_F_RXCSUM\t       |\n-\t\t\t   NETIF_F_RXHASH\t       |\n-\t\t\t   0;\n+\tif (!(pf->flags & I40E_FLAG_OUTER_UDP_CSUM_CAPABLE))\n+\t\tnetdev->hw_enc_features ^= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\n+\t/* record features VLANs can make use of */\n+\tnetdev->vlan_features |= netdev->hw_enc_features;\n \n \tif (!(pf->flags & I40E_FLAG_MFP_ENABLED))\n-\t\tnetdev->features |= NETIF_F_NTUPLE;\n-\tif (pf->flags & I40E_FLAG_OUTER_UDP_CSUM_CAPABLE)\n-\t\tnetdev->features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\t\tnetdev->hw_features |= NETIF_F_NTUPLE;\n+\n+\tnetdev->hw_features |= netdev->hw_enc_features\t|\n+\t\t\t       NETIF_F_HW_VLAN_CTAG_TX\t|\n+\t\t\t       NETIF_F_HW_VLAN_CTAG_RX;\n \n-\t/* copy netdev features into list of user selectable features */\n-\tnetdev->hw_features |= netdev->features;\n+\tnetdev->features |= netdev->hw_features | NETIF_F_HW_VLAN_CTAG_FILTER;\n \n \tif (vsi->type == I40E_VSI_MAIN) {\n \t\tSET_NETDEV_DEV(netdev, &pf->pdev->dev);\n@@ -9182,12 +9178,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \n \tether_addr_copy(netdev->dev_addr, mac_addr);\n \tether_addr_copy(netdev->perm_addr, mac_addr);\n-\t/* vlan gets same features (except vlan offload)\n-\t * after any tweaks for specific VSI types\n-\t */\n-\tnetdev->vlan_features = netdev->features & ~(NETIF_F_HW_VLAN_CTAG_TX |\n-\t\t\t\t\t\t     NETIF_F_HW_VLAN_CTAG_RX |\n-\t\t\t\t\t\t   NETIF_F_HW_VLAN_CTAG_FILTER);\n+\n \tnetdev->priv_flags |= IFF_UNICAST_FLT;\n \tnetdev->priv_flags |= IFF_SUPP_NOFCS;\n \t/* Setup netdev TC information */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 9549f0fcdb39..a24966e4873a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -2318,40 +2318,38 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \t\treturn -ENODEV;\n \t}\n \n-\tnetdev->features |= NETIF_F_HIGHDMA |\n-\t\t\t    NETIF_F_SG |\n-\t\t\t    NETIF_F_IP_CSUM |\n-\t\t\t    NETIF_F_SCTP_CRC |\n-\t\t\t    NETIF_F_IPV6_CSUM |\n-\t\t\t    NETIF_F_TSO |\n-\t\t\t    NETIF_F_TSO6 |\n-\t\t\t    NETIF_F_TSO_ECN |\n-\t\t\t    NETIF_F_GSO_GRE |\n-\t\t\t    NETIF_F_GSO_UDP_TUNNEL |\n-\t\t\t    NETIF_F_RXCSUM |\n-\t\t\t    NETIF_F_GRO;\n-\n-\tnetdev->hw_enc_features |= NETIF_F_IP_CSUM\t       |\n-\t\t\t\t   NETIF_F_IPV6_CSUM\t       |\n-\t\t\t\t   NETIF_F_TSO\t\t       |\n-\t\t\t\t   NETIF_F_TSO6\t\t       |\n-\t\t\t\t   NETIF_F_TSO_ECN\t       |\n-\t\t\t\t   NETIF_F_GSO_GRE\t       |\n-\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL      |\n-\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL_CSUM;\n-\n-\tif (adapter->flags & I40EVF_FLAG_OUTER_UDP_CSUM_CAPABLE)\n-\t\tnetdev->features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n-\n-\t/* always clear VLAN features because they can change at every reset */\n-\tnetdev->features &= ~(I40EVF_VLAN_FEATURES);\n-\t/* copy netdev features into list of user selectable features */\n-\tnetdev->hw_features |= netdev->features;\n-\n-\tif (vfres->vf_offload_flags & I40E_VIRTCHNL_VF_OFFLOAD_VLAN) {\n-\t\tnetdev->vlan_features = netdev->features;\n-\t\tnetdev->features |= I40EVF_VLAN_FEATURES;\n-\t}\n+\tnetdev->hw_enc_features |= NETIF_F_SG\t\t\t|\n+\t\t\t\t   NETIF_F_IP_CSUM\t\t|\n+\t\t\t\t   NETIF_F_IPV6_CSUM\t\t|\n+\t\t\t\t   NETIF_F_HIGHDMA\t\t|\n+\t\t\t\t   NETIF_F_SOFT_FEATURES\t|\n+\t\t\t\t   NETIF_F_TSO\t\t\t|\n+\t\t\t\t   NETIF_F_TSO_ECN\t\t|\n+\t\t\t\t   NETIF_F_TSO6\t\t\t|\n+\t\t\t\t   NETIF_F_GSO_GRE\t\t|\n+\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL\t|\n+\t\t\t\t   NETIF_F_GSO_UDP_TUNNEL_CSUM\t|\n+\t\t\t\t   NETIF_F_SCTP_CRC\t\t|\n+\t\t\t\t   NETIF_F_RXHASH\t\t|\n+\t\t\t\t   NETIF_F_RXCSUM\t\t|\n+\t\t\t\t   0;\n+\n+\tif (!(adapter->flags & I40EVF_FLAG_OUTER_UDP_CSUM_CAPABLE))\n+\t\tnetdev->hw_enc_features ^= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\n+\t/* record features VLANs can make use of */\n+\tnetdev->vlan_features |= netdev->hw_enc_features;\n+\n+\t/* Write features and hw_features separately to avoid polluting\n+\t * with, or dropping, features that are set when we registgered.\n+\t */\n+\tnetdev->hw_features |= netdev->hw_enc_features;\n+\n+\tnetdev->features |= netdev->hw_enc_features | I40EVF_VLAN_FEATURES;\n+\n+\t/* disable VLAN features if not supported */\n+\tif (!(vfres->vf_offload_flags & I40E_VIRTCHNL_VF_OFFLOAD_VLAN))\n+\t\tnetdev->features ^= I40EVF_VLAN_FEATURES;\n \n \tadapter->vsi.id = adapter->vsi_res->vsi_id;\n \n",
    "prefixes": [
        "next",
        "1/2"
    ]
}