[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimG9ZCZwDyo_9bYURShn7hk6ROzX4-qypo7nG5i@mail.gmail.com>
Date: Fri, 24 Sep 2010 09:18:30 -0700
From: Tom Herbert <therbert@...gle.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, chavey@...gle.com
Subject: Re: [PATCH] net: reset skb queue mapping when rx'ing over tunnel
> Hmm...
>
> This would need to be reverted later when tunnels are updated to be
> multiqueue aware ? I made an attempt with GRE some days ago.
>
> I dont understand why this patch is needed, since get_rps_cpu() has a
> check anyway
>
I think the skb queue_mapping should correspond to a queue in the
skb's device as an invariant. In the case that an skb's device is
change from a multiqueue device to single queue device (like GRE), the
inconsistency in the queue_mapping is fairly innocuous, we get one
warning but will pretty much take the unlikely branch for GRE packets
then on. But imagine a case where skb's device was change from one
multiqueue device to another, but the queue mapping was not also
updated. This would cause poor weighting in get_rps_cpus. For
example, if the new device had fewer queues than the old one,
get_rps_cpu will bias toward using queue 0's rps mask.
> if (skb_rx_queue_recorded(skb)) {
> u16 index = skb_get_rx_queue(skb);
> if (unlikely(index >= dev->num_rx_queues)) {
> WARN_ONCE(dev->num_rx_queues > 1, "%s received packet "
> "on queue %u, but number of RX queues is %u\n",
> dev->name, index, dev->num_rx_queues);
> goto done;
> }
> rxqueue = dev->_rx + index;
> } else
> rxqueue = dev->_rx;
>
>
>
>
--
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