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<eduma...@google.com>
Cc: Alexei Starovoitov<a...@plumgrid.com>
Cc: Jamal Hadi Salim<j...@mojatatu.com>
Cc: John Fastabend<john.fastab...@gmail.com>
---
  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 <a...@plumgrid.com>

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

Reply via email to