Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/501313/?format=api
{ "id": 501313, "url": "http://patchwork.ozlabs.org/api/patches/501313/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1438102920-189224-1-git-send-email-catherine.sullivan@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": "<1438102920-189224-1-git-send-email-catherine.sullivan@intel.com>", "list_archive_url": null, "date": "2015-07-28T17:02:00", "name": "[net] i40e: Set defport behavior for the Main VSI when in promiscuous mode", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a336982967ff9261b92e7032b8ebfe99e0fc6bd6", "submitter": { "id": 13931, "url": "http://patchwork.ozlabs.org/api/people/13931/?format=api", "name": "Catherine Sullivan", "email": "catherine.sullivan@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/1438102920-189224-1-git-send-email-catherine.sullivan@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/501313/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/501313/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 9053E140DFC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 29 Jul 2015 03:00:42 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AFAC99569C;\n\tTue, 28 Jul 2015 17:00:41 +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 5tDtAV2Uzo1u; Tue, 28 Jul 2015 17:00:40 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C22E29568F;\n\tTue, 28 Jul 2015 17:00:39 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2DC941CE8AA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 28 Jul 2015 17:00:39 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1B23F91B76\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 28 Jul 2015 17:00:39 +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 HeRuaE+rrOOa for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 28 Jul 2015 17:00:38 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6ED7491B73\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 28 Jul 2015 17:00:38 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga103.fm.intel.com with ESMTP; 28 Jul 2015 10:00:07 -0700", "from catheri1-tigger.jf.intel.com ([134.134.176.92])\n\tby orsmga001.jf.intel.com with ESMTP; 28 Jul 2015 10:00:06 -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.15,564,1432623600\"; d=\"scan'208\";a=\"737257330\"", "From": "Catherine Sullivan <catherine.sullivan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 28 Jul 2015 13:02:00 -0400", "Message-Id": "<1438102920-189224-1-git-send-email-catherine.sullivan@intel.com>", "X-Mailer": "git-send-email 1.9.3", "Cc": "Anjali Singhai Jain <anjali.singhai@intel.com>", "Subject": "[Intel-wired-lan] [net PATCH] i40e: Set defport behavior for the\n\tMain VSI when in promiscuous mode", "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: Anjali Singhai Jain <anjali.singhai@intel.com>\n\nThis fixes bugs where the port is not receiving multicast or vlan tagged\npackets when in promiscuous mode. This can occur when a SW bridge is\ncreated on top of the device.\n\nThis also fixes issues where the promiscuous behavior setting was not\nbeing preserved across a reset caused by features being enabled or\ndisabled.\n\nWe are using defport instead of doing a true promiscuous mode because we do\nnot need to receive the SRIOV or VMDq VSI directed traffic which would suck\nup bandwidth and is really not intended for the SW bridge.\n\nIn addition, with defport we get VLAN promiscuous behavior which is not\npossible from the VSI level promiscuous setting.\n\nSigned-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>\nChange-ID: Ie21985eac32d5af1c02e9d71c6430a90d5bab40f\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 1 +\n drivers/net/ethernet/intel/i40e/i40e_main.c | 36 ++++++++++++++++++++++++-----\n 2 files changed, 31 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex ec76c3f..2198991 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -362,6 +362,7 @@ struct i40e_pf {\n #ifdef CONFIG_DEBUG_FS\n \tstruct dentry *i40e_dbg_pf;\n #endif /* CONFIG_DEBUG_FS */\n+\tbool cur_promisc;\n \n \tu16 instance; /* A unique number per i40e_pf instance in the system */\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 48a52b3..9295768 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -1885,13 +1885,36 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)\n \t\tcur_promisc = (!!(vsi->current_netdev_flags & IFF_PROMISC) ||\n \t\t\t test_bit(__I40E_FILTER_OVERFLOW_PROMISC,\n \t\t\t\t\t&vsi->state));\n-\t\taq_ret = i40e_aq_set_vsi_unicast_promiscuous(&vsi->back->hw,\n+\t\tif (vsi->type == I40E_VSI_MAIN && pf->lan_veb != I40E_NO_VEB) {\n+\t\t\t/* set defport ON for Main VSI instead of true promisc\n+\t\t\t * this way we will get all unicast/multicast and vlan\n+\t\t\t * promisc behavior but will not get VF or VMDq traffic\n+\t\t\t * replicated on the Main VSI.\n+\t\t\t */\n+\t\t\tif (pf->cur_promisc != cur_promisc) {\n+\t\t\t\tpf->cur_promisc = cur_promisc;\n+\t\t\t\ti40e_do_reset_safe(pf,\n+\t\t\t\t\t\tBIT(__I40E_PF_RESET_REQUESTED));\n+\t\t\t}\n+\t\t} else {\n+\t\t\taq_ret = i40e_aq_set_vsi_unicast_promiscuous(\n+\t\t\t\t\t\t\t &vsi->back->hw,\n \t\t\t\t\t\t\t vsi->seid,\n \t\t\t\t\t\t\t cur_promisc, NULL);\n-\t\tif (aq_ret)\n-\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"set uni promisc failed, err %d, aq_err %d\\n\",\n-\t\t\t\t aq_ret, pf->hw.aq.asq_last_status);\n+\t\t\tif (aq_ret)\n+\t\t\t\tdev_info(&pf->pdev->dev,\n+\t\t\t\t\t \"set unicast promisc failed, err %d, aq_err %d\\n\",\n+\t\t\t\t\t aq_ret, pf->hw.aq.asq_last_status);\n+\t\t\taq_ret = i40e_aq_set_vsi_multicast_promiscuous(\n+\t\t\t\t\t\t\t\t&vsi->back->hw,\n+\t\t\t\t\t\t\t\tvsi->seid,\n+\t\t\t\t\t\t\t\tcur_promisc,\n+\t\t\t\t\t\t\t\tNULL);\n+\t\t\tif (aq_ret)\n+\t\t\t\tdev_info(&pf->pdev->dev,\n+\t\t\t\t\t \"set multicast promisc failed, err %d, aq_err %d\\n\",\n+\t\t\t\t\t aq_ret, pf->hw.aq.asq_last_status);\n+\t\t}\n \t\taq_ret = i40e_aq_set_vsi_broadcast(&vsi->back->hw,\n \t\t\t\t\t\t vsi->seid,\n \t\t\t\t\t\t cur_promisc, NULL);\n@@ -3929,6 +3952,7 @@ static void i40e_vsi_close(struct i40e_vsi *vsi)\n \ti40e_vsi_free_irq(vsi);\n \ti40e_vsi_free_tx_resources(vsi);\n \ti40e_vsi_free_rx_resources(vsi);\n+\tvsi->current_netdev_flags = 0;\n }\n \n /**\n@@ -9090,7 +9114,7 @@ void i40e_veb_release(struct i40e_veb *veb)\n **/\n static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi)\n {\n-\tbool is_default = false;\n+\tbool is_default = veb->pf->cur_promisc;\n \tbool is_cloud = false;\n \tint ret;\n \n", "prefixes": [ "net" ] }