Subject: Re: [PATCH] ifb: add multi-queue support

From: Stephen Hemminger <[email-masked]>
Date: Tue, 10 Nov 2009 08:45:16 -0800

On Tue, 10 Nov 2009 21:49:31 +0800
Changli Gao <[email-masked]> wrote:

> On Tue, Nov 10, 2009 at 9:34 PM, Eric Dumazet <[email-masked]> wrote:
> > Changli Gao a écrit :
> >
> > I believe Patrick was referring to vlan get_tx_queues() implementation,
> > but it actually gets values from real device (tb[IFLA_LINK])
> >
> > In your case you'll need to add a new IFLA_NTXQ attribute, and
> > change iproute2 to pass this new attribute at link creation.
> > (check include/linux/if_link.h)
> >
> > ip link add link .....  ntxq 2
> >
> > static int vlan_get_tx_queues(struct net *net,
> >                              struct nlattr *tb[],
> >                              unsigned int *num_tx_queues,
> >                              unsigned int *real_num_tx_queues)
> > {
> >        struct net_device *real_dev;
> >
> >        if (!tb[IFLA_LINK])
> >                return -EINVAL;
> >
> >        real_dev = __dev_get_by_index(net, nla_get_u32(tb[IFLA_LINK]));
> >        if (!real_dev)
> >                return -ENODEV;
> >
> >        *num_tx_queues      = real_dev->num_tx_queues;
> >        *real_num_tx_queues = real_dev->real_num_tx_queues;
> >        return 0;
> > }
> >
> >
> >
> 
> got it. Thanks. BTW: why not merge iproute2 into linux, just like perf.
> 

Distro's would find that hard, also it would cause people to forgot binary
API compatibility.

--