From patchwork Tue Jan 14 00:13:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Brown, Aaron F" X-Patchwork-Id: 310415 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EF8972C0081 for ; Tue, 14 Jan 2014 11:13:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbaANANM (ORCPT ); Mon, 13 Jan 2014 19:13:12 -0500 Received: from mga02.intel.com ([134.134.136.20]:26269 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbaANANK (ORCPT ); Mon, 13 Jan 2014 19:13:10 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 13 Jan 2014 16:13:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,656,1384329600"; d="scan'208";a="466126866" Received: from s252.jf.intel.com ([10.23.155.219]) by orsmga002.jf.intel.com with ESMTP; 13 Jan 2014 16:13:07 -0800 From: Aaron Brown To: davem@davemloft.net Cc: Greg Rose , netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com, Aaron Brown Subject: [net-next 1/2] i40e: Warn admin to reload VF driver on port VLAN configuration Date: Mon, 13 Jan 2014 16:13:03 -0800 Message-Id: <1389658384-15825-2-git-send-email-aaron.f.brown@intel.com> X-Mailer: git-send-email 1.8.5.GIT In-Reply-To: <1389658384-15825-1-git-send-email-aaron.f.brown@intel.com> References: <1389658384-15825-1-git-send-email-aaron.f.brown@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Greg Rose The i40e Physical Function (PF) driver will allow the Virtual Function (VF) driver to configure its own VLAN filters if no port VLAN filter has been configured. This leads to the possibility of the administrator setting a port VLAN filter for the VF after the VF has already configured its own VLAN filters. This leads to a conflict that can only be resolved by reloading the VF driver. When the conflicting administrative command is detected in setting the port VLAN then log a message indicating to the system administrator that he must now reload the VF driver for the new port VLAN settings to take effect. Change-Id: I8de73b885d944a043aff32226297e4249862bcad Signed-off-by: Greg Rose Tested-by: Sibai Li Signed-off-by: Aaron Brown --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index d04a776..ecb873c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -2076,6 +2076,11 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, goto error_pvid; } + if (vsi->info.pvid == 0 && i40e_is_vsi_in_vlan(vsi)) + dev_err(&pf->pdev->dev, + "VF %d has already configured VLAN filters and the administrator is requesting a port VLAN override.\nPlease unload and reload the VF driver for this change to take effect.\n", + vf_id); + if (vsi->info.pvid) { /* kill old VLAN */ ret = i40e_vsi_kill_vlan(vsi, (le16_to_cpu(vsi->info.pvid) &