From: Vipul Pandya Date: Thu, 10 May 2012 12:38:33 +0000 (+0530) Subject: compat: backport netdev_queue_numa_node_read X-Git-Tag: compat-2012-07-02~9 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5b9990a2ff3ef931c42dc3baf6260e17e93c2536;p=~emulex%2Fcompat.git compat: backport netdev_queue_numa_node_read Signed-off-by: Vipul Pandya --- diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index 63f9dd6..99f1ad0 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.h @@ -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 */