Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/666790/?format=api
{ "id": 666790, "url": "http://patchwork.ozlabs.org/api/patches/666790/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1473210312-29592-8-git-send-email-bimmy.pujari@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": "<1473210312-29592-8-git-send-email-bimmy.pujari@intel.com>", "list_archive_url": null, "date": "2016-09-07T01:05:09", "name": "[next,S45,07/10] i40e: cleanup ATR auto_disable_flags use", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a10168dde22dbc591b60a33e2ff04ab6880c7aac", "submitter": { "id": 68919, "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api", "name": "Pujari, Bimmy", "email": "bimmy.pujari@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/1473210312-29592-8-git-send-email-bimmy.pujari@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/666790/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/666790/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\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 3sTQJP12H2z9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 7 Sep 2016 11:05:57 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id AF5408C008;\n\tWed, 7 Sep 2016 01:05:55 +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 kb1-1RThzU9F; Wed, 7 Sep 2016 01:05:52 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3D89E8BFFE;\n\tWed, 7 Sep 2016 01:05:52 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id F05B01C1035\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Sep 2016 01:05:46 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id EB74384613\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Sep 2016 01:05:46 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id HMfkGI6wKP1s for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Sep 2016 01:05:45 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id C8FBDC0935\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Sep 2016 01:05:45 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP; 06 Sep 2016 18:05:45 -0700", "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.177])\n\tby fmsmga002.fm.intel.com with ESMTP; 06 Sep 2016 18:05:46 -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.30,294,1470726000\"; d=\"scan'208\";\n\ta=\"1052338769\"", "From": "Bimmy Pujari <bimmy.pujari@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 6 Sep 2016 18:05:09 -0700", "Message-Id": "<1473210312-29592-8-git-send-email-bimmy.pujari@intel.com>", "X-Mailer": "git-send-email 2.4.11", "In-Reply-To": "<1473210312-29592-1-git-send-email-bimmy.pujari@intel.com>", "References": "<1473210312-29592-1-git-send-email-bimmy.pujari@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S45 07/10] i40e: cleanup ATR\n\tauto_disable_flags use", "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": "From: Jacob Keller <jacob.e.keller@intel.com>\n\nSome locations that disable ATR accidentally used the \"full\" disable by\ndisabling the flag in the standard flags field. This incorrectly forces\nATR off permanently instead of temporarily disabling it. In addition,\nsome code locations accidentally set the ATR flag enabled when they only\nmeant to clear the auto_disable_flags. This results in ignoring the\nuser's ethtool private flag settings.\n\nAdditionally, when disabling ATR via ethtool, we did not perform a flush\nof the FD table. This results in the previously assigned ATR rules still\nfunctioning which was not expected.\n\nCleanup all these areas so that automatic disable uses only the\nauto_disable_flag. Fix the flush code so that we can trigger a flush\neven when we've disabled ATR and SB support, as otherwise the flush\ndoesn't work. Fix ethtool setting to actually request a flush. Fix\nNETIF_F_NTUPLE flag to only clear the auto_disable setting and not\nenable the full feature.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nChange-ID: Ib2486111f8031bd16943e9308757b276305c03b5\n---\nTesting-hints:\n See the marked HSDs for details\n\nHSD-number: 5645176, 5645175\n\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +++\n drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++++-------------\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 14 +++++++-------\n 3 files changed, 17 insertions(+), 20 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 2b2b55e..e842628 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -3021,6 +3021,9 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \t} else {\n \t\tpf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n \t\tpf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;\n+\n+\t\t/* flush current ATR settings */\n+\t\tset_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);\n \t}\n \n \tif ((flags & I40E_PRIV_FLAGS_VEB_STATS) &&\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 4c3c6ce..9ab15e2d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -5226,7 +5226,7 @@ static int i40e_up_complete(struct i40e_vsi *vsi)\n \t\t/* reset fd counters */\n \t\tpf->fd_add_err = pf->fd_atr_cnt = 0;\n \t\tif (pf->fd_tcp_rule > 0) {\n-\t\t\tpf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n+\t\t\tpf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;\n \t\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n \t\t\t\tdev_info(&pf->pdev->dev, \"Forcing ATR off, sideband rules for TCP/IPv4 exist\\n\");\n \t\t\tpf->fd_tcp_rule = 0;\n@@ -5960,9 +5960,6 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)\n \tint fd_room;\n \tint reg;\n \n-\tif (!(pf->flags & (I40E_FLAG_FD_SB_ENABLED | I40E_FLAG_FD_ATR_ENABLED)))\n-\t\treturn;\n-\n \tif (!time_after(jiffies, pf->fd_flush_timestamp +\n \t\t\t\t (I40E_MIN_FD_FLUSH_INTERVAL * HZ)))\n \t\treturn;\n@@ -5982,7 +5979,7 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)\n \t}\n \n \tpf->fd_flush_timestamp = jiffies;\n-\tpf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n+\tpf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;\n \t/* flush all filters */\n \twr32(&pf->hw, I40E_PFQF_CTL_1,\n \t I40E_PFQF_CTL_1_CLEARFDTABLE_MASK);\n@@ -6002,7 +5999,7 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)\n \t\t/* replay sideband filters */\n \t\ti40e_fdir_filter_restore(pf->vsi[pf->lan_vsi]);\n \t\tif (!disable_atr)\n-\t\t\tpf->flags |= I40E_FLAG_FD_ATR_ENABLED;\n+\t\t\tpf->auto_disable_flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n \t\tclear_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);\n \t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n \t\t\tdev_info(&pf->pdev->dev, \"FD Filter table flushed and FD-SB replayed.\\n\");\n@@ -6036,9 +6033,6 @@ static void i40e_fdir_reinit_subtask(struct i40e_pf *pf)\n \tif (test_bit(__I40E_DOWN, &pf->state))\n \t\treturn;\n \n-\tif (!(pf->flags & (I40E_FLAG_FD_SB_ENABLED | I40E_FLAG_FD_ATR_ENABLED)))\n-\t\treturn;\n-\n \tif (test_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state))\n \t\ti40e_fdir_flush_and_replay(pf);\n \n@@ -8665,13 +8659,13 @@ bool i40e_set_ntuple(struct i40e_pf *pf, netdev_features_t features)\n \t\t/* reset fd counters */\n \t\tpf->fd_add_err = pf->fd_atr_cnt = pf->fd_tcp_rule = 0;\n \t\tpf->fdir_pf_active_filters = 0;\n-\t\tpf->flags |= I40E_FLAG_FD_ATR_ENABLED;\n-\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n-\t\t\tdev_info(&pf->pdev->dev, \"ATR re-enabled.\\n\");\n \t\t/* if ATR was auto disabled it can be re-enabled. */\n \t\tif ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&\n-\t\t (pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED))\n+\t\t (pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED)) {\n \t\t\tpf->auto_disable_flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n+\t\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n+\t\t\t\tdev_info(&pf->pdev->dev, \"ATR re-enabled.\\n\");\n+\t\t}\n \t}\n \treturn need_reset;\n }\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex bf7bb7c..7ada05e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -282,18 +282,18 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,\n \n \tif (add) {\n \t\tpf->fd_tcp_rule++;\n-\t\tif (pf->flags & I40E_FLAG_FD_ATR_ENABLED) {\n-\t\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n-\t\t\t\tdev_info(&pf->pdev->dev, \"Forcing ATR off, sideband rules for TCP/IPv4 flow being applied\\n\");\n-\t\t\tpf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n-\t\t}\n+\t\tif ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&\n+\t\t I40E_DEBUG_FD & pf->hw.debug_mask)\n+\t\t\tdev_info(&pf->pdev->dev, \"Forcing ATR off, sideband rules for TCP/IPv4 flow being applied\\n\");\n+\t\tpf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;\n \t} else {\n \t\tpf->fd_tcp_rule = (pf->fd_tcp_rule > 0) ?\n \t\t\t\t (pf->fd_tcp_rule - 1) : 0;\n \t\tif (pf->fd_tcp_rule == 0) {\n-\t\t\tpf->flags |= I40E_FLAG_FD_ATR_ENABLED;\n-\t\t\tif (I40E_DEBUG_FD & pf->hw.debug_mask)\n+\t\t\tif ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&\n+\t\t\t I40E_DEBUG_FD & pf->hw.debug_mask)\n \t\t\t\tdev_info(&pf->pdev->dev, \"ATR re-enabled due to no sideband TCP/IPv4 rules\\n\");\n+\t\t\tpf->auto_disable_flags &= ~I40E_FLAG_FD_ATR_ENABLED;\n \t\t}\n \t}\n \n", "prefixes": [ "next", "S45", "07/10" ] }