]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: add alloc_netdev_mqs
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 15 Jul 2011 15:50:26 +0000 (17:50 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 20 Jul 2011 01:07:12 +0000 (18:07 -0700)
Function was added in 2.6.38 kernel commit:

commit 36909ea43814cba34f7c921e99cba33d770a54e1
Author: Tom Herbert <therbert@google.com>
Date:   Sun Jan 9 19:36:31 2011 +0000

    net: Add alloc_netdev_mqs function

Emulate it using alloc_netdev_mq(), newer kernels use
opposite emulation method :-)

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
include/linux/compat-2.6.38.h

index dfe12507f8902f7f46c58dfc07855acb16bb064a..937976b3e849b217ace93098a0d236c5551acc63 100644 (file)
@@ -71,6 +71,10 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
        no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
 #endif
 
+/* include/linux/netdevice.h */
+#define alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) \
+       alloc_netdev_mq(sizeof_priv, name, setup, max(txqs, rxqs))
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */
 
 #endif /* LINUX_26_38_COMPAT_H */