get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 774846,
    "url": "http://patchwork.ozlabs.org/api/patches/774846/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170612215118.17642-1-jeffrey.t.kirsher@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": "<20170612215118.17642-1-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2017-06-12T21:51:18",
    "name": "i40e: fix handling of HW ATR eviction",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5f5a9c8694e63f74cfca43a1d78a8666b779aba8",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@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/20170612215118.17642-1-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/774846/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/774846/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@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\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 3wmmnJ40mNz9s3s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 13 Jun 2017 07:51:32 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B87FE87C24;\n\tMon, 12 Jun 2017 21:51:30 +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 gFT+jtq7pIuG; Mon, 12 Jun 2017 21:51:28 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EDB6E87963;\n\tMon, 12 Jun 2017 21:51:28 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4A4DB1C274B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 12 Jun 2017 21:51:27 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 437932FEAD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 12 Jun 2017 21:51:27 +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 UrPIjV8Q7Sog for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 12 Jun 2017 21:51:25 +0000 (UTC)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby silver.osuosl.org (Postfix) with ESMTPS id CFA6524312\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 12 Jun 2017 21:51:25 +0000 (UTC)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga105.jf.intel.com with ESMTP; 12 Jun 2017 14:51:25 -0700",
            "from brjemmet-dell1.amr.corp.intel.com (HELO\n\tjtkirshe-DESK.amr.corp.intel.com.com) ([10.254.118.5])\n\tby fmsmga004.fm.intel.com with ESMTP; 12 Jun 2017 14:51:24 -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.39,335,1493708400\"; d=\"scan'208\";a=\"273355176\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 12 Jun 2017 14:51:18 -0700",
        "Message-Id": "<20170612215118.17642-1-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.12.2",
        "Subject": "[Intel-wired-lan] i40e: fix handling of HW ATR eviction",
        "X-BeenThere": "intel-wired-lan@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.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@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@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Jacob Keller <jacob.e.keller@intel.com>\n\nA recent commit to refactor the driver and remove the hw_disabled_flags\nfield accidentally introduced two regressions. First, we overwrote\npf->flags which removed various key flags including the MSI-X settings.\n\nAdditionally, it was intended that we have now two flags,\nHW_ATR_EVICT_CAPABLe and HW_ATR_EVICT_ENABLED, but this was not done,\nand we accidentally were mis-using HW_ATR_EVICT_CAPABLE everywhere.\n\nThis patch adds the missing piece, HW_ATR_EVICT_ENABLED, and safely\nupdates pf->flags instead of overwriting it.\n\nWithout this patch we will have many problems including disabling MSI-X\nsupport, and we'll attempt to use HW ATR eviction on devices which do\nnot support it.\n\nFixes: 47994c119a36 (\"i40e: remove hw_disabled_flags in favor of using separate flag bits\", 2017-04-19)\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h         |    1 +\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c |    4 ++--\n drivers/net/ethernet/intel/i40e/i40e_main.c    |    7 ++++---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c    |    4 ++--\n 4 files changed, 9 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 60dc9b2c19ff..395ca94faf80 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -399,6 +399,7 @@ struct i40e_pf {\n #define I40E_FLAG_RX_CSUM_ENABLED\t\tBIT_ULL(1)\n #define I40E_FLAG_MSI_ENABLED\t\t\tBIT_ULL(2)\n #define I40E_FLAG_MSIX_ENABLED\t\t\tBIT_ULL(3)\n+#define I40E_FLAG_HW_ATR_EVICT_ENABLED\t\tBIT_ULL(4)\n #define I40E_FLAG_RSS_ENABLED\t\t\tBIT_ULL(6)\n #define I40E_FLAG_VMDQ_ENABLED\t\t\tBIT_ULL(7)\n #define I40E_FLAG_IWARP_ENABLED\t\t\tBIT_ULL(10)\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 35a246f05520..3d58762efbc0 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -225,7 +225,7 @@ static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {\n \tI40E_PRIV_FLAG(\"LinkPolling\", I40E_FLAG_LINK_POLLING_ENABLED, 0),\n \tI40E_PRIV_FLAG(\"flow-director-atr\", I40E_FLAG_FD_ATR_ENABLED, 0),\n \tI40E_PRIV_FLAG(\"veb-stats\", I40E_FLAG_VEB_STATS_ENABLED, 0),\n-\tI40E_PRIV_FLAG(\"hw-atr-eviction\", I40E_FLAG_HW_ATR_EVICT_CAPABLE, 0),\n+\tI40E_PRIV_FLAG(\"hw-atr-eviction\", I40E_FLAG_HW_ATR_EVICT_ENABLED, 0),\n \tI40E_PRIV_FLAG(\"legacy-rx\", I40E_FLAG_LEGACY_RX, 0),\n };\n \n@@ -4093,7 +4093,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \n \t/* Only allow ATR evict on hardware that is capable of handling it */\n \tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)\n-\t\tpf->flags &= ~I40E_FLAG_HW_ATR_EVICT_CAPABLE;\n+\t\tpf->flags &= ~I40E_FLAG_HW_ATR_EVICT_ENABLED;\n \n \tif (changed_flags & I40E_FLAG_TRUE_PROMISC_SUPPORT) {\n \t\tu16 sw_flags = 0, valid_flags = 0;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex abab7fb7a3fc..98fb644a580e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -8823,11 +8823,12 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \t\t    (pf->hw.aq.api_min_ver > 4))) {\n \t\t/* Supported in FW API version higher than 1.4 */\n \t\tpf->flags |= I40E_FLAG_GENEVE_OFFLOAD_CAPABLE;\n-\t\tpf->flags = I40E_FLAG_HW_ATR_EVICT_CAPABLE;\n-\t} else {\n-\t\tpf->flags = I40E_FLAG_HW_ATR_EVICT_CAPABLE;\n \t}\n \n+\t/* Enable HW ATR eviction if possible */\n+\tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)\n+\t\tpf->flags |= I40E_FLAG_HW_ATR_EVICT_ENABLED;\n+\n \tpf->eeprom_version = 0xDEAD;\n \tpf->lan_veb = I40E_NO_VEB;\n \tpf->lan_vsi = I40E_NO_VSI;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex ddf885084c77..af554f3cda19 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -2341,7 +2341,7 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t/* Due to lack of space, no more new filters can be programmed */\n \tif (th->syn && (pf->flags & I40E_FLAG_FD_ATR_AUTO_DISABLED))\n \t\treturn;\n-\tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE) {\n+\tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_ENABLED) {\n \t\t/* HW ATR eviction will take care of removing filters on FIN\n \t\t * and RST packets.\n \t\t */\n@@ -2403,7 +2403,7 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t\t\tI40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &\n \t\t\tI40E_TXD_FLTR_QW1_CNTINDEX_MASK;\n \n-\tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)\n+\tif (pf->flags & I40E_FLAG_HW_ATR_EVICT_ENABLED)\n \t\tdtype_cmd |= I40E_TXD_FLTR_QW1_ATR_MASK;\n \n \tfdir_desc->qindex_flex_ptype_vsi = cpu_to_le32(flex_ptype);\n",
    "prefixes": []
}