memory barrier: adding smp_mb__after_lock
[safe/jmp/linux-2.6] / include / linux / netpoll.h
index e38d3c9..2524267 100644 (file)
@@ -18,7 +18,7 @@ struct netpoll {
        const char *name;
        void (*rx_hook)(struct netpoll *, int, char *, int);
 
-       u32 local_ip, remote_ip;
+       __be32 local_ip, remote_ip;
        u16 local_port, remote_port;
        u8 remote_mac[ETH_ALEN];
 };
@@ -63,6 +63,13 @@ static inline int netpoll_rx(struct sk_buff *skb)
        return ret;
 }
 
+static inline int netpoll_rx_on(struct sk_buff *skb)
+{
+       struct netpoll_info *npinfo = skb->dev->npinfo;
+
+       return npinfo && (npinfo->rx_np || npinfo->rx_flags);
+}
+
 static inline int netpoll_receive_skb(struct sk_buff *skb)
 {
        if (!list_empty(&skb->dev->napi_list))
@@ -99,6 +106,10 @@ static inline int netpoll_rx(struct sk_buff *skb)
 {
        return 0;
 }
+static inline int netpoll_rx_on(struct sk_buff *skb)
+{
+       return 0;
+}
 static inline int netpoll_receive_skb(struct sk_buff *skb)
 {
        return 0;