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  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]
Date:	Thu, 11 Nov 2010 09:40:29 -0800
From:	Jesse Gross <jesse@...ira.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Patrick McHardy <kaber@...sh.net>
Subject: Re: [PATCH net-next-2.6] vlan: lockless transmit path

On Thu, Nov 11, 2010 at 1:42 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> vlan is a stacked device, like tunnels. We should use the lockless
> mechanism we are using in tunnels and loopback.
>
> This patch completely removes locking in TX path.
>
> tx stat counters are added into existing percpu stat structure, renamed
> from vlan_rx_stats to vlan_pcpu_stats.
>
> Note : this partially reverts commit 2e59af3dcbdf (vlan: multiqueue vlan
> device)
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Patrick McHardy <kaber@...sh.net>
> ---
>  net/8021q/vlan.c         |    4 -
>  net/8021q/vlan.h         |   16 +++++--
>  net/8021q/vlan_core.c    |    4 -
>  net/8021q/vlan_dev.c     |   78 +++++++++++++++++++++----------------
>  net/8021q/vlan_netlink.c |   20 ---------
>  5 files changed, 59 insertions(+), 63 deletions(-)
>
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 52077ca..2f54ce8 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -272,13 +272,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
>                snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
>        }
>
> -       new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name,
> -                                 vlan_setup, real_dev->num_tx_queues);
> +       new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, vlan_setup);

If we're only allocating a single queue then we should also drop
vlan_dev_select_queue() and the netdev_ops that call it.  If the
underlying device is multiqueue and has its own select_queue function
then it can pick a queue number that is larger than what the vlan
device has.  The problem will be caught by dev_cap_txqueue() but it's
not right and it would also be nice to get rid of half of those
netdev_ops.
--
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