Skip to contentSkip to conversation

Multiqueue support for bonding devices

PATCH New Oleg A. Arkhangelsky 1 participant 1 message Feb 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Multiqueue support for bonding devices

Make bonding driver multiqueue aware.

---

drivers/net/bonding/bond_main.c +3 -2
index 1787e3c..f54f590 100644
@@ -4928,8 +4928,9 @@ int bond_create(struct net *net, const char *name)
 
        rtnl_lock();
 
-       bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "",
-                               bond_setup);
+       bond_dev = alloc_netdev_mq(sizeof(struct bonding), name ? name : "",
+                               bond_setup,
+                               min_t(u32, BOND_MAX_TX_QUEUES, num_online_cpus()));
        if (!bond_dev) {
                pr_err("%s: eek! can't alloc netdev!\n", name);
                res = -ENOMEM;
drivers/net/bonding/bonding.h +1 -0
index 257a7a4..eab3239 100644
@@ -29,6 +29,7 @@
 #define DRV_DESCRIPTION        "Ethernet Channel Bonding Driver"
 
 #define BOND_MAX_ARP_TARGETS   16
+#define BOND_MAX_TX_QUEUES      8
 
 #define IS_UP(dev)                                        \
              ((((dev)->flags & IFF_UP) == IFF_UP)      && \

---

Signature · 1 line
wbr, Oleg.