diff options
| author | Eliezer Tamir <eliezer.tamir@linux.intel.com> | 2013-07-10 10:13:26 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-07-10 20:08:27 -0400 |
| commit | 8b80cda536ea9bceec0364e897868a30ee13b992 (patch) | |
| tree | 75edd97f04e379e6afedd67beef81eb80ba0adaf /include | |
| parent | 076bb0c82a44fbe46fe2c8527a5b5b64b69f679d (diff) | |
net: rename ll methods to busy-poll
Rename ndo_ll_poll to ndo_busy_poll.
Rename sk_mark_ll to sk_mark_napi_id.
Rename skb_mark_ll to skb_mark_napi_id.
Correct all useres of these functions.
Update comments and defines in include/net/busy_poll.h
Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netdevice.h | 2 | ||||
| -rw-r--r-- | include/net/busy_poll.h | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index bb82871b8494..0741a1e919a5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -974,7 +974,7 @@ struct net_device_ops { | |||
| 974 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | 974 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
| 975 | #endif | 975 | #endif |
| 976 | #ifdef CONFIG_NET_LL_RX_POLL | 976 | #ifdef CONFIG_NET_LL_RX_POLL |
| 977 | int (*ndo_ll_poll)(struct napi_struct *dev); | 977 | int (*ndo_busy_poll)(struct napi_struct *dev); |
| 978 | #endif | 978 | #endif |
| 979 | int (*ndo_set_vf_mac)(struct net_device *dev, | 979 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| 980 | int queue, u8 *mac); | 980 | int queue, u8 *mac); |
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index 76f034087743..4ff71908fd42 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Low Latency Sockets | 2 | * net busy poll support |
| 3 | * Copyright(c) 2013 Intel Corporation. | 3 | * Copyright(c) 2013 Intel Corporation. |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
| @@ -21,8 +21,8 @@ | |||
| 21 | * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | 21 | * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #ifndef _LINUX_NET_LL_POLL_H | 24 | #ifndef _LINUX_NET_BUSY_POLL_H |
| 25 | #define _LINUX_NET_LL_POLL_H | 25 | #define _LINUX_NET_BUSY_POLL_H |
| 26 | 26 | ||
| 27 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
| 28 | #include <net/ip.h> | 28 | #include <net/ip.h> |
| @@ -110,11 +110,11 @@ static inline bool sk_busy_loop(struct sock *sk, int nonblock) | |||
| 110 | goto out; | 110 | goto out; |
| 111 | 111 | ||
| 112 | ops = napi->dev->netdev_ops; | 112 | ops = napi->dev->netdev_ops; |
| 113 | if (!ops->ndo_ll_poll) | 113 | if (!ops->ndo_busy_poll) |
| 114 | goto out; | 114 | goto out; |
| 115 | 115 | ||
| 116 | do { | 116 | do { |
| 117 | rc = ops->ndo_ll_poll(napi); | 117 | rc = ops->ndo_busy_poll(napi); |
| 118 | 118 | ||
| 119 | if (rc == LL_FLUSH_FAILED) | 119 | if (rc == LL_FLUSH_FAILED) |
| 120 | break; /* permanent failure */ | 120 | break; /* permanent failure */ |
| @@ -134,13 +134,14 @@ out: | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | /* used in the NIC receive handler to mark the skb */ | 136 | /* used in the NIC receive handler to mark the skb */ |
| 137 | static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | 137 | static inline void skb_mark_napi_id(struct sk_buff *skb, |
| 138 | struct napi_struct *napi) | ||
| 138 | { | 139 | { |
| 139 | skb->napi_id = napi->napi_id; | 140 | skb->napi_id = napi->napi_id; |
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | /* used in the protocol hanlder to propagate the napi_id to the socket */ | 143 | /* used in the protocol hanlder to propagate the napi_id to the socket */ |
| 143 | static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | 144 | static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) |
| 144 | { | 145 | { |
| 145 | sk->sk_napi_id = skb->napi_id; | 146 | sk->sk_napi_id = skb->napi_id; |
| 146 | } | 147 | } |
| @@ -166,11 +167,12 @@ static inline bool sk_busy_poll(struct sock *sk, int nonblock) | |||
| 166 | return false; | 167 | return false; |
| 167 | } | 168 | } |
| 168 | 169 | ||
| 169 | static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi) | 170 | static inline void skb_mark_napi_id(struct sk_buff *skb, |
| 171 | struct napi_struct *napi) | ||
| 170 | { | 172 | { |
| 171 | } | 173 | } |
| 172 | 174 | ||
| 173 | static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb) | 175 | static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) |
| 174 | { | 176 | { |
| 175 | } | 177 | } |
| 176 | 178 | ||
| @@ -180,4 +182,4 @@ static inline bool busy_loop_timeout(unsigned long end_time) | |||
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | #endif /* CONFIG_NET_LL_RX_POLL */ | 184 | #endif /* CONFIG_NET_LL_RX_POLL */ |
| 183 | #endif /* _LINUX_NET_LL_POLL_H */ | 185 | #endif /* _LINUX_NET_BUSY_POLL_H */ |
