vlan: updates vlan real_num_tx_queues

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, March 26, 2010 - 9:59 am

Gitweb:     http://git.kernel.org/linus/f6b9f4b263f3178fc0f23f0e67d04386528cc727
Commit:     f6b9f4b263f3178fc0f23f0e67d04386528cc727
Parent:     669d3e0babb40018dd6e78f4093c13a2eac73866
Author:     Vasu Dev <vasu.dev@intel.com>
AuthorDate: Tue Mar 23 14:42:05 2010 +0000
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Wed Mar 24 11:11:38 2010 -0700

    vlan: updates vlan real_num_tx_queues
    
    Updates real_num_tx_queues in case underlying real device
    has changed real_num_tx_queues.
    
    -v2
     As per Eric Dumazet<eric.dumazet@gmail.com> comment:-
       -- adds BUG_ON to catch case of real_num_tx_queues exceeding num_tx_queues.
       -- created this self contained patch to just update real_num_tx_queues.
    
    Signed-off-by: Vasu Dev <vasu.dev@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/8021q/vlan.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 4535122..db783d7 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -378,6 +378,8 @@ static void vlan_transfer_features(struct net_device *dev,
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
 	vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
 #endif
+	vlandev->real_num_tx_queues = dev->real_num_tx_queues;
+	BUG_ON(vlandev->real_num_tx_queues > vlandev->num_tx_queues);
 
 	if (old_features != vlandev->features)
 		netdev_features_change(vlandev);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
vlan: updates vlan real_num_tx_queues, Linux Kernel Mailing ..., (Fri Mar 26, 9:59 am)