Subject: Re: [PATCH net-next] ifb: add multiqueue operation

From: Alexei Starovoitov <[email-masked]>
Date: Mon, 06 Jul 2015 17:19:59 -0700

On 7/6/15 1:05 PM, Eric Dumazet wrote:
> Add multiqueue capabilities to ifb netdevice.
>
> This removes last bottleneck for ingress when mq qdisc can be used
> to shard load from multiple RX queues on physical device.
...
> Signed-off-by: Eric Dumazet<[email-masked]>
> Cc: Alexei Starovoitov<[email-masked]>
> Cc: Jamal Hadi Salim<[email-masked]>
> Cc: John Fastabend<[email-masked]>
> ---
>   drivers/net/ifb.c |  207 +++++++++++++++++++++++++-------------------
>   1 file changed, 120 insertions(+), 87 deletions(-)
...
> -struct ifb_private {
> +struct ifb_q_private {
...
> -};
> +} ____cacheline_aligned_in_smp;
...
> +static int ifb_dev_init(struct net_device *dev)
> +{
> +	struct ifb_dev_private *dp = netdev_priv(dev);
> +	struct ifb_q_private *txp;
> +	int i;
> +
> +	txp = kcalloc(dev->num_tx_queues, sizeof(*txp), GFP_KERNEL);
...
>   static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
>   {
> -	struct ifb_private *dp = netdev_priv(dev);
> +	struct ifb_dev_private *dp = netdev_priv(dev);
>   	u32 from = G_TC_FROM(skb->tc_verd);
> +	struct ifb_q_private *txp = dp->tx_private + skb_get_queue_mapping(skb);

All makes sense. Nicely done!
Acked-by: Alexei Starovoitov <[email-masked]>