lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1266414675.3246.12.camel@edumazet-laptop>
Date:	Wed, 17 Feb 2010 14:51:15 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org, gospo@...hat.com,
	Vasu Dev <vasu.dev@...el.com>
Subject: Re: [net-next-2.6 PATCH 1/3] vlan: adds vlan_dev_select_queue

Le mercredi 17 février 2010 à 04:36 -0800, Jeff Kirsher a écrit :
> From: Vasu Dev <vasu.dev@...el.com>
> 
> This is required to correctly select vlan tx queue for a driver
> supporting multi tx queue with ndo_select_queue implemented since
> currently selected vlan tx queue is unaligned to selected queue by
> ndo_select_queue.
> 
> Unaligned vlan tx queue causes thrash with higher vlan tx lock
> contention for least fcoe traffic on ixgbe.
> 
> Added vlan_dev_select_queue adds only minimal required code from
> dev_pick_tx and preserves queue selection for the case ndo_select_queue
> is not implemented.
> 
> Also updates vlan real_num_tx_queues in case underlying device
> queues has changed.
> 
> Signed-off-by: Vasu Dev <vasu.dev@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
> 
>  net/8021q/vlan.c     |    1 +
>  net/8021q/vlan_dev.c |   23 +++++++++++++++++++++++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 4535122..6c70805 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -378,6 +378,7 @@ 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;

Hi Jeff

This is a bit dangerous and deserves a self contained patch IMHO.

I would add for example a
	BUG_ON(vlandev->real_num_tx_queues > vlandev->num_tx_queues)

------------------

For performance reason, we could avoid calling vlan_dev_select_queue()
for real devices without ndo_select_queue() handler, this would need to
mirror vlan_netdev_ops & vlan_netdev_accel_ops.

It would also make vlan_dev_select_queue shorter and not duplicates
internals of net/dev/core.c :

static u16 vlan_dev_select_queue(struct net_device *dev, struct sk_buff
*skb)
{
       struct net_device *rdev = vlan_dev_info(dev)->real_dev;
       const struct net_device_ops *ops = rdev->netdev_ops;

       return ops->ndo_select_queue(rdev, skb);
}




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ