]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat: backport netdev_queue_numa_node_read
authorVipul Pandya <vipul@chelsio.com>
Thu, 10 May 2012 12:38:33 +0000 (18:08 +0530)
committerVipul Pandya vipul@chelsio.com <vipulp@openfabrics.org>
Tue, 15 May 2012 15:16:51 +0000 (08:16 -0700)
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
include/linux/compat-2.6.38.h

index 63f9dd6a0ef56b5618f27204c9e06d7ca8b6386f..99f1ad020736f2a971f51ceaf2c6124f84101cc8 100644 (file)
@@ -90,6 +90,15 @@ static inline int is_unicast_ether_addr(const u8 *addr)
        return !is_multicast_ether_addr(addr);
 }
 
+static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
+{
+#if defined(CONFIG_XPS) && defined(CONFIG_NUMA)
+    return q->numa_node;
+#else
+    return NUMA_NO_NODE;
+#endif
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */
 
 #endif /* LINUX_26_38_COMPAT_H */