Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807199/?format=api
{ "id": 807199, "url": "http://patchwork.ozlabs.org/api/patches/807199/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170829093242.41026-1-alice.michael@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": "<20170829093242.41026-1-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-08-29T09:32:30", "name": "[next,S79-V2,01/13] i40e: add private flag to control source pruning", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7518171e08406d77988c3f6e8ca1bf26a46fb6fc", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@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/20170829093242.41026-1-alice.michael@intel.com/mbox/", "series": [ { "id": 423, "url": "http://patchwork.ozlabs.org/api/series/423/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=423", "date": "2017-08-29T09:32:31", "name": "[next,S79-V2,01/13] i40e: add private flag to control source pruning", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/423/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807199/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807199/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;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3xhbSM3gS1z9t2Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 03:37:39 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7C16886EBF;\n\tTue, 29 Aug 2017 17:37:37 +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 ZxrNNLrnYFXx; Tue, 29 Aug 2017 17:37:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7F97986A91;\n\tTue, 29 Aug 2017 17:37:35 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 492AB1C1F4F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Aug 2017 17:37:34 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4205288B92\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Aug 2017 17:37:34 +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 eNuGY2sAlZWw for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Aug 2017 17:37:33 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 987C2889C8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Aug 2017 17:37:33 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga105.jf.intel.com with ESMTP; 29 Aug 2017 10:37:33 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga003.jf.intel.com with ESMTP; 29 Aug 2017 10:37:33 -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.41,445,1498546800\"; d=\"scan'208\";\n\ta=\"1008934103\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Tue, 29 Aug 2017 05:32:30 -0400", "Message-Id": "<20170829093242.41026-1-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.4", "Cc": "Mitch Williams <mitch.a.williams@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S79-V2 01/13] i40e: add private flag\n\tto control source pruning", "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: Mitch Williams <mitch.a.williams@intel.com>\n\nBy default, our devices do source pruning, that is, they drop receive\npackets that have the source MAC matching one of the receive filters.\nUnfortunately, this breaks ARP monitoring in channel bonding, as the\nbonding driver expects devices to receive ARPs containing their own\nsource address.\n\nAdd an ethtool private flag to control this feature.\n\nAlso, remove the netif_running() check when we process our private\nflags. It's OK to reset when the device is closed and in most cases we\nneed the reset the apply these changes.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 1 +\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 +++++--\n drivers/net/ethernet/intel/i40e/i40e_main.c | 25 +++++++++++++++++++++++++\n 3 files changed, 31 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 890508f..1d1d51f 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -453,6 +453,7 @@ struct i40e_pf {\n #define I40E_FLAG_CLIENT_L2_CHANGE\t\tBIT_ULL(25)\n #define I40E_FLAG_CLIENT_RESET\t\t\tBIT_ULL(26)\n #define I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED\tBIT_ULL(27)\n+#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT_ULL(29)\n \n \tstruct i40e_client_instance *cinst;\n \tbool stat_offsets_loaded;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 9c6c63a..5fab6c5 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -227,6 +227,8 @@ static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {\n \tI40E_PRIV_FLAG(\"veb-stats\", I40E_FLAG_VEB_STATS_ENABLED, 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+\tI40E_PRIV_FLAG(\"disable-source-pruning\",\n+\t\t I40E_FLAG_SOURCE_PRUNING_DISABLED, 0),\n };\n \n #define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_gstrings_priv_flags)\n@@ -4189,8 +4191,9 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \t/* Issue reset to cause things to take effect, as additional bits\n \t * are added we will need to create a mask of bits requiring reset\n \t */\n-\tif ((changed_flags & I40E_FLAG_VEB_STATS_ENABLED) ||\n-\t ((changed_flags & I40E_FLAG_LEGACY_RX) && netif_running(dev)))\n+\tif (changed_flags & (I40E_FLAG_VEB_STATS_ENABLED |\n+\t\t\t I40E_FLAG_LEGACY_RX |\n+\t\t\t I40E_FLAG_SOURCE_PRUNING_DISABLED))\n \t\ti40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true);\n \n \treturn 0;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 32c1914..0083bf4 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9904,6 +9904,31 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)\n \n \t\tenabled_tc = i40e_pf_get_tc_map(pf);\n \n+\t\t/* Source pruning is enabled by default, so the flag is\n+\t\t * negative logic - if it's set, we need to fiddle with\n+\t\t * the VSI to disable source pruning.\n+\t\t */\n+\t\tif (pf->flags & I40E_FLAG_SOURCE_PRUNING_DISABLED) {\n+\t\t\tmemset(&ctxt, 0, sizeof(ctxt));\n+\t\t\tctxt.seid = pf->main_vsi_seid;\n+\t\t\tctxt.pf_num = pf->hw.pf_id;\n+\t\t\tctxt.vf_num = 0;\n+\t\t\tctxt.info.valid_sections |=\n+\t\t\t cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);\n+\t\t\tctxt.info.switch_id =\n+\t\t\t\t cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_LOCAL_LB);\n+\t\t\tret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);\n+\t\t\tif (ret) {\n+\t\t\t\tdev_info(&pf->pdev->dev,\n+\t\t\t\t\t \"update vsi failed, err %s aq_err %s\\n\",\n+\t\t\t\t\t i40e_stat_str(&pf->hw, ret),\n+\t\t\t\t\t i40e_aq_str(&pf->hw,\n+\t\t\t\t\t\t pf->hw.aq.asq_last_status));\n+\t\t\t\tret = -ENOENT;\n+\t\t\t\tgoto err;\n+\t\t\t}\n+\t\t}\n+\n \t\t/* MFP mode setup queue map and update VSI */\n \t\tif ((pf->flags & I40E_FLAG_MFP_ENABLED) &&\n \t\t !(pf->hw.func_caps.iscsi)) { /* NIC type PF */\n", "prefixes": [ "next", "S79-V2", "01/13" ] }