Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1203249/?format=api
{ "id": 1203249, "url": "http://patchwork.ozlabs.org/api/patches/1203249/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191127090355.27708-1-cambda@linux.alibaba.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": "<20191127090355.27708-1-cambda@linux.alibaba.com>", "list_archive_url": null, "date": "2019-11-27T09:03:55", "name": "ixgbe: Fix calculation of queue with VFs and flow director on interface flap", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f0a16f3f992e09bbba9b3cbbba7500ebfb76e85c", "submitter": { "id": 78003, "url": "http://patchwork.ozlabs.org/api/people/78003/?format=api", "name": "Cambda Zhu", "email": "cambda@linux.alibaba.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/20191127090355.27708-1-cambda@linux.alibaba.com/mbox/", "series": [ { "id": 146062, "url": "http://patchwork.ozlabs.org/api/series/146062/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=146062", "date": "2019-11-27T09:03:55", "name": "ixgbe: Fix calculation of queue with VFs and flow director on interface flap", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/146062/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1203249/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1203249/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" ], "Authentication-Results": [ "ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.133;\n\thelo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=linux.alibaba.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 47RYlf2SZLz9sP3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 3 Dec 2019 05:38:21 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B3D2988601;\n\tMon, 2 Dec 2019 18:38: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 fzYZbsn4XVPs; Mon, 2 Dec 2019 18:38:17 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id CBC6C88600;\n\tMon, 2 Dec 2019 18:38:17 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6CBF71BF3DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Nov 2019 09:10:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 684C887662\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Nov 2019 09:10:03 +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 n1UUQT7Tg1+A for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Nov 2019 09:10:02 +0000 (UTC)", "from out30-133.freemail.mail.aliyun.com\n\t(out30-133.freemail.mail.aliyun.com [115.124.30.133])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 3554F847D9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Nov 2019 09:10:01 +0000 (UTC)", "from localhost(mailfrom:cambda@linux.alibaba.com\n\tfp:SMTPD_---0TjDNUDL_1574845494) by smtp.aliyun-inc.com(127.0.0.1);\n\tWed, 27 Nov 2019 17:04:55 +0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "delayed 00:05:04 by SQLgrey-1.7.6", "X-Alimail-AntiSpam": "AC=PASS; BC=-1|-1; BR=01201311R731e4; CH=green;\n\tDM=||false|; \n\tDS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04426;\n\tMF=cambda@linux.alibaba.com; \n\tNM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0TjDNUDL_1574845494; ", "From": "Cambda Zhu <cambda@linux.alibaba.com>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "Date": "Wed, 27 Nov 2019 17:03:55 +0800", "Message-Id": "<20191127090355.27708-1-cambda@linux.alibaba.com>", "X-Mailer": "git-send-email 2.16.5", "X-Mailman-Approved-At": "Mon, 02 Dec 2019 18:38:16 +0000", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Fix calculation of queue with VFs\n\tand flow director on interface flap", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "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>", "Cc": "Cambda Zhu <cambda@linux.alibaba.com>,\n\tRadoslaw Tyl <radoslawx.tyl@intel.com>, netdev@vger.kernel.org,\n\tJoseph Qi <joseph.qi@linux.alibaba.com>,\n\tintel-wired-lan@lists.osuosl.org, \n\t\"David S. Miller\" <davem@davemloft.net>", "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": "This patch fixes the calculation of queue when we restore flow director\nfilters after resetting adapter. In ixgbe_fdir_filter_restore(), filter's\nvf may be zero which makes the queue outside of the rx_ring array.\n\nThe calculation is changed to the same as ixgbe_add_ethtool_fdir_entry().\n\nSigned-off-by: Cambda Zhu <cambda@linux.alibaba.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 37 +++++++++++++++++++--------\n 1 file changed, 27 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 25c097cd8100..6d5be31cc9cb 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -5239,7 +5239,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tstruct hlist_node *node2;\n \tstruct ixgbe_fdir_filter *filter;\n-\tu64 action;\n+\tu8 queue;\n \n \tspin_lock(&adapter->fdir_perfect_lock);\n \n@@ -5248,17 +5248,34 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)\n \n \thlist_for_each_entry_safe(filter, node2,\n \t\t\t\t &adapter->fdir_filter_list, fdir_node) {\n-\t\taction = filter->action;\n-\t\tif (action != IXGBE_FDIR_DROP_QUEUE && action != 0)\n-\t\t\taction =\n-\t\t\t(action >> ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF) - 1;\n+\t\tif (filter->action == IXGBE_FDIR_DROP_QUEUE) {\n+\t\t\tqueue = IXGBE_FDIR_DROP_QUEUE;\n+\t\t} else {\n+\t\t\tu32 ring = ethtool_get_flow_spec_ring(filter->action);\n+\t\t\tu8 vf = ethtool_get_flow_spec_ring_vf(filter->action);\n+\n+\t\t\tif (!vf && (ring >= adapter->num_rx_queues)) {\n+\t\t\t\te_err(drv, \"FDIR restore failed without VF, \"\n+\t\t\t\t \"ring: %u\\n\", ring);\n+\t\t\t\tcontinue;\n+\t\t\t} else if (vf &&\n+\t\t\t\t ((vf > adapter->num_vfs) ||\n+\t\t\t\t ring >= adapter->num_rx_queues_per_pool)) {\n+\t\t\t\te_err(drv, \"FDIR restore failed with VF, \"\n+\t\t\t\t \"vf: %hhu, ring: %u\\n\", vf, ring);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\t/* Map the ring onto the absolute queue index */\n+\t\t\tif (!vf)\n+\t\t\t\tqueue = adapter->rx_ring[ring]->reg_idx;\n+\t\t\telse\n+\t\t\t\tqueue = ((vf - 1) *\n+\t\t\t\t\tadapter->num_rx_queues_per_pool) + ring;\n+\t\t}\n \n \t\tixgbe_fdir_write_perfect_filter_82599(hw,\n-\t\t\t\t&filter->filter,\n-\t\t\t\tfilter->sw_idx,\n-\t\t\t\t(action == IXGBE_FDIR_DROP_QUEUE) ?\n-\t\t\t\tIXGBE_FDIR_DROP_QUEUE :\n-\t\t\t\tadapter->rx_ring[action]->reg_idx);\n+\t\t\t\t&filter->filter, filter->sw_idx, queue);\n \t}\n \n \tspin_unlock(&adapter->fdir_perfect_lock);\n", "prefixes": [] }