diff mbox

[net-next,07/25] fm10k: allow creation of VLAN on default vid

Message ID 1428092835-16834-7-git-send-email-jeffrey.t.kirsher@intel.com
State Changes Requested
Delegated to: Jeff Kirsher
Headers show

Commit Message

Kirsher, Jeffrey T April 3, 2015, 8:26 p.m. UTC
Previously, the user was not allowed to create a VLAN interface on top
of the switch default vid.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Kirsher, Jeffrey T April 3, 2015, 9:02 p.m. UTC | #1
On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top
> of the switch default vid.
> 
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
>  drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
>  1 file changed, 4 deletions(-)

I have applied to my queue.
Alexander H Duyck April 4, 2015, 5:39 p.m. UTC | #2
On 04/03/2015 01:26 PM, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top
> of the switch default vid.
>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
>  drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> index 2a61b83..c9f87bb 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> @@ -770,10 +770,6 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
>  	if (hw->mac.vlan_override)
>  		return -EACCES;
>  
> -	/* if default VLAN is already present do nothing */
> -	if (vid == hw->mac.default_vid)
> -		return -EBUSY;
> -
>  	/* update active_vlans bitmask */
>  	set_bit(vid, interface->active_vlans);
>  	if (!set)

Instead of removing this it should probably just return 0 and move it
down a few lines after setting or clearing the bit.  Otherwise you will
strip the default VLAN on removal and I am pretty sure that will disable
all receives until the interface is reset and restores VLAN 0 from the
VF which maps to the default VLAN.

- Alex
Singh, Krishneil K April 14, 2015, 7:45 p.m. UTC | #3
-----Original Message-----
From: Kirsher, Jeffrey T 
Sent: Friday, April 3, 2015 2:03 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Keller, Jacob E; Singh, Krishneil K
Subject: Re: [net-next 07/25] fm10k: allow creation of VLAN on default vid

On Fri, 2015-04-03 at 13:26 -0700, Jeff Kirsher wrote:
> Previously, the user was not allowed to create a VLAN interface on top 
> of the switch default vid.
> 
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Matthew Vick <matthew.vick@intel.com>
> ---
>  drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ----
>  1 file changed, 4 deletions(-)

I have applied to my queue.
--
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue

Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 2a61b83..c9f87bb 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -770,10 +770,6 @@  static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
 	if (hw->mac.vlan_override)
 		return -EACCES;
 
-	/* if default VLAN is already present do nothing */
-	if (vid == hw->mac.default_vid)
-		return -EBUSY;
-
 	/* update active_vlans bitmask */
 	set_bit(vid, interface->active_vlans);
 	if (!set)