diff options
author | David S. Miller <davem@davemloft.net> | 2013-09-30 15:36:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-30 15:36:45 -0400 |
commit | cb178190ab7d9c9b9fb90e36488ebd26ca004d32 (patch) | |
tree | b2c7b9d6dda5600df21bb109eb7616b89039629d | |
parent | 7b77d161ce7e480a660692cab079712fc0268ba2 (diff) | |
parent | f629d208d27a22f495b7734eede585b5d207e912 (diff) |
Merge branch '20130926_include_linux_networking_externs' of git://repo.or.cz/linux-2.6/trivial-mods
Conflicts:
include/linux/netdevice.h
More extern removals from Joe Perches.
Minor conflict with the dev_notify_flags changes which added a new
argument to __dev_notify_flags().
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/etherdevice.h | 35 | ||||
-rw-r--r-- | include/linux/fcdevice.h | 2 | ||||
-rw-r--r-- | include/linux/fddidevice.h | 7 | ||||
-rw-r--r-- | include/linux/hippidevice.h | 10 | ||||
-rw-r--r-- | include/linux/inetdevice.h | 28 | ||||
-rw-r--r-- | include/linux/net.h | 82 | ||||
-rw-r--r-- | include/linux/netdevice.h | 435 | ||||
-rw-r--r-- | include/linux/netfilter.h | 10 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_h323.h | 14 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_proto_gre.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_sip.h | 57 | ||||
-rw-r--r-- | include/linux/netfilter/nfnetlink.h | 28 | ||||
-rw-r--r-- | include/linux/netfilter/nfnetlink_acct.h | 6 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 128 | ||||
-rw-r--r-- | include/linux/netfilter_bridge.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4.h | 6 | ||||
-rw-r--r-- | include/linux/netfilter_ipv6.h | 10 | ||||
-rw-r--r-- | include/linux/skbuff.h | 250 |
19 files changed, 530 insertions, 588 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index d8b512496e50..fc4a9aa7dd82 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -28,27 +28,24 @@ | |||
28 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
29 | 29 | ||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); | 31 | __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); |
32 | extern const struct header_ops eth_header_ops; | 32 | extern const struct header_ops eth_header_ops; |
33 | 33 | ||
34 | extern int eth_header(struct sk_buff *skb, struct net_device *dev, | 34 | int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, |
35 | unsigned short type, | 35 | const void *daddr, const void *saddr, unsigned len); |
36 | const void *daddr, const void *saddr, unsigned len); | 36 | int eth_rebuild_header(struct sk_buff *skb); |
37 | extern int eth_rebuild_header(struct sk_buff *skb); | 37 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); |
38 | extern int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | 38 | int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, |
39 | extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type); | 39 | __be16 type); |
40 | extern void eth_header_cache_update(struct hh_cache *hh, | 40 | void eth_header_cache_update(struct hh_cache *hh, const struct net_device *dev, |
41 | const struct net_device *dev, | 41 | const unsigned char *haddr); |
42 | const unsigned char *haddr); | 42 | int eth_prepare_mac_addr_change(struct net_device *dev, void *p); |
43 | extern int eth_prepare_mac_addr_change(struct net_device *dev, void *p); | 43 | void eth_commit_mac_addr_change(struct net_device *dev, void *p); |
44 | extern void eth_commit_mac_addr_change(struct net_device *dev, void *p); | 44 | int eth_mac_addr(struct net_device *dev, void *p); |
45 | extern int eth_mac_addr(struct net_device *dev, void *p); | 45 | int eth_change_mtu(struct net_device *dev, int new_mtu); |
46 | extern int eth_change_mtu(struct net_device *dev, int new_mtu); | 46 | int eth_validate_addr(struct net_device *dev); |
47 | extern int eth_validate_addr(struct net_device *dev); | 47 | |
48 | 48 | struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, | |
49 | |||
50 | |||
51 | extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, | ||
52 | unsigned int rxqs); | 49 | unsigned int rxqs); |
53 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) | 50 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
54 | #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) | 51 | #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) |
diff --git a/include/linux/fcdevice.h b/include/linux/fcdevice.h index e460ef831984..5009fa16b5d8 100644 --- a/include/linux/fcdevice.h +++ b/include/linux/fcdevice.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/if_fc.h> | 27 | #include <linux/if_fc.h> |
28 | 28 | ||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | extern struct net_device *alloc_fcdev(int sizeof_priv); | 30 | struct net_device *alloc_fcdev(int sizeof_priv); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #endif /* _LINUX_FCDEVICE_H */ | 33 | #endif /* _LINUX_FCDEVICE_H */ |
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h index 155bafd9e886..9a79f0106da1 100644 --- a/include/linux/fddidevice.h +++ b/include/linux/fddidevice.h | |||
@@ -25,10 +25,9 @@ | |||
25 | #include <linux/if_fddi.h> | 25 | #include <linux/if_fddi.h> |
26 | 26 | ||
27 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
28 | extern __be16 fddi_type_trans(struct sk_buff *skb, | 28 | __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev); |
29 | struct net_device *dev); | 29 | int fddi_change_mtu(struct net_device *dev, int new_mtu); |
30 | extern int fddi_change_mtu(struct net_device *dev, int new_mtu); | 30 | struct net_device *alloc_fddidev(int sizeof_priv); |
31 | extern struct net_device *alloc_fddidev(int sizeof_priv); | ||
32 | #endif | 31 | #endif |
33 | 32 | ||
34 | #endif /* _LINUX_FDDIDEVICE_H */ | 33 | #endif /* _LINUX_FDDIDEVICE_H */ |
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h index f148e4908410..8ec23fb0b412 100644 --- a/include/linux/hippidevice.h +++ b/include/linux/hippidevice.h | |||
@@ -31,11 +31,11 @@ struct hippi_cb { | |||
31 | __u32 ifield; | 31 | __u32 ifield; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev); | 34 | __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev); |
35 | extern int hippi_change_mtu(struct net_device *dev, int new_mtu); | 35 | int hippi_change_mtu(struct net_device *dev, int new_mtu); |
36 | extern int hippi_mac_addr(struct net_device *dev, void *p); | 36 | int hippi_mac_addr(struct net_device *dev, void *p); |
37 | extern int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p); | 37 | int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p); |
38 | extern struct net_device *alloc_hippi_dev(int sizeof_priv); | 38 | struct net_device *alloc_hippi_dev(int sizeof_priv); |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #endif /* _LINUX_HIPPIDEVICE_H */ | 41 | #endif /* _LINUX_HIPPIDEVICE_H */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 79640e015a86..0d678aefe69d 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -147,25 +147,27 @@ struct in_ifaddr { | |||
147 | unsigned long ifa_tstamp; /* updated timestamp */ | 147 | unsigned long ifa_tstamp; /* updated timestamp */ |
148 | }; | 148 | }; |
149 | 149 | ||
150 | extern int register_inetaddr_notifier(struct notifier_block *nb); | 150 | int register_inetaddr_notifier(struct notifier_block *nb); |
151 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); | 151 | int unregister_inetaddr_notifier(struct notifier_block *nb); |
152 | 152 | ||
153 | extern void inet_netconf_notify_devconf(struct net *net, int type, int ifindex, | 153 | void inet_netconf_notify_devconf(struct net *net, int type, int ifindex, |
154 | struct ipv4_devconf *devconf); | 154 | struct ipv4_devconf *devconf); |
155 | 155 | ||
156 | extern struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref); | 156 | struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref); |
157 | static inline struct net_device *ip_dev_find(struct net *net, __be32 addr) | 157 | static inline struct net_device *ip_dev_find(struct net *net, __be32 addr) |
158 | { | 158 | { |
159 | return __ip_dev_find(net, addr, true); | 159 | return __ip_dev_find(net, addr, true); |
160 | } | 160 | } |
161 | 161 | ||
162 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); | 162 | int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); |
163 | extern int devinet_ioctl(struct net *net, unsigned int cmd, void __user *); | 163 | int devinet_ioctl(struct net *net, unsigned int cmd, void __user *); |
164 | extern void devinet_init(void); | 164 | void devinet_init(void); |
165 | extern struct in_device *inetdev_by_index(struct net *, int); | 165 | struct in_device *inetdev_by_index(struct net *, int); |
166 | extern __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); | 166 | __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); |
167 | extern __be32 inet_confirm_addr(struct in_device *in_dev, __be32 dst, __be32 local, int scope); | 167 | __be32 inet_confirm_addr(struct in_device *in_dev, __be32 dst, __be32 local, |
168 | extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, __be32 mask); | 168 | int scope); |
169 | struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, | ||
170 | __be32 mask); | ||
169 | 171 | ||
170 | static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) | 172 | static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) |
171 | { | 173 | { |
@@ -218,7 +220,7 @@ static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) | |||
218 | return rtnl_dereference(dev->ip_ptr); | 220 | return rtnl_dereference(dev->ip_ptr); |
219 | } | 221 | } |
220 | 222 | ||
221 | extern void in_dev_finish_destroy(struct in_device *idev); | 223 | void in_dev_finish_destroy(struct in_device *idev); |
222 | 224 | ||
223 | static inline void in_dev_put(struct in_device *idev) | 225 | static inline void in_dev_put(struct in_device *idev) |
224 | { | 226 | { |
diff --git a/include/linux/net.h b/include/linux/net.h index 4f27575ce1d6..ca9ec8540905 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -195,27 +195,23 @@ enum { | |||
195 | SOCK_WAKE_URG, | 195 | SOCK_WAKE_URG, |
196 | }; | 196 | }; |
197 | 197 | ||
198 | extern int sock_wake_async(struct socket *sk, int how, int band); | 198 | int sock_wake_async(struct socket *sk, int how, int band); |
199 | extern int sock_register(const struct net_proto_family *fam); | 199 | int sock_register(const struct net_proto_family *fam); |
200 | extern void sock_unregister(int family); | 200 | void sock_unregister(int family); |
201 | extern int __sock_create(struct net *net, int family, int type, int proto, | 201 | int __sock_create(struct net *net, int family, int type, int proto, |
202 | struct socket **res, int kern); | 202 | struct socket **res, int kern); |
203 | extern int sock_create(int family, int type, int proto, | 203 | int sock_create(int family, int type, int proto, struct socket **res); |
204 | struct socket **res); | 204 | int sock_create_kern(int family, int type, int proto, struct socket **res); |
205 | extern int sock_create_kern(int family, int type, int proto, | 205 | int sock_create_lite(int family, int type, int proto, struct socket **res); |
206 | struct socket **res); | 206 | void sock_release(struct socket *sock); |
207 | extern int sock_create_lite(int family, int type, int proto, | 207 | int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len); |
208 | struct socket **res); | 208 | int sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, |
209 | extern void sock_release(struct socket *sock); | 209 | int flags); |
210 | extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, | 210 | struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname); |
211 | size_t len); | 211 | struct socket *sockfd_lookup(int fd, int *err); |
212 | extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, | 212 | struct socket *sock_from_file(struct file *file, int *err); |
213 | size_t size, int flags); | ||
214 | extern struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname); | ||
215 | extern struct socket *sockfd_lookup(int fd, int *err); | ||
216 | extern struct socket *sock_from_file(struct file *file, int *err); | ||
217 | #define sockfd_put(sock) fput(sock->file) | 213 | #define sockfd_put(sock) fput(sock->file) |
218 | extern int net_ratelimit(void); | 214 | int net_ratelimit(void); |
219 | 215 | ||
220 | #define net_ratelimited_function(function, ...) \ | 216 | #define net_ratelimited_function(function, ...) \ |
221 | do { \ | 217 | do { \ |
@@ -243,32 +239,28 @@ do { \ | |||
243 | #define net_random() prandom_u32() | 239 | #define net_random() prandom_u32() |
244 | #define net_srandom(seed) prandom_seed((__force u32)(seed)) | 240 | #define net_srandom(seed) prandom_seed((__force u32)(seed)) |
245 | 241 | ||
246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 242 | int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, |
247 | struct kvec *vec, size_t num, size_t len); | 243 | size_t num, size_t len); |
248 | extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, | 244 | int kernel_recvmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, |
249 | struct kvec *vec, size_t num, | 245 | size_t num, size_t len, int flags); |
250 | size_t len, int flags); | ||
251 | 246 | ||
252 | extern int kernel_bind(struct socket *sock, struct sockaddr *addr, | 247 | int kernel_bind(struct socket *sock, struct sockaddr *addr, int addrlen); |
253 | int addrlen); | 248 | int kernel_listen(struct socket *sock, int backlog); |
254 | extern int kernel_listen(struct socket *sock, int backlog); | 249 | int kernel_accept(struct socket *sock, struct socket **newsock, int flags); |
255 | extern int kernel_accept(struct socket *sock, struct socket **newsock, | 250 | int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen, |
256 | int flags); | 251 | int flags); |
257 | extern int kernel_connect(struct socket *sock, struct sockaddr *addr, | 252 | int kernel_getsockname(struct socket *sock, struct sockaddr *addr, |
258 | int addrlen, int flags); | 253 | int *addrlen); |
259 | extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, | 254 | int kernel_getpeername(struct socket *sock, struct sockaddr *addr, |
260 | int *addrlen); | 255 | int *addrlen); |
261 | extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, | 256 | int kernel_getsockopt(struct socket *sock, int level, int optname, char *optval, |
262 | int *addrlen); | 257 | int *optlen); |
263 | extern int kernel_getsockopt(struct socket *sock, int level, int optname, | 258 | int kernel_setsockopt(struct socket *sock, int level, int optname, char *optval, |
264 | char *optval, int *optlen); | 259 | unsigned int optlen); |
265 | extern int kernel_setsockopt(struct socket *sock, int level, int optname, | 260 | int kernel_sendpage(struct socket *sock, struct page *page, int offset, |
266 | char *optval, unsigned int optlen); | 261 | size_t size, int flags); |
267 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, | 262 | int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); |
268 | size_t size, int flags); | 263 | int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how); |
269 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); | ||
270 | extern int kernel_sock_shutdown(struct socket *sock, | ||
271 | enum sock_shutdown_cmd how); | ||
272 | 264 | ||
273 | #define MODULE_ALIAS_NETPROTO(proto) \ | 265 | #define MODULE_ALIAS_NETPROTO(proto) \ |
274 | MODULE_ALIAS("net-pf-" __stringify(proto)) | 266 | MODULE_ALIAS("net-pf-" __stringify(proto)) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f44f99a69977..f5cd464271bf 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -60,8 +60,8 @@ struct wireless_dev; | |||
60 | #define SET_ETHTOOL_OPS(netdev,ops) \ | 60 | #define SET_ETHTOOL_OPS(netdev,ops) \ |
61 | ( (netdev)->ethtool_ops = (ops) ) | 61 | ( (netdev)->ethtool_ops = (ops) ) |
62 | 62 | ||
63 | extern void netdev_set_default_ethtool_ops(struct net_device *dev, | 63 | void netdev_set_default_ethtool_ops(struct net_device *dev, |
64 | const struct ethtool_ops *ops); | 64 | const struct ethtool_ops *ops); |
65 | 65 | ||
66 | /* hardware address assignment types */ | 66 | /* hardware address assignment types */ |
67 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ | 67 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ |
@@ -298,7 +298,7 @@ struct netdev_boot_setup { | |||
298 | }; | 298 | }; |
299 | #define NETDEV_BOOT_SETUP_MAX 8 | 299 | #define NETDEV_BOOT_SETUP_MAX 8 |
300 | 300 | ||
301 | extern int __init netdev_boot_setup(char *str); | 301 | int __init netdev_boot_setup(char *str); |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Structure for NAPI scheduling similar to tasklet but with weighting | 304 | * Structure for NAPI scheduling similar to tasklet but with weighting |
@@ -394,7 +394,7 @@ enum rx_handler_result { | |||
394 | typedef enum rx_handler_result rx_handler_result_t; | 394 | typedef enum rx_handler_result rx_handler_result_t; |
395 | typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb); | 395 | typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb); |
396 | 396 | ||
397 | extern void __napi_schedule(struct napi_struct *n); | 397 | void __napi_schedule(struct napi_struct *n); |
398 | 398 | ||
399 | static inline bool napi_disable_pending(struct napi_struct *n) | 399 | static inline bool napi_disable_pending(struct napi_struct *n) |
400 | { | 400 | { |
@@ -445,8 +445,8 @@ static inline bool napi_reschedule(struct napi_struct *napi) | |||
445 | * | 445 | * |
446 | * Mark NAPI processing as complete. | 446 | * Mark NAPI processing as complete. |
447 | */ | 447 | */ |
448 | extern void __napi_complete(struct napi_struct *n); | 448 | void __napi_complete(struct napi_struct *n); |
449 | extern void napi_complete(struct napi_struct *n); | 449 | void napi_complete(struct napi_struct *n); |
450 | 450 | ||
451 | /** | 451 | /** |
452 | * napi_by_id - lookup a NAPI by napi_id | 452 | * napi_by_id - lookup a NAPI by napi_id |
@@ -455,7 +455,7 @@ extern void napi_complete(struct napi_struct *n); | |||
455 | * lookup @napi_id in napi_hash table | 455 | * lookup @napi_id in napi_hash table |
456 | * must be called under rcu_read_lock() | 456 | * must be called under rcu_read_lock() |
457 | */ | 457 | */ |
458 | extern struct napi_struct *napi_by_id(unsigned int napi_id); | 458 | struct napi_struct *napi_by_id(unsigned int napi_id); |
459 | 459 | ||
460 | /** | 460 | /** |
461 | * napi_hash_add - add a NAPI to global hashtable | 461 | * napi_hash_add - add a NAPI to global hashtable |
@@ -463,7 +463,7 @@ extern struct napi_struct *napi_by_id(unsigned int napi_id); | |||
463 | * | 463 | * |
464 | * generate a new napi_id and store a @napi under it in napi_hash | 464 | * generate a new napi_id and store a @napi under it in napi_hash |
465 | */ | 465 | */ |
466 | extern void napi_hash_add(struct napi_struct *napi); | 466 | void napi_hash_add(struct napi_struct *napi); |
467 | 467 | ||
468 | /** | 468 | /** |
469 | * napi_hash_del - remove a NAPI from global table | 469 | * napi_hash_del - remove a NAPI from global table |
@@ -472,7 +472,7 @@ extern void napi_hash_add(struct napi_struct *napi); | |||
472 | * Warning: caller must observe rcu grace period | 472 | * Warning: caller must observe rcu grace period |
473 | * before freeing memory containing @napi | 473 | * before freeing memory containing @napi |
474 | */ | 474 | */ |
475 | extern void napi_hash_del(struct napi_struct *napi); | 475 | void napi_hash_del(struct napi_struct *napi); |
476 | 476 | ||
477 | /** | 477 | /** |
478 | * napi_disable - prevent NAPI from scheduling | 478 | * napi_disable - prevent NAPI from scheduling |
@@ -664,8 +664,8 @@ static inline void rps_reset_sock_flow(struct rps_sock_flow_table *table, | |||
664 | extern struct rps_sock_flow_table __rcu *rps_sock_flow_table; | 664 | extern struct rps_sock_flow_table __rcu *rps_sock_flow_table; |
665 | 665 | ||
666 | #ifdef CONFIG_RFS_ACCEL | 666 | #ifdef CONFIG_RFS_ACCEL |
667 | extern bool rps_may_expire_flow(struct net_device *dev, u16 rxq_index, | 667 | bool rps_may_expire_flow(struct net_device *dev, u16 rxq_index, u32 flow_id, |
668 | u32 flow_id, u16 filter_id); | 668 | u16 filter_id); |
669 | #endif | 669 | #endif |
670 | 670 | ||
671 | /* This structure contains an instance of an RX queue. */ | 671 | /* This structure contains an instance of an RX queue. */ |
@@ -1497,9 +1497,9 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
1497 | f(dev, &dev->_tx[i], arg); | 1497 | f(dev, &dev->_tx[i], arg); |
1498 | } | 1498 | } |
1499 | 1499 | ||
1500 | extern struct netdev_queue *netdev_pick_tx(struct net_device *dev, | 1500 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, |
1501 | struct sk_buff *skb); | 1501 | struct sk_buff *skb); |
1502 | extern u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); | 1502 | u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); |
1503 | 1503 | ||
1504 | /* | 1504 | /* |
1505 | * Net namespace inlines | 1505 | * Net namespace inlines |
@@ -1683,8 +1683,8 @@ struct packet_offload { | |||
1683 | #define NETDEV_CHANGEUPPER 0x0015 | 1683 | #define NETDEV_CHANGEUPPER 0x0015 |
1684 | #define NETDEV_RESEND_IGMP 0x0016 | 1684 | #define NETDEV_RESEND_IGMP 0x0016 |
1685 | 1685 | ||
1686 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1686 | int register_netdevice_notifier(struct notifier_block *nb); |
1687 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1687 | int unregister_netdevice_notifier(struct notifier_block *nb); |
1688 | 1688 | ||
1689 | struct netdev_notifier_info { | 1689 | struct netdev_notifier_info { |
1690 | struct net_device *dev; | 1690 | struct net_device *dev; |
@@ -1707,9 +1707,9 @@ netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) | |||
1707 | return info->dev; | 1707 | return info->dev; |
1708 | } | 1708 | } |
1709 | 1709 | ||
1710 | extern int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev, | 1710 | int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev, |
1711 | struct netdev_notifier_info *info); | 1711 | struct netdev_notifier_info *info); |
1712 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1712 | int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1713 | 1713 | ||
1714 | 1714 | ||
1715 | extern rwlock_t dev_base_lock; /* Device list lock */ | 1715 | extern rwlock_t dev_base_lock; /* Device list lock */ |
@@ -1764,54 +1764,52 @@ static inline struct net_device *first_net_device_rcu(struct net *net) | |||
1764 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); | 1764 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); |
1765 | } | 1765 | } |
1766 | 1766 | ||
1767 | extern int netdev_boot_setup_check(struct net_device *dev); | 1767 | int netdev_boot_setup_check(struct net_device *dev); |
1768 | extern unsigned long netdev_boot_base(const char *prefix, int unit); | 1768 | unsigned long netdev_boot_base(const char *prefix, int unit); |
1769 | extern struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type, | 1769 | struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type, |
1770 | const char *hwaddr); | 1770 | const char *hwaddr); |
1771 | extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1771 | struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); |
1772 | extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); | 1772 | struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); |
1773 | extern void dev_add_pack(struct packet_type *pt); | 1773 | void dev_add_pack(struct packet_type *pt); |
1774 | extern void dev_remove_pack(struct packet_type *pt); | 1774 | void dev_remove_pack(struct packet_type *pt); |
1775 | extern void __dev_remove_pack(struct packet_type *pt); | 1775 | void __dev_remove_pack(struct packet_type *pt); |
1776 | extern void dev_add_offload(struct packet_offload *po); | 1776 | void dev_add_offload(struct packet_offload *po); |
1777 | extern void dev_remove_offload(struct packet_offload *po); | 1777 | void dev_remove_offload(struct packet_offload *po); |
1778 | extern void __dev_remove_offload(struct packet_offload *po); | 1778 | void __dev_remove_offload(struct packet_offload *po); |
1779 | 1779 | ||
1780 | extern struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short flags, | 1780 | struct net_device *dev_get_by_flags_rcu(struct net *net, unsigned short flags, |
1781 | unsigned short mask); | 1781 | unsigned short mask); |
1782 | extern struct net_device *dev_get_by_name(struct net *net, const char *name); | 1782 | struct net_device *dev_get_by_name(struct net *net, const char *name); |
1783 | extern struct net_device *dev_get_by_name_rcu(struct net *net, const char *name); | 1783 | struct net_device *dev_get_by_name_rcu(struct net *net, const char *name); |
1784 | extern struct net_device *__dev_get_by_name(struct net *net, const char *name); | 1784 | struct net_device *__dev_get_by_name(struct net *net, const char *name); |
1785 | extern int dev_alloc_name(struct net_device *dev, const char *name); | 1785 | int dev_alloc_name(struct net_device *dev, const char *name); |
1786 | extern int dev_open(struct net_device *dev); | 1786 | int dev_open(struct net_device *dev); |
1787 | extern int dev_close(struct net_device *dev); | 1787 | int dev_close(struct net_device *dev); |
1788 | extern void dev_disable_lro(struct net_device *dev); | 1788 | void dev_disable_lro(struct net_device *dev); |
1789 | extern int dev_loopback_xmit(struct sk_buff *newskb); | 1789 | int dev_loopback_xmit(struct sk_buff *newskb); |
1790 | extern int dev_queue_xmit(struct sk_buff *skb); | 1790 | int dev_queue_xmit(struct sk_buff *skb); |
1791 | extern int register_netdevice(struct net_device *dev); | 1791 | int register_netdevice(struct net_device *dev); |
1792 | extern void unregister_netdevice_queue(struct net_device *dev, | 1792 | void unregister_netdevice_queue(struct net_device *dev, struct list_head *head); |
1793 | struct list_head *head); | 1793 | void unregister_netdevice_many(struct list_head *head); |
1794 | extern void unregister_netdevice_many(struct list_head *head); | ||
1795 | static inline void unregister_netdevice(struct net_device *dev) | 1794 | static inline void unregister_netdevice(struct net_device *dev) |
1796 | { | 1795 | { |
1797 | unregister_netdevice_queue(dev, NULL); | 1796 | unregister_netdevice_queue(dev, NULL); |
1798 | } | 1797 | } |
1799 | 1798 | ||
1800 | extern int netdev_refcnt_read(const struct net_device *dev); | 1799 | int netdev_refcnt_read(const struct net_device *dev); |
1801 | extern void free_netdev(struct net_device *dev); | 1800 | void free_netdev(struct net_device *dev); |
1802 | extern void synchronize_net(void); | 1801 | void synchronize_net(void); |
1803 | extern int init_dummy_netdev(struct net_device *dev); | 1802 | int init_dummy_netdev(struct net_device *dev); |
1804 | 1803 | ||
1805 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1804 | struct net_device *dev_get_by_index(struct net *net, int ifindex); |
1806 | extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); | 1805 | struct net_device *__dev_get_by_index(struct net *net, int ifindex); |
1807 | extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); | 1806 | struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); |
1808 | extern int netdev_get_name(struct net *net, char *name, int ifindex); | 1807 | int netdev_get_name(struct net *net, char *name, int ifindex); |
1809 | extern int dev_restart(struct net_device *dev); | 1808 | int dev_restart(struct net_device *dev); |
1810 | #ifdef CONFIG_NETPOLL_TRAP | 1809 | #ifdef CONFIG_NETPOLL_TRAP |
1811 | extern int netpoll_trap(void); | 1810 | int netpoll_trap(void); |
1812 | #endif | 1811 | #endif |
1813 | extern int skb_gro_receive(struct sk_buff **head, | 1812 | int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb); |
1814 | struct sk_buff *skb); | ||
1815 | 1813 | ||
1816 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) | 1814 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) |
1817 | { | 1815 | { |
@@ -1883,7 +1881,7 @@ static inline int dev_parse_header(const struct sk_buff *skb, | |||
1883 | } | 1881 | } |
1884 | 1882 | ||
1885 | typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); | 1883 | typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); |
1886 | extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); | 1884 | int register_gifconf(unsigned int family, gifconf_func_t *gifconf); |
1887 | static inline int unregister_gifconf(unsigned int family) | 1885 | static inline int unregister_gifconf(unsigned int family) |
1888 | { | 1886 | { |
1889 | return register_gifconf(family, NULL); | 1887 | return register_gifconf(family, NULL); |
@@ -1954,7 +1952,7 @@ static inline void input_queue_tail_incr_save(struct softnet_data *sd, | |||
1954 | 1952 | ||
1955 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); | 1953 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); |
1956 | 1954 | ||
1957 | extern void __netif_schedule(struct Qdisc *q); | 1955 | void __netif_schedule(struct Qdisc *q); |
1958 | 1956 | ||
1959 | static inline void netif_schedule_queue(struct netdev_queue *txq) | 1957 | static inline void netif_schedule_queue(struct netdev_queue *txq) |
1960 | { | 1958 | { |
@@ -2274,8 +2272,8 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
2274 | } | 2272 | } |
2275 | 2273 | ||
2276 | #ifdef CONFIG_XPS | 2274 | #ifdef CONFIG_XPS |
2277 | extern int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask, | 2275 | int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask, |
2278 | u16 index); | 2276 | u16 index); |
2279 | #else | 2277 | #else |
2280 | static inline int netif_set_xps_queue(struct net_device *dev, | 2278 | static inline int netif_set_xps_queue(struct net_device *dev, |
2281 | struct cpumask *mask, | 2279 | struct cpumask *mask, |
@@ -2306,12 +2304,10 @@ static inline bool netif_is_multiqueue(const struct net_device *dev) | |||
2306 | return dev->num_tx_queues > 1; | 2304 | return dev->num_tx_queues > 1; |
2307 | } | 2305 | } |
2308 | 2306 | ||
2309 | extern int netif_set_real_num_tx_queues(struct net_device *dev, | 2307 | int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq); |
2310 | unsigned int txq); | ||
2311 | 2308 | ||
2312 | #ifdef CONFIG_RPS | 2309 | #ifdef CONFIG_RPS |
2313 | extern int netif_set_real_num_rx_queues(struct net_device *dev, | 2310 | int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq); |
2314 | unsigned int rxq); | ||
2315 | #else | 2311 | #else |
2316 | static inline int netif_set_real_num_rx_queues(struct net_device *dev, | 2312 | static inline int netif_set_real_num_rx_queues(struct net_device *dev, |
2317 | unsigned int rxq) | 2313 | unsigned int rxq) |
@@ -2338,28 +2334,27 @@ static inline int netif_copy_real_num_queues(struct net_device *to_dev, | |||
2338 | } | 2334 | } |
2339 | 2335 | ||
2340 | #define DEFAULT_MAX_NUM_RSS_QUEUES (8) | 2336 | #define DEFAULT_MAX_NUM_RSS_QUEUES (8) |
2341 | extern int netif_get_num_default_rss_queues(void); | 2337 | int netif_get_num_default_rss_queues(void); |
2342 | 2338 | ||
2343 | /* Use this variant when it is known for sure that it | 2339 | /* Use this variant when it is known for sure that it |
2344 | * is executing from hardware interrupt context or with hardware interrupts | 2340 | * is executing from hardware interrupt context or with hardware interrupts |
2345 | * disabled. | 2341 | * disabled. |
2346 | */ | 2342 | */ |
2347 | extern void dev_kfree_skb_irq(struct sk_buff *skb); | 2343 | void dev_kfree_skb_irq(struct sk_buff *skb); |
2348 | 2344 | ||
2349 | /* Use this variant in places where it could be invoked | 2345 | /* Use this variant in places where it could be invoked |
2350 | * from either hardware interrupt or other context, with hardware interrupts | 2346 | * from either hardware interrupt or other context, with hardware interrupts |
2351 | * either disabled or enabled. | 2347 | * either disabled or enabled. |
2352 | */ | 2348 | */ |
2353 | extern void dev_kfree_skb_any(struct sk_buff *skb); | 2349 | void dev_kfree_skb_any(struct sk_buff *skb); |
2354 | 2350 | ||
2355 | extern int netif_rx(struct sk_buff *skb); | 2351 | int netif_rx(struct sk_buff *skb); |
2356 | extern int netif_rx_ni(struct sk_buff *skb); | 2352 | int netif_rx_ni(struct sk_buff *skb); |
2357 | extern int netif_receive_skb(struct sk_buff *skb); | 2353 | int netif_receive_skb(struct sk_buff *skb); |
2358 | extern gro_result_t napi_gro_receive(struct napi_struct *napi, | 2354 | gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb); |
2359 | struct sk_buff *skb); | 2355 | void napi_gro_flush(struct napi_struct *napi, bool flush_old); |
2360 | extern void napi_gro_flush(struct napi_struct *napi, bool flush_old); | 2356 | struct sk_buff *napi_get_frags(struct napi_struct *napi); |
2361 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); | 2357 | gro_result_t napi_gro_frags(struct napi_struct *napi); |
2362 | extern gro_result_t napi_gro_frags(struct napi_struct *napi); | ||
2363 | 2358 | ||
2364 | static inline void napi_free_frags(struct napi_struct *napi) | 2359 | static inline void napi_free_frags(struct napi_struct *napi) |
2365 | { | 2360 | { |
@@ -2367,42 +2362,36 @@ static inline void napi_free_frags(struct napi_struct *napi) | |||
2367 | napi->skb = NULL; | 2362 | napi->skb = NULL; |
2368 | } | 2363 | } |
2369 | 2364 | ||
2370 | extern int netdev_rx_handler_register(struct net_device *dev, | 2365 | int netdev_rx_handler_register(struct net_device *dev, |
2371 | rx_handler_func_t *rx_handler, | 2366 | rx_handler_func_t *rx_handler, |
2372 | void *rx_handler_data); | 2367 | void *rx_handler_data); |
2373 | extern void netdev_rx_handler_unregister(struct net_device *dev); | 2368 | void netdev_rx_handler_unregister(struct net_device *dev); |
2374 | 2369 | ||
2375 | extern bool dev_valid_name(const char *name); | 2370 | bool dev_valid_name(const char *name); |
2376 | extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); | 2371 | int dev_ioctl(struct net *net, unsigned int cmd, void __user *); |
2377 | extern int dev_ethtool(struct net *net, struct ifreq *); | 2372 | int dev_ethtool(struct net *net, struct ifreq *); |
2378 | extern unsigned int dev_get_flags(const struct net_device *); | 2373 | unsigned int dev_get_flags(const struct net_device *); |
2379 | extern int __dev_change_flags(struct net_device *, unsigned int flags); | 2374 | int __dev_change_flags(struct net_device *, unsigned int flags); |
2380 | extern int dev_change_flags(struct net_device *, unsigned int); | 2375 | int dev_change_flags(struct net_device *, unsigned int); |
2381 | void __dev_notify_flags(struct net_device *, | 2376 | void __dev_notify_flags(struct net_device *, unsigned int old_flags, |
2382 | unsigned int old_flags, | 2377 | unsigned int gchanges); |
2383 | unsigned int gchanges); | 2378 | int dev_change_name(struct net_device *, const char *); |
2384 | extern int dev_change_name(struct net_device *, const char *); | 2379 | int dev_set_alias(struct net_device *, const char *, size_t); |
2385 | extern int dev_set_alias(struct net_device *, const char *, size_t); | 2380 | int dev_change_net_namespace(struct net_device *, struct net *, const char *); |
2386 | extern int dev_change_net_namespace(struct net_device *, | 2381 | int dev_set_mtu(struct net_device *, int); |
2387 | struct net *, const char *); | 2382 | void dev_set_group(struct net_device *, int); |
2388 | extern int dev_set_mtu(struct net_device *, int); | 2383 | int dev_set_mac_address(struct net_device *, struct sockaddr *); |
2389 | extern void dev_set_group(struct net_device *, int); | 2384 | int dev_change_carrier(struct net_device *, bool new_carrier); |
2390 | extern int dev_set_mac_address(struct net_device *, | 2385 | int dev_get_phys_port_id(struct net_device *dev, |
2391 | struct sockaddr *); | 2386 | struct netdev_phys_port_id *ppid); |
2392 | extern int dev_change_carrier(struct net_device *, | 2387 | int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, |
2393 | bool new_carrier); | 2388 | struct netdev_queue *txq); |
2394 | extern int dev_get_phys_port_id(struct net_device *dev, | 2389 | int dev_forward_skb(struct net_device *dev, struct sk_buff *skb); |
2395 | struct netdev_phys_port_id *ppid); | ||
2396 | extern int dev_hard_start_xmit(struct sk_buff *skb, | ||
2397 | struct net_device *dev, | ||
2398 | struct netdev_queue *txq); | ||
2399 | extern int dev_forward_skb(struct net_device *dev, | ||
2400 | struct sk_buff *skb); | ||
2401 | 2390 | ||
2402 | extern int netdev_budget; | 2391 | extern int netdev_budget; |
2403 | 2392 | ||
2404 | /* Called by rtnetlink.c:rtnl_unlock() */ | 2393 | /* Called by rtnetlink.c:rtnl_unlock() */ |
2405 | extern void netdev_run_todo(void); | 2394 | void netdev_run_todo(void); |
2406 | 2395 | ||
2407 | /** | 2396 | /** |
2408 | * dev_put - release reference to device | 2397 | * dev_put - release reference to device |
@@ -2435,9 +2424,9 @@ static inline void dev_hold(struct net_device *dev) | |||
2435 | * kind of lower layer not just hardware media. | 2424 | * kind of lower layer not just hardware media. |
2436 | */ | 2425 | */ |
2437 | 2426 | ||
2438 | extern void linkwatch_init_dev(struct net_device *dev); | 2427 | void linkwatch_init_dev(struct net_device *dev); |
2439 | extern void linkwatch_fire_event(struct net_device *dev); | 2428 | void linkwatch_fire_event(struct net_device *dev); |
2440 | extern void linkwatch_forget_dev(struct net_device *dev); | 2429 | void linkwatch_forget_dev(struct net_device *dev); |
2441 | 2430 | ||
2442 | /** | 2431 | /** |
2443 | * netif_carrier_ok - test if carrier present | 2432 | * netif_carrier_ok - test if carrier present |
@@ -2450,13 +2439,13 @@ static inline bool netif_carrier_ok(const struct net_device *dev) | |||
2450 | return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); | 2439 | return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); |
2451 | } | 2440 | } |
2452 | 2441 | ||
2453 | extern unsigned long dev_trans_start(struct net_device *dev); | 2442 | unsigned long dev_trans_start(struct net_device *dev); |
2454 | 2443 | ||
2455 | extern void __netdev_watchdog_up(struct net_device *dev); | 2444 | void __netdev_watchdog_up(struct net_device *dev); |
2456 | 2445 | ||
2457 | extern void netif_carrier_on(struct net_device *dev); | 2446 | void netif_carrier_on(struct net_device *dev); |
2458 | 2447 | ||
2459 | extern void netif_carrier_off(struct net_device *dev); | 2448 | void netif_carrier_off(struct net_device *dev); |
2460 | 2449 | ||
2461 | /** | 2450 | /** |
2462 | * netif_dormant_on - mark device as dormant. | 2451 | * netif_dormant_on - mark device as dormant. |
@@ -2524,9 +2513,9 @@ static inline bool netif_device_present(struct net_device *dev) | |||
2524 | return test_bit(__LINK_STATE_PRESENT, &dev->state); | 2513 | return test_bit(__LINK_STATE_PRESENT, &dev->state); |
2525 | } | 2514 | } |
2526 | 2515 | ||
2527 | extern void netif_device_detach(struct net_device *dev); | 2516 | void netif_device_detach(struct net_device *dev); |
2528 | 2517 | ||
2529 | extern void netif_device_attach(struct net_device *dev); | 2518 | void netif_device_attach(struct net_device *dev); |
2530 | 2519 | ||
2531 | /* | 2520 | /* |
2532 | * Network interface message level settings | 2521 | * Network interface message level settings |
@@ -2735,98 +2724,93 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2735 | 2724 | ||
2736 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ | 2725 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ |
2737 | 2726 | ||
2738 | extern void ether_setup(struct net_device *dev); | 2727 | void ether_setup(struct net_device *dev); |
2739 | 2728 | ||
2740 | /* Support for loadable net-drivers */ | 2729 | /* Support for loadable net-drivers */ |
2741 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, | 2730 | struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2742 | void (*setup)(struct net_device *), | 2731 | void (*setup)(struct net_device *), |
2743 | unsigned int txqs, unsigned int rxqs); | 2732 | unsigned int txqs, unsigned int rxqs); |
2744 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2733 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2745 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) | 2734 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2746 | 2735 | ||
2747 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | 2736 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ |
2748 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | 2737 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) |
2749 | 2738 | ||
2750 | extern int register_netdev(struct net_device *dev); | 2739 | int register_netdev(struct net_device *dev); |
2751 | extern void unregister_netdev(struct net_device *dev); | 2740 | void unregister_netdev(struct net_device *dev); |
2752 | 2741 | ||
2753 | /* General hardware address lists handling functions */ | 2742 | /* General hardware address lists handling functions */ |
2754 | extern int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list, | 2743 | int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list, |
2755 | struct netdev_hw_addr_list *from_list, | 2744 | struct netdev_hw_addr_list *from_list, |
2756 | int addr_len, unsigned char addr_type); | 2745 | int addr_len, unsigned char addr_type); |
2757 | extern void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list, | 2746 | void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list, |
2758 | struct netdev_hw_addr_list *from_list, | 2747 | struct netdev_hw_addr_list *from_list, |
2759 | int addr_len, unsigned char addr_type); | 2748 | int addr_len, unsigned char addr_type); |
2760 | extern int __hw_addr_sync(struct netdev_hw_addr_list *to_list, | 2749 | int __hw_addr_sync(struct netdev_hw_addr_list *to_list, |
2761 | struct netdev_hw_addr_list *from_list, | 2750 | struct netdev_hw_addr_list *from_list, int addr_len); |
2762 | int addr_len); | 2751 | void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, |
2763 | extern void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, | 2752 | struct netdev_hw_addr_list *from_list, int addr_len); |
2764 | struct netdev_hw_addr_list *from_list, | 2753 | void __hw_addr_flush(struct netdev_hw_addr_list *list); |
2765 | int addr_len); | 2754 | void __hw_addr_init(struct netdev_hw_addr_list *list); |
2766 | extern void __hw_addr_flush(struct netdev_hw_addr_list *list); | ||
2767 | extern void __hw_addr_init(struct netdev_hw_addr_list *list); | ||
2768 | 2755 | ||
2769 | /* Functions used for device addresses handling */ | 2756 | /* Functions used for device addresses handling */ |
2770 | extern int dev_addr_add(struct net_device *dev, const unsigned char *addr, | 2757 | int dev_addr_add(struct net_device *dev, const unsigned char *addr, |
2771 | unsigned char addr_type); | 2758 | unsigned char addr_type); |
2772 | extern int dev_addr_del(struct net_device *dev, const unsigned char *addr, | 2759 | int dev_addr_del(struct net_device *dev, const unsigned char *addr, |
2773 | unsigned char addr_type); | 2760 | unsigned char addr_type); |
2774 | extern int dev_addr_add_multiple(struct net_device *to_dev, | 2761 | int dev_addr_add_multiple(struct net_device *to_dev, |
2775 | struct net_device *from_dev, | 2762 | struct net_device *from_dev, unsigned char addr_type); |
2776 | unsigned char addr_type); | 2763 | int dev_addr_del_multiple(struct net_device *to_dev, |
2777 | extern int dev_addr_del_multiple(struct net_device *to_dev, | 2764 | struct net_device *from_dev, unsigned char addr_type); |
2778 | struct net_device *from_dev, | 2765 | void dev_addr_flush(struct net_device *dev); |
2779 | unsigned char addr_type); | 2766 | int dev_addr_init(struct net_device *dev); |
2780 | extern void dev_addr_flush(struct net_device *dev); | ||
2781 | extern int dev_addr_init(struct net_device *dev); | ||
2782 | 2767 | ||
2783 | /* Functions used for unicast addresses handling */ | 2768 | /* Functions used for unicast addresses handling */ |
2784 | extern int dev_uc_add(struct net_device *dev, const unsigned char *addr); | 2769 | int dev_uc_add(struct net_device *dev, const unsigned char *addr); |
2785 | extern int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr); | 2770 | int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr); |
2786 | extern int dev_uc_del(struct net_device *dev, const unsigned char *addr); | 2771 | int dev_uc_del(struct net_device *dev, const unsigned char *addr); |
2787 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); | 2772 | int dev_uc_sync(struct net_device *to, struct net_device *from); |
2788 | extern int dev_uc_sync_multiple(struct net_device *to, struct net_device *from); | 2773 | int dev_uc_sync_multiple(struct net_device *to, struct net_device *from); |
2789 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); | 2774 | void dev_uc_unsync(struct net_device *to, struct net_device *from); |
2790 | extern void dev_uc_flush(struct net_device *dev); | 2775 | void dev_uc_flush(struct net_device *dev); |
2791 | extern void dev_uc_init(struct net_device *dev); | 2776 | void dev_uc_init(struct net_device *dev); |
2792 | 2777 | ||
2793 | /* Functions used for multicast addresses handling */ | 2778 | /* Functions used for multicast addresses handling */ |
2794 | extern int dev_mc_add(struct net_device *dev, const unsigned char *addr); | 2779 | int dev_mc_add(struct net_device *dev, const unsigned char *addr); |
2795 | extern int dev_mc_add_global(struct net_device *dev, const unsigned char *addr); | 2780 | int dev_mc_add_global(struct net_device *dev, const unsigned char *addr); |
2796 | extern int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr); | 2781 | int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr); |
2797 | extern int dev_mc_del(struct net_device *dev, const unsigned char *addr); | 2782 | int dev_mc_del(struct net_device *dev, const unsigned char *addr); |
2798 | extern int dev_mc_del_global(struct net_device *dev, const unsigned char *addr); | 2783 | int dev_mc_del_global(struct net_device *dev, const unsigned char *addr); |
2799 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | 2784 | int dev_mc_sync(struct net_device *to, struct net_device *from); |
2800 | extern int dev_mc_sync_multiple(struct net_device *to, struct net_device *from); | 2785 | int dev_mc_sync_multiple(struct net_device *to, struct net_device *from); |
2801 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | 2786 | void dev_mc_unsync(struct net_device *to, struct net_device *from); |
2802 | extern void dev_mc_flush(struct net_device *dev); | 2787 | void dev_mc_flush(struct net_device *dev); |
2803 | extern void dev_mc_init(struct net_device *dev); | 2788 | void dev_mc_init(struct net_device *dev); |
2804 | 2789 | ||
2805 | /* Functions used for secondary unicast and multicast support */ | 2790 | /* Functions used for secondary unicast and multicast support */ |
2806 | extern void dev_set_rx_mode(struct net_device *dev); | 2791 | void dev_set_rx_mode(struct net_device *dev); |
2807 | extern void __dev_set_rx_mode(struct net_device *dev); | 2792 | void __dev_set_rx_mode(struct net_device *dev); |
2808 | extern int dev_set_promiscuity(struct net_device *dev, int inc); | 2793 | int dev_set_promiscuity(struct net_device *dev, int inc); |
2809 | extern int dev_set_allmulti(struct net_device *dev, int inc); | 2794 | int dev_set_allmulti(struct net_device *dev, int inc); |
2810 | extern void netdev_state_change(struct net_device *dev); | 2795 | void netdev_state_change(struct net_device *dev); |
2811 | extern void netdev_notify_peers(struct net_device *dev); | 2796 | void netdev_notify_peers(struct net_device *dev); |
2812 | extern void netdev_features_change(struct net_device *dev); | 2797 | void netdev_features_change(struct net_device *dev); |
2813 | /* Load a device via the kmod */ | 2798 | /* Load a device via the kmod */ |
2814 | extern void dev_load(struct net *net, const char *name); | 2799 | void dev_load(struct net *net, const char *name); |
2815 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | 2800 | struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, |
2816 | struct rtnl_link_stats64 *storage); | 2801 | struct rtnl_link_stats64 *storage); |
2817 | extern void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, | 2802 | void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, |
2818 | const struct net_device_stats *netdev_stats); | 2803 | const struct net_device_stats *netdev_stats); |
2819 | 2804 | ||
2820 | extern int netdev_max_backlog; | 2805 | extern int netdev_max_backlog; |
2821 | extern int netdev_tstamp_prequeue; | 2806 | extern int netdev_tstamp_prequeue; |
2822 | extern int weight_p; | 2807 | extern int weight_p; |
2823 | extern int bpf_jit_enable; | 2808 | extern int bpf_jit_enable; |
2824 | 2809 | ||
2825 | extern bool netdev_has_upper_dev(struct net_device *dev, | 2810 | bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev); |
2826 | struct net_device *upper_dev); | 2811 | bool netdev_has_any_upper_dev(struct net_device *dev); |
2827 | extern bool netdev_has_any_upper_dev(struct net_device *dev); | 2812 | struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev, |
2828 | extern struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev, | 2813 | struct list_head **iter); |
2829 | struct list_head **iter); | ||
2830 | 2814 | ||
2831 | /* iterate through upper list, must be called under RCU read lock */ | 2815 | /* iterate through upper list, must be called under RCU read lock */ |
2832 | #define netdev_for_each_all_upper_dev_rcu(dev, updev, iter) \ | 2816 | #define netdev_for_each_all_upper_dev_rcu(dev, updev, iter) \ |
@@ -2835,10 +2819,10 @@ extern struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *d | |||
2835 | updev; \ | 2819 | updev; \ |
2836 | updev = netdev_all_upper_get_next_dev_rcu(dev, &(iter))) | 2820 | updev = netdev_all_upper_get_next_dev_rcu(dev, &(iter))) |
2837 | 2821 | ||
2838 | extern void *netdev_lower_get_next_private(struct net_device *dev, | 2822 | void *netdev_lower_get_next_private(struct net_device *dev, |
2839 | struct list_head **iter); | 2823 | struct list_head **iter); |
2840 | extern void *netdev_lower_get_next_private_rcu(struct net_device *dev, | 2824 | void *netdev_lower_get_next_private_rcu(struct net_device *dev, |
2841 | struct list_head **iter); | 2825 | struct list_head **iter); |
2842 | 2826 | ||
2843 | #define netdev_for_each_lower_private(dev, priv, iter) \ | 2827 | #define netdev_for_each_lower_private(dev, priv, iter) \ |
2844 | for (iter = (dev)->adj_list.lower.next, \ | 2828 | for (iter = (dev)->adj_list.lower.next, \ |
@@ -2852,27 +2836,26 @@ extern void *netdev_lower_get_next_private_rcu(struct net_device *dev, | |||
2852 | priv; \ | 2836 | priv; \ |
2853 | priv = netdev_lower_get_next_private_rcu(dev, &(iter))) | 2837 | priv = netdev_lower_get_next_private_rcu(dev, &(iter))) |
2854 | 2838 | ||
2855 | extern void *netdev_adjacent_get_private(struct list_head *adj_list); | 2839 | void *netdev_adjacent_get_private(struct list_head *adj_list); |
2856 | extern struct net_device *netdev_master_upper_dev_get(struct net_device *dev); | 2840 | struct net_device *netdev_master_upper_dev_get(struct net_device *dev); |
2857 | extern struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev); | 2841 | struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev); |
2858 | extern int netdev_upper_dev_link(struct net_device *dev, | 2842 | int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev); |
2843 | int netdev_master_upper_dev_link(struct net_device *dev, | ||
2859 | struct net_device *upper_dev); | 2844 | struct net_device *upper_dev); |
2860 | extern int netdev_master_upper_dev_link(struct net_device *dev, | 2845 | int netdev_master_upper_dev_link_private(struct net_device *dev, |
2861 | struct net_device *upper_dev); | 2846 | struct net_device *upper_dev, |
2862 | extern int netdev_master_upper_dev_link_private(struct net_device *dev, | 2847 | void *private); |
2863 | struct net_device *upper_dev, | 2848 | void netdev_upper_dev_unlink(struct net_device *dev, |
2864 | void *private); | 2849 | struct net_device *upper_dev); |
2865 | extern void netdev_upper_dev_unlink(struct net_device *dev, | 2850 | void *netdev_lower_dev_get_private_rcu(struct net_device *dev, |
2866 | struct net_device *upper_dev); | 2851 | struct net_device *lower_dev); |
2867 | extern void *netdev_lower_dev_get_private_rcu(struct net_device *dev, | 2852 | void *netdev_lower_dev_get_private(struct net_device *dev, |
2868 | struct net_device *lower_dev); | 2853 | struct net_device *lower_dev); |
2869 | extern void *netdev_lower_dev_get_private(struct net_device *dev, | 2854 | int skb_checksum_help(struct sk_buff *skb); |
2870 | struct net_device *lower_dev); | 2855 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
2871 | extern int skb_checksum_help(struct sk_buff *skb); | 2856 | netdev_features_t features, bool tx_path); |
2872 | extern struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | 2857 | struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, |
2873 | netdev_features_t features, bool tx_path); | 2858 | netdev_features_t features); |
2874 | extern struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, | ||
2875 | netdev_features_t features); | ||
2876 | 2859 | ||
2877 | static inline | 2860 | static inline |
2878 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) | 2861 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) |
@@ -2894,30 +2877,30 @@ static inline bool can_checksum_protocol(netdev_features_t features, | |||
2894 | } | 2877 | } |
2895 | 2878 | ||
2896 | #ifdef CONFIG_BUG | 2879 | #ifdef CONFIG_BUG |
2897 | extern void netdev_rx_csum_fault(struct net_device *dev); | 2880 | void netdev_rx_csum_fault(struct net_device *dev); |
2898 | #else | 2881 | #else |
2899 | static inline void netdev_rx_csum_fault(struct net_device *dev) | 2882 | static inline void netdev_rx_csum_fault(struct net_device *dev) |
2900 | { | 2883 | { |
2901 | } | 2884 | } |
2902 | #endif | 2885 | #endif |
2903 | /* rx skb timestamps */ | 2886 | /* rx skb timestamps */ |
2904 | extern void net_enable_timestamp(void); | 2887 | void net_enable_timestamp(void); |
2905 | extern void net_disable_timestamp(void); | 2888 | void net_disable_timestamp(void); |
2906 | 2889 | ||
2907 | #ifdef CONFIG_PROC_FS | 2890 | #ifdef CONFIG_PROC_FS |
2908 | extern int __init dev_proc_init(void); | 2891 | int __init dev_proc_init(void); |
2909 | #else | 2892 | #else |
2910 | #define dev_proc_init() 0 | 2893 | #define dev_proc_init() 0 |
2911 | #endif | 2894 | #endif |
2912 | 2895 | ||
2913 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 2896 | int netdev_class_create_file(struct class_attribute *class_attr); |
2914 | extern void netdev_class_remove_file(struct class_attribute *class_attr); | 2897 | void netdev_class_remove_file(struct class_attribute *class_attr); |
2915 | 2898 | ||
2916 | extern struct kobj_ns_type_operations net_ns_type_operations; | 2899 | extern struct kobj_ns_type_operations net_ns_type_operations; |
2917 | 2900 | ||
2918 | extern const char *netdev_drivername(const struct net_device *dev); | 2901 | const char *netdev_drivername(const struct net_device *dev); |
2919 | 2902 | ||
2920 | extern void linkwatch_run_queue(void); | 2903 | void linkwatch_run_queue(void); |
2921 | 2904 | ||
2922 | static inline netdev_features_t netdev_get_wanted_features( | 2905 | static inline netdev_features_t netdev_get_wanted_features( |
2923 | struct net_device *dev) | 2906 | struct net_device *dev) |
@@ -3009,22 +2992,22 @@ static inline const char *netdev_name(const struct net_device *dev) | |||
3009 | return dev->name; | 2992 | return dev->name; |
3010 | } | 2993 | } |
3011 | 2994 | ||
3012 | extern __printf(3, 4) | 2995 | __printf(3, 4) |
3013 | int netdev_printk(const char *level, const struct net_device *dev, | 2996 | int netdev_printk(const char *level, const struct net_device *dev, |
3014 | const char *format, ...); | 2997 | const char *format, ...); |
3015 | extern __printf(2, 3) | 2998 | __printf(2, 3) |
3016 | int netdev_emerg(const struct net_device *dev, const char *format, ...); | 2999 | int netdev_emerg(const struct net_device *dev, const char *format, ...); |
3017 | extern __printf(2, 3) | 3000 | __printf(2, 3) |
3018 | int netdev_alert(const struct net_device *dev, const char *format, ...); | 3001 | int netdev_alert(const struct net_device *dev, const char *format, ...); |
3019 | extern __printf(2, 3) | 3002 | __printf(2, 3) |
3020 | int netdev_crit(const struct net_device *dev, const char *format, ...); | 3003 | int netdev_crit(const struct net_device *dev, const char *format, ...); |
3021 | extern __printf(2, 3) | 3004 | __printf(2, 3) |
3022 | int netdev_err(const struct net_device *dev, const char *format, ...); | 3005 | int netdev_err(const struct net_device *dev, const char *format, ...); |
3023 | extern __printf(2, 3) | 3006 | __printf(2, 3) |
3024 | int netdev_warn(const struct net_device *dev, const char *format, ...); | 3007 | int netdev_warn(const struct net_device *dev, const char *format, ...); |
3025 | extern __printf(2, 3) | 3008 | __printf(2, 3) |
3026 | int netdev_notice(const struct net_device *dev, const char *format, ...); | 3009 | int netdev_notice(const struct net_device *dev, const char *format, ...); |
3027 | extern __printf(2, 3) | 3010 | __printf(2, 3) |
3028 | int netdev_info(const struct net_device *dev, const char *format, ...); | 3011 | int netdev_info(const struct net_device *dev, const char *format, ...); |
3029 | 3012 | ||
3030 | #define MODULE_ALIAS_NETDEV(device) \ | 3013 | #define MODULE_ALIAS_NETDEV(device) \ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 708fe72ab913..61223c52414f 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -35,7 +35,7 @@ static inline void nf_inet_addr_mask(const union nf_inet_addr *a1, | |||
35 | result->all[3] = a1->all[3] & mask->all[3]; | 35 | result->all[3] = a1->all[3] & mask->all[3]; |
36 | } | 36 | } |
37 | 37 | ||
38 | extern int netfilter_init(void); | 38 | int netfilter_init(void); |
39 | 39 | ||
40 | /* Largest hook number + 1 */ | 40 | /* Largest hook number + 1 */ |
41 | #define NF_MAX_HOOKS 8 | 41 | #define NF_MAX_HOOKS 8 |
@@ -208,7 +208,7 @@ int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, | |||
208 | /* Call this before modifying an existing packet: ensures it is | 208 | /* Call this before modifying an existing packet: ensures it is |
209 | modifiable and linear to the point you care about (writable_len). | 209 | modifiable and linear to the point you care about (writable_len). |
210 | Returns true or false. */ | 210 | Returns true or false. */ |
211 | extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len); | 211 | int skb_make_writable(struct sk_buff *skb, unsigned int writable_len); |
212 | 212 | ||
213 | struct flowi; | 213 | struct flowi; |
214 | struct nf_queue_entry; | 214 | struct nf_queue_entry; |
@@ -269,8 +269,8 @@ nf_checksum_partial(struct sk_buff *skb, unsigned int hook, | |||
269 | return csum; | 269 | return csum; |
270 | } | 270 | } |
271 | 271 | ||
272 | extern int nf_register_afinfo(const struct nf_afinfo *afinfo); | 272 | int nf_register_afinfo(const struct nf_afinfo *afinfo); |
273 | extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo); | 273 | void nf_unregister_afinfo(const struct nf_afinfo *afinfo); |
274 | 274 | ||
275 | #include <net/flow.h> | 275 | #include <net/flow.h> |
276 | extern void (*nf_nat_decode_session_hook)(struct sk_buff *, struct flowi *); | 276 | extern void (*nf_nat_decode_session_hook)(struct sk_buff *, struct flowi *); |
@@ -315,7 +315,7 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) | |||
315 | 315 | ||
316 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 316 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
317 | extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu; | 317 | extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu; |
318 | extern void nf_ct_attach(struct sk_buff *, const struct sk_buff *); | 318 | void nf_ct_attach(struct sk_buff *, const struct sk_buff *); |
319 | extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu; | 319 | extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu; |
320 | 320 | ||
321 | struct nf_conn; | 321 | struct nf_conn; |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 127d0b90604f..275505792664 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -23,6 +23,6 @@ struct ip_conntrack_stat { | |||
23 | }; | 23 | }; |
24 | 24 | ||
25 | /* call to create an explicit dependency on nf_conntrack. */ | 25 | /* call to create an explicit dependency on nf_conntrack. */ |
26 | extern void need_conntrack(void); | 26 | void need_conntrack(void); |
27 | 27 | ||
28 | #endif /* _NF_CONNTRACK_COMMON_H */ | 28 | #endif /* _NF_CONNTRACK_COMMON_H */ |
diff --git a/include/linux/netfilter/nf_conntrack_h323.h b/include/linux/netfilter/nf_conntrack_h323.h index f381020eee92..858d9b214053 100644 --- a/include/linux/netfilter/nf_conntrack_h323.h +++ b/include/linux/netfilter/nf_conntrack_h323.h | |||
@@ -29,13 +29,13 @@ struct nf_ct_h323_master { | |||
29 | 29 | ||
30 | struct nf_conn; | 30 | struct nf_conn; |
31 | 31 | ||
32 | extern int get_h225_addr(struct nf_conn *ct, unsigned char *data, | 32 | int get_h225_addr(struct nf_conn *ct, unsigned char *data, |
33 | TransportAddress *taddr, | 33 | TransportAddress *taddr, union nf_inet_addr *addr, |
34 | union nf_inet_addr *addr, __be16 *port); | 34 | __be16 *port); |
35 | extern void nf_conntrack_h245_expect(struct nf_conn *new, | 35 | void nf_conntrack_h245_expect(struct nf_conn *new, |
36 | struct nf_conntrack_expect *this); | 36 | struct nf_conntrack_expect *this); |
37 | extern void nf_conntrack_q931_expect(struct nf_conn *new, | 37 | void nf_conntrack_q931_expect(struct nf_conn *new, |
38 | struct nf_conntrack_expect *this); | 38 | struct nf_conntrack_expect *this); |
39 | extern int (*set_h245_addr_hook) (struct sk_buff *skb, unsigned int protoff, | 39 | extern int (*set_h245_addr_hook) (struct sk_buff *skb, unsigned int protoff, |
40 | unsigned char **data, int dataoff, | 40 | unsigned char **data, int dataoff, |
41 | H245_TransportAddress *taddr, | 41 | H245_TransportAddress *taddr, |
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h index 6a0664c0c451..ec2ffaf418c8 100644 --- a/include/linux/netfilter/nf_conntrack_proto_gre.h +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
@@ -87,8 +87,8 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, | |||
87 | /* delete keymap entries */ | 87 | /* delete keymap entries */ |
88 | void nf_ct_gre_keymap_destroy(struct nf_conn *ct); | 88 | void nf_ct_gre_keymap_destroy(struct nf_conn *ct); |
89 | 89 | ||
90 | extern void nf_ct_gre_keymap_flush(struct net *net); | 90 | void nf_ct_gre_keymap_flush(struct net *net); |
91 | extern void nf_nat_need_gre(void); | 91 | void nf_nat_need_gre(void); |
92 | 92 | ||
93 | #endif /* __KERNEL__ */ | 93 | #endif /* __KERNEL__ */ |
94 | #endif /* _CONNTRACK_PROTO_GRE_H */ | 94 | #endif /* _CONNTRACK_PROTO_GRE_H */ |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index ba7f571a2b1c..5cac0207b95d 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
@@ -157,35 +157,34 @@ extern unsigned int (*nf_nat_sdp_media_hook)(struct sk_buff *skb, | |||
157 | unsigned int medialen, | 157 | unsigned int medialen, |
158 | union nf_inet_addr *rtp_addr); | 158 | union nf_inet_addr *rtp_addr); |
159 | 159 | ||
160 | extern int ct_sip_parse_request(const struct nf_conn *ct, | 160 | int ct_sip_parse_request(const struct nf_conn *ct, const char *dptr, |
161 | const char *dptr, unsigned int datalen, | 161 | unsigned int datalen, unsigned int *matchoff, |
162 | unsigned int *matchoff, unsigned int *matchlen, | 162 | unsigned int *matchlen, union nf_inet_addr *addr, |
163 | union nf_inet_addr *addr, __be16 *port); | 163 | __be16 *port); |
164 | extern int ct_sip_get_header(const struct nf_conn *ct, const char *dptr, | 164 | int ct_sip_get_header(const struct nf_conn *ct, const char *dptr, |
165 | unsigned int dataoff, unsigned int datalen, | 165 | unsigned int dataoff, unsigned int datalen, |
166 | enum sip_header_types type, | 166 | enum sip_header_types type, unsigned int *matchoff, |
167 | unsigned int *matchoff, unsigned int *matchlen); | 167 | unsigned int *matchlen); |
168 | extern int ct_sip_parse_header_uri(const struct nf_conn *ct, const char *dptr, | 168 | int ct_sip_parse_header_uri(const struct nf_conn *ct, const char *dptr, |
169 | unsigned int *dataoff, unsigned int datalen, | 169 | unsigned int *dataoff, unsigned int datalen, |
170 | enum sip_header_types type, int *in_header, | 170 | enum sip_header_types type, int *in_header, |
171 | unsigned int *matchoff, unsigned int *matchlen, | 171 | unsigned int *matchoff, unsigned int *matchlen, |
172 | union nf_inet_addr *addr, __be16 *port); | 172 | union nf_inet_addr *addr, __be16 *port); |
173 | extern int ct_sip_parse_address_param(const struct nf_conn *ct, const char *dptr, | 173 | int ct_sip_parse_address_param(const struct nf_conn *ct, const char *dptr, |
174 | unsigned int dataoff, unsigned int datalen, | 174 | unsigned int dataoff, unsigned int datalen, |
175 | const char *name, | 175 | const char *name, unsigned int *matchoff, |
176 | unsigned int *matchoff, unsigned int *matchlen, | 176 | unsigned int *matchlen, union nf_inet_addr *addr, |
177 | union nf_inet_addr *addr, bool delim); | 177 | bool delim); |
178 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, | 178 | int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, |
179 | unsigned int off, unsigned int datalen, | 179 | unsigned int off, unsigned int datalen, |
180 | const char *name, | 180 | const char *name, unsigned int *matchoff, |
181 | unsigned int *matchoff, unsigned int *matchen, | 181 | unsigned int *matchen, unsigned int *val); |
182 | unsigned int *val); | 182 | |
183 | 183 | int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr, | |
184 | extern int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr, | 184 | unsigned int dataoff, unsigned int datalen, |
185 | unsigned int dataoff, unsigned int datalen, | 185 | enum sdp_header_types type, |
186 | enum sdp_header_types type, | 186 | enum sdp_header_types term, |
187 | enum sdp_header_types term, | 187 | unsigned int *matchoff, unsigned int *matchlen); |
188 | unsigned int *matchoff, unsigned int *matchlen); | ||
189 | 188 | ||
190 | #endif /* __KERNEL__ */ | 189 | #endif /* __KERNEL__ */ |
191 | #endif /* __NF_CONNTRACK_SIP_H__ */ | 190 | #endif /* __NF_CONNTRACK_SIP_H__ */ |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index cadb7402d7a7..4f68cd7141d2 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -25,20 +25,20 @@ struct nfnetlink_subsystem { | |||
25 | const struct nfnl_callback *cb; /* callback for individual types */ | 25 | const struct nfnl_callback *cb; /* callback for individual types */ |
26 | }; | 26 | }; |
27 | 27 | ||
28 | extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n); | 28 | int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n); |
29 | extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | 29 | int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); |
30 | 30 | ||
31 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); | 31 | int nfnetlink_has_listeners(struct net *net, unsigned int group); |
32 | extern struct sk_buff *nfnetlink_alloc_skb(struct net *net, unsigned int size, | 32 | struct sk_buff *nfnetlink_alloc_skb(struct net *net, unsigned int size, |
33 | u32 dst_portid, gfp_t gfp_mask); | 33 | u32 dst_portid, gfp_t gfp_mask); |
34 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid, | 34 | int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid, |
35 | unsigned int group, int echo, gfp_t flags); | 35 | unsigned int group, int echo, gfp_t flags); |
36 | extern int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error); | 36 | int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error); |
37 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, | 37 | int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid, |
38 | u32 portid, int flags); | 38 | int flags); |
39 | 39 | ||
40 | extern void nfnl_lock(__u8 subsys_id); | 40 | void nfnl_lock(__u8 subsys_id); |
41 | extern void nfnl_unlock(__u8 subsys_id); | 41 | void nfnl_unlock(__u8 subsys_id); |
42 | 42 | ||
43 | #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \ | 43 | #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \ |
44 | MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys)) | 44 | MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys)) |
diff --git a/include/linux/netfilter/nfnetlink_acct.h b/include/linux/netfilter/nfnetlink_acct.h index bb4bbc9b7a18..b2e85e59f760 100644 --- a/include/linux/netfilter/nfnetlink_acct.h +++ b/include/linux/netfilter/nfnetlink_acct.h | |||
@@ -6,8 +6,8 @@ | |||
6 | 6 | ||
7 | struct nf_acct; | 7 | struct nf_acct; |
8 | 8 | ||
9 | extern struct nf_acct *nfnl_acct_find_get(const char *filter_name); | 9 | struct nf_acct *nfnl_acct_find_get(const char *filter_name); |
10 | extern void nfnl_acct_put(struct nf_acct *acct); | 10 | void nfnl_acct_put(struct nf_acct *acct); |
11 | extern void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct); | 11 | void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct); |
12 | 12 | ||
13 | #endif /* _NFNL_ACCT_H */ | 13 | #endif /* _NFNL_ACCT_H */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index dd49566315c6..a3e215bb0241 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -229,50 +229,48 @@ struct xt_table_info { | |||
229 | 229 | ||
230 | #define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \ | 230 | #define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \ |
231 | + nr_cpu_ids * sizeof(char *)) | 231 | + nr_cpu_ids * sizeof(char *)) |
232 | extern int xt_register_target(struct xt_target *target); | 232 | int xt_register_target(struct xt_target *target); |
233 | extern void xt_unregister_target(struct xt_target *target); | 233 | void xt_unregister_target(struct xt_target *target); |
234 | extern int xt_register_targets(struct xt_target *target, unsigned int n); | 234 | int xt_register_targets(struct xt_target *target, unsigned int n); |
235 | extern void xt_unregister_targets(struct xt_target *target, unsigned int n); | 235 | void xt_unregister_targets(struct xt_target *target, unsigned int n); |
236 | 236 | ||
237 | extern int xt_register_match(struct xt_match *target); | 237 | int xt_register_match(struct xt_match *target); |
238 | extern void xt_unregister_match(struct xt_match *target); | 238 | void xt_unregister_match(struct xt_match *target); |
239 | extern int xt_register_matches(struct xt_match *match, unsigned int n); | 239 | int xt_register_matches(struct xt_match *match, unsigned int n); |
240 | extern void xt_unregister_matches(struct xt_match *match, unsigned int n); | 240 | void xt_unregister_matches(struct xt_match *match, unsigned int n); |
241 | 241 | ||
242 | extern int xt_check_match(struct xt_mtchk_param *, | 242 | int xt_check_match(struct xt_mtchk_param *, unsigned int size, u_int8_t proto, |
243 | unsigned int size, u_int8_t proto, bool inv_proto); | 243 | bool inv_proto); |
244 | extern int xt_check_target(struct xt_tgchk_param *, | 244 | int xt_check_target(struct xt_tgchk_param *, unsigned int size, u_int8_t proto, |
245 | unsigned int size, u_int8_t proto, bool inv_proto); | 245 | bool inv_proto); |
246 | 246 | ||
247 | extern struct xt_table *xt_register_table(struct net *net, | 247 | struct xt_table *xt_register_table(struct net *net, |
248 | const struct xt_table *table, | 248 | const struct xt_table *table, |
249 | struct xt_table_info *bootstrap, | 249 | struct xt_table_info *bootstrap, |
250 | struct xt_table_info *newinfo); | 250 | struct xt_table_info *newinfo); |
251 | extern void *xt_unregister_table(struct xt_table *table); | 251 | void *xt_unregister_table(struct xt_table *table); |
252 | 252 | ||
253 | extern struct xt_table_info *xt_replace_table(struct xt_table *table, | 253 | struct xt_table_info *xt_replace_table(struct xt_table *table, |
254 | unsigned int num_counters, | 254 | unsigned int num_counters, |
255 | struct xt_table_info *newinfo, | 255 | struct xt_table_info *newinfo, |
256 | int *error); | 256 | int *error); |
257 | 257 | ||
258 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); | 258 | struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); |
259 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); | 259 | struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); |
260 | extern struct xt_match *xt_request_find_match(u8 af, const char *name, | 260 | struct xt_match *xt_request_find_match(u8 af, const char *name, u8 revision); |
261 | u8 revision); | 261 | struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision); |
262 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, | 262 | int xt_find_revision(u8 af, const char *name, u8 revision, int target, |
263 | u8 revision); | 263 | int *err); |
264 | extern int xt_find_revision(u8 af, const char *name, u8 revision, | 264 | |
265 | int target, int *err); | 265 | struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af, |
266 | 266 | const char *name); | |
267 | extern struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af, | 267 | void xt_table_unlock(struct xt_table *t); |
268 | const char *name); | 268 | |
269 | extern void xt_table_unlock(struct xt_table *t); | 269 | int xt_proto_init(struct net *net, u_int8_t af); |
270 | 270 | void xt_proto_fini(struct net *net, u_int8_t af); | |
271 | extern int xt_proto_init(struct net *net, u_int8_t af); | 271 | |
272 | extern void xt_proto_fini(struct net *net, u_int8_t af); | 272 | struct xt_table_info *xt_alloc_table_info(unsigned int size); |
273 | 273 | void xt_free_table_info(struct xt_table_info *info); | |
274 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | ||
275 | extern void xt_free_table_info(struct xt_table_info *info); | ||
276 | 274 | ||
277 | /** | 275 | /** |
278 | * xt_recseq - recursive seqcount for netfilter use | 276 | * xt_recseq - recursive seqcount for netfilter use |
@@ -353,8 +351,8 @@ static inline unsigned long ifname_compare_aligned(const char *_a, | |||
353 | return ret; | 351 | return ret; |
354 | } | 352 | } |
355 | 353 | ||
356 | extern struct nf_hook_ops *xt_hook_link(const struct xt_table *, nf_hookfn *); | 354 | struct nf_hook_ops *xt_hook_link(const struct xt_table *, nf_hookfn *); |
357 | extern void xt_hook_unlink(const struct xt_table *, struct nf_hook_ops *); | 355 | void xt_hook_unlink(const struct xt_table *, struct nf_hook_ops *); |
358 | 356 | ||
359 | #ifdef CONFIG_COMPAT | 357 | #ifdef CONFIG_COMPAT |
360 | #include <net/compat.h> | 358 | #include <net/compat.h> |
@@ -414,25 +412,25 @@ struct _compat_xt_align { | |||
414 | 412 | ||
415 | #define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align)) | 413 | #define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align)) |
416 | 414 | ||
417 | extern void xt_compat_lock(u_int8_t af); | 415 | void xt_compat_lock(u_int8_t af); |
418 | extern void xt_compat_unlock(u_int8_t af); | 416 | void xt_compat_unlock(u_int8_t af); |
419 | 417 | ||
420 | extern int xt_compat_add_offset(u_int8_t af, unsigned int offset, int delta); | 418 | int xt_compat_add_offset(u_int8_t af, unsigned int offset, int delta); |
421 | extern void xt_compat_flush_offsets(u_int8_t af); | 419 | void xt_compat_flush_offsets(u_int8_t af); |
422 | extern void xt_compat_init_offsets(u_int8_t af, unsigned int number); | 420 | void xt_compat_init_offsets(u_int8_t af, unsigned int number); |
423 | extern int xt_compat_calc_jump(u_int8_t af, unsigned int offset); | 421 | int xt_compat_calc_jump(u_int8_t af, unsigned int offset); |
424 | 422 | ||
425 | extern int xt_compat_match_offset(const struct xt_match *match); | 423 | int xt_compat_match_offset(const struct xt_match *match); |
426 | extern int xt_compat_match_from_user(struct xt_entry_match *m, | 424 | int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr, |
427 | void **dstptr, unsigned int *size); | 425 | unsigned int *size); |
428 | extern int xt_compat_match_to_user(const struct xt_entry_match *m, | 426 | int xt_compat_match_to_user(const struct xt_entry_match *m, |
429 | void __user **dstptr, unsigned int *size); | 427 | void __user **dstptr, unsigned int *size); |
430 | 428 | ||
431 | extern int xt_compat_target_offset(const struct xt_target *target); | 429 | int xt_compat_target_offset(const struct xt_target *target); |
432 | extern void xt_compat_target_from_user(struct xt_entry_target *t, | 430 | void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, |
433 | void **dstptr, unsigned int *size); | 431 | unsigned int *size); |
434 | extern int xt_compat_target_to_user(const struct xt_entry_target *t, | 432 | int xt_compat_target_to_user(const struct xt_entry_target *t, |
435 | void __user **dstptr, unsigned int *size); | 433 | void __user **dstptr, unsigned int *size); |
436 | 434 | ||
437 | #endif /* CONFIG_COMPAT */ | 435 | #endif /* CONFIG_COMPAT */ |
438 | #endif /* _X_TABLES_H */ | 436 | #endif /* _X_TABLES_H */ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index dfb4d9e52bcb..8ab1c278b66d 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -25,7 +25,7 @@ enum nf_br_hook_priorities { | |||
25 | #define BRNF_PPPoE 0x20 | 25 | #define BRNF_PPPoE 0x20 |
26 | 26 | ||
27 | /* Only used in br_forward.c */ | 27 | /* Only used in br_forward.c */ |
28 | extern int nf_bridge_copy_header(struct sk_buff *skb); | 28 | int nf_bridge_copy_header(struct sk_buff *skb); |
29 | static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) | 29 | static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) |
30 | { | 30 | { |
31 | if (skb->nf_bridge && | 31 | if (skb->nf_bridge && |
@@ -53,7 +53,7 @@ static inline unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb) | |||
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | 55 | ||
56 | extern int br_handle_frame_finish(struct sk_buff *skb); | 56 | int br_handle_frame_finish(struct sk_buff *skb); |
57 | /* Only used in br_device.c */ | 57 | /* Only used in br_device.c */ |
58 | static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb) | 58 | static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb) |
59 | { | 59 | { |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index dfaf116b3e81..6e4591bb54d4 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <uapi/linux/netfilter_ipv4.h> | 7 | #include <uapi/linux/netfilter_ipv4.h> |
8 | 8 | ||
9 | extern int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type); | 9 | int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type); |
10 | extern __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | 10 | __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, |
11 | unsigned int dataoff, u_int8_t protocol); | 11 | unsigned int dataoff, u_int8_t protocol); |
12 | #endif /*__LINUX_IP_NETFILTER_H*/ | 12 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 2d4df6ce043e..64dad1cc1a4b 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -11,12 +11,12 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | #ifdef CONFIG_NETFILTER | 13 | #ifdef CONFIG_NETFILTER |
14 | extern int ip6_route_me_harder(struct sk_buff *skb); | 14 | int ip6_route_me_harder(struct sk_buff *skb); |
15 | extern __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 15 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
16 | unsigned int dataoff, u_int8_t protocol); | 16 | unsigned int dataoff, u_int8_t protocol); |
17 | 17 | ||
18 | extern int ipv6_netfilter_init(void); | 18 | int ipv6_netfilter_init(void); |
19 | extern void ipv6_netfilter_fini(void); | 19 | void ipv6_netfilter_fini(void); |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Hook functions for ipv6 to allow xt_* modules to be built-in even | 22 | * Hook functions for ipv6 to allow xt_* modules to be built-in even |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2ddb48d9312c..6d56840e561e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -585,8 +585,8 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | |||
585 | skb->_skb_refdst = (unsigned long)dst; | 585 | skb->_skb_refdst = (unsigned long)dst; |
586 | } | 586 | } |
587 | 587 | ||
588 | extern void __skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst, | 588 | void __skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst, |
589 | bool force); | 589 | bool force); |
590 | 590 | ||
591 | /** | 591 | /** |
592 | * skb_dst_set_noref - sets skb dst, hopefully, without taking reference | 592 | * skb_dst_set_noref - sets skb dst, hopefully, without taking reference |
@@ -634,20 +634,20 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb) | |||
634 | return (struct rtable *)skb_dst(skb); | 634 | return (struct rtable *)skb_dst(skb); |
635 | } | 635 | } |
636 | 636 | ||
637 | extern void kfree_skb(struct sk_buff *skb); | 637 | void kfree_skb(struct sk_buff *skb); |
638 | extern void kfree_skb_list(struct sk_buff *segs); | 638 | void kfree_skb_list(struct sk_buff *segs); |
639 | extern void skb_tx_error(struct sk_buff *skb); | 639 | void skb_tx_error(struct sk_buff *skb); |
640 | extern void consume_skb(struct sk_buff *skb); | 640 | void consume_skb(struct sk_buff *skb); |
641 | extern void __kfree_skb(struct sk_buff *skb); | 641 | void __kfree_skb(struct sk_buff *skb); |
642 | extern struct kmem_cache *skbuff_head_cache; | 642 | extern struct kmem_cache *skbuff_head_cache; |
643 | 643 | ||
644 | extern void kfree_skb_partial(struct sk_buff *skb, bool head_stolen); | 644 | void kfree_skb_partial(struct sk_buff *skb, bool head_stolen); |
645 | extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, | 645 | bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, |
646 | bool *fragstolen, int *delta_truesize); | 646 | bool *fragstolen, int *delta_truesize); |
647 | 647 | ||
648 | extern struct sk_buff *__alloc_skb(unsigned int size, | 648 | struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, |
649 | gfp_t priority, int flags, int node); | 649 | int node); |
650 | extern struct sk_buff *build_skb(void *data, unsigned int frag_size); | 650 | struct sk_buff *build_skb(void *data, unsigned int frag_size); |
651 | static inline struct sk_buff *alloc_skb(unsigned int size, | 651 | static inline struct sk_buff *alloc_skb(unsigned int size, |
652 | gfp_t priority) | 652 | gfp_t priority) |
653 | { | 653 | { |
@@ -660,41 +660,33 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
660 | return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE); | 660 | return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE); |
661 | } | 661 | } |
662 | 662 | ||
663 | extern struct sk_buff *__alloc_skb_head(gfp_t priority, int node); | 663 | struct sk_buff *__alloc_skb_head(gfp_t priority, int node); |
664 | static inline struct sk_buff *alloc_skb_head(gfp_t priority) | 664 | static inline struct sk_buff *alloc_skb_head(gfp_t priority) |
665 | { | 665 | { |
666 | return __alloc_skb_head(priority, -1); | 666 | return __alloc_skb_head(priority, -1); |
667 | } | 667 | } |
668 | 668 | ||
669 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 669 | struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); |
670 | extern int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask); | 670 | int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask); |
671 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 671 | struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority); |
672 | gfp_t priority); | 672 | struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t priority); |
673 | extern struct sk_buff *skb_copy(const struct sk_buff *skb, | 673 | struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, gfp_t gfp_mask); |
674 | gfp_t priority); | 674 | |
675 | extern struct sk_buff *__pskb_copy(struct sk_buff *skb, | 675 | int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask); |
676 | int headroom, gfp_t gfp_mask); | 676 | struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, |
677 | 677 | unsigned int headroom); | |
678 | extern int pskb_expand_head(struct sk_buff *skb, | 678 | struct sk_buff *skb_copy_expand(const struct sk_buff *skb, int newheadroom, |
679 | int nhead, int ntail, | 679 | int newtailroom, gfp_t priority); |
680 | gfp_t gfp_mask); | 680 | int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, |
681 | extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, | 681 | int len); |
682 | unsigned int headroom); | 682 | int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer); |
683 | extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, | 683 | int skb_pad(struct sk_buff *skb, int pad); |
684 | int newheadroom, int newtailroom, | ||
685 | gfp_t priority); | ||
686 | extern int skb_to_sgvec(struct sk_buff *skb, | ||
687 | struct scatterlist *sg, int offset, | ||
688 | int len); | ||
689 | extern int skb_cow_data(struct sk_buff *skb, int tailbits, | ||
690 | struct sk_buff **trailer); | ||
691 | extern int skb_pad(struct sk_buff *skb, int pad); | ||
692 | #define dev_kfree_skb(a) consume_skb(a) | 684 | #define dev_kfree_skb(a) consume_skb(a) |
693 | 685 | ||
694 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 686 | int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
695 | int getfrag(void *from, char *to, int offset, | 687 | int getfrag(void *from, char *to, int offset, |
696 | int len,int odd, struct sk_buff *skb), | 688 | int len, int odd, struct sk_buff *skb), |
697 | void *from, int length); | 689 | void *from, int length); |
698 | 690 | ||
699 | struct skb_seq_state { | 691 | struct skb_seq_state { |
700 | __u32 lower_offset; | 692 | __u32 lower_offset; |
@@ -706,18 +698,17 @@ struct skb_seq_state { | |||
706 | __u8 *frag_data; | 698 | __u8 *frag_data; |
707 | }; | 699 | }; |
708 | 700 | ||
709 | extern void skb_prepare_seq_read(struct sk_buff *skb, | 701 | void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from, |
710 | unsigned int from, unsigned int to, | 702 | unsigned int to, struct skb_seq_state *st); |
711 | struct skb_seq_state *st); | 703 | unsigned int skb_seq_read(unsigned int consumed, const u8 **data, |
712 | extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data, | 704 | struct skb_seq_state *st); |
713 | struct skb_seq_state *st); | 705 | void skb_abort_seq_read(struct skb_seq_state *st); |
714 | extern void skb_abort_seq_read(struct skb_seq_state *st); | ||
715 | 706 | ||
716 | extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, | 707 | unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, |
717 | unsigned int to, struct ts_config *config, | 708 | unsigned int to, struct ts_config *config, |
718 | struct ts_state *state); | 709 | struct ts_state *state); |
719 | 710 | ||
720 | extern void __skb_get_rxhash(struct sk_buff *skb); | 711 | void __skb_get_rxhash(struct sk_buff *skb); |
721 | static inline __u32 skb_get_rxhash(struct sk_buff *skb) | 712 | static inline __u32 skb_get_rxhash(struct sk_buff *skb) |
722 | { | 713 | { |
723 | if (!skb->l4_rxhash) | 714 | if (!skb->l4_rxhash) |
@@ -1095,7 +1086,8 @@ static inline void skb_queue_head_init_class(struct sk_buff_head *list, | |||
1095 | * The "__skb_xxxx()" functions are the non-atomic ones that | 1086 | * The "__skb_xxxx()" functions are the non-atomic ones that |
1096 | * can only be called with interrupts disabled. | 1087 | * can only be called with interrupts disabled. |
1097 | */ | 1088 | */ |
1098 | extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list); | 1089 | void skb_insert(struct sk_buff *old, struct sk_buff *newsk, |
1090 | struct sk_buff_head *list); | ||
1099 | static inline void __skb_insert(struct sk_buff *newsk, | 1091 | static inline void __skb_insert(struct sk_buff *newsk, |
1100 | struct sk_buff *prev, struct sk_buff *next, | 1092 | struct sk_buff *prev, struct sk_buff *next, |
1101 | struct sk_buff_head *list) | 1093 | struct sk_buff_head *list) |
@@ -1201,8 +1193,8 @@ static inline void __skb_queue_after(struct sk_buff_head *list, | |||
1201 | __skb_insert(newsk, prev, prev->next, list); | 1193 | __skb_insert(newsk, prev, prev->next, list); |
1202 | } | 1194 | } |
1203 | 1195 | ||
1204 | extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, | 1196 | void skb_append(struct sk_buff *old, struct sk_buff *newsk, |
1205 | struct sk_buff_head *list); | 1197 | struct sk_buff_head *list); |
1206 | 1198 | ||
1207 | static inline void __skb_queue_before(struct sk_buff_head *list, | 1199 | static inline void __skb_queue_before(struct sk_buff_head *list, |
1208 | struct sk_buff *next, | 1200 | struct sk_buff *next, |
@@ -1221,7 +1213,7 @@ static inline void __skb_queue_before(struct sk_buff_head *list, | |||
1221 | * | 1213 | * |
1222 | * A buffer cannot be placed on two lists at the same time. | 1214 | * A buffer cannot be placed on two lists at the same time. |
1223 | */ | 1215 | */ |
1224 | extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk); | 1216 | void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk); |
1225 | static inline void __skb_queue_head(struct sk_buff_head *list, | 1217 | static inline void __skb_queue_head(struct sk_buff_head *list, |
1226 | struct sk_buff *newsk) | 1218 | struct sk_buff *newsk) |
1227 | { | 1219 | { |
@@ -1238,7 +1230,7 @@ static inline void __skb_queue_head(struct sk_buff_head *list, | |||
1238 | * | 1230 | * |
1239 | * A buffer cannot be placed on two lists at the same time. | 1231 | * A buffer cannot be placed on two lists at the same time. |
1240 | */ | 1232 | */ |
1241 | extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); | 1233 | void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); |
1242 | static inline void __skb_queue_tail(struct sk_buff_head *list, | 1234 | static inline void __skb_queue_tail(struct sk_buff_head *list, |
1243 | struct sk_buff *newsk) | 1235 | struct sk_buff *newsk) |
1244 | { | 1236 | { |
@@ -1249,7 +1241,7 @@ static inline void __skb_queue_tail(struct sk_buff_head *list, | |||
1249 | * remove sk_buff from list. _Must_ be called atomically, and with | 1241 | * remove sk_buff from list. _Must_ be called atomically, and with |
1250 | * the list known.. | 1242 | * the list known.. |
1251 | */ | 1243 | */ |
1252 | extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list); | 1244 | void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list); |
1253 | static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) | 1245 | static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) |
1254 | { | 1246 | { |
1255 | struct sk_buff *next, *prev; | 1247 | struct sk_buff *next, *prev; |
@@ -1270,7 +1262,7 @@ static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) | |||
1270 | * so must be used with appropriate locks held only. The head item is | 1262 | * so must be used with appropriate locks held only. The head item is |
1271 | * returned or %NULL if the list is empty. | 1263 | * returned or %NULL if the list is empty. |
1272 | */ | 1264 | */ |
1273 | extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); | 1265 | struct sk_buff *skb_dequeue(struct sk_buff_head *list); |
1274 | static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) | 1266 | static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) |
1275 | { | 1267 | { |
1276 | struct sk_buff *skb = skb_peek(list); | 1268 | struct sk_buff *skb = skb_peek(list); |
@@ -1287,7 +1279,7 @@ static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) | |||
1287 | * so must be used with appropriate locks held only. The tail item is | 1279 | * so must be used with appropriate locks held only. The tail item is |
1288 | * returned or %NULL if the list is empty. | 1280 | * returned or %NULL if the list is empty. |
1289 | */ | 1281 | */ |
1290 | extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list); | 1282 | struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list); |
1291 | static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) | 1283 | static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) |
1292 | { | 1284 | { |
1293 | struct sk_buff *skb = skb_peek_tail(list); | 1285 | struct sk_buff *skb = skb_peek_tail(list); |
@@ -1373,8 +1365,8 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i, | |||
1373 | skb_shinfo(skb)->nr_frags = i + 1; | 1365 | skb_shinfo(skb)->nr_frags = i + 1; |
1374 | } | 1366 | } |
1375 | 1367 | ||
1376 | extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, | 1368 | void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, |
1377 | int off, int size, unsigned int truesize); | 1369 | int size, unsigned int truesize); |
1378 | 1370 | ||
1379 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) | 1371 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) |
1380 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) | 1372 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) |
@@ -1418,7 +1410,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) | |||
1418 | /* | 1410 | /* |
1419 | * Add data to an sk_buff | 1411 | * Add data to an sk_buff |
1420 | */ | 1412 | */ |
1421 | extern unsigned char *skb_put(struct sk_buff *skb, unsigned int len); | 1413 | unsigned char *skb_put(struct sk_buff *skb, unsigned int len); |
1422 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | 1414 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) |
1423 | { | 1415 | { |
1424 | unsigned char *tmp = skb_tail_pointer(skb); | 1416 | unsigned char *tmp = skb_tail_pointer(skb); |
@@ -1428,7 +1420,7 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | |||
1428 | return tmp; | 1420 | return tmp; |
1429 | } | 1421 | } |
1430 | 1422 | ||
1431 | extern unsigned char *skb_push(struct sk_buff *skb, unsigned int len); | 1423 | unsigned char *skb_push(struct sk_buff *skb, unsigned int len); |
1432 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) | 1424 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) |
1433 | { | 1425 | { |
1434 | skb->data -= len; | 1426 | skb->data -= len; |
@@ -1436,7 +1428,7 @@ static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) | |||
1436 | return skb->data; | 1428 | return skb->data; |
1437 | } | 1429 | } |
1438 | 1430 | ||
1439 | extern unsigned char *skb_pull(struct sk_buff *skb, unsigned int len); | 1431 | unsigned char *skb_pull(struct sk_buff *skb, unsigned int len); |
1440 | static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) | 1432 | static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) |
1441 | { | 1433 | { |
1442 | skb->len -= len; | 1434 | skb->len -= len; |
@@ -1449,7 +1441,7 @@ static inline unsigned char *skb_pull_inline(struct sk_buff *skb, unsigned int l | |||
1449 | return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); | 1441 | return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); |
1450 | } | 1442 | } |
1451 | 1443 | ||
1452 | extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); | 1444 | unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); |
1453 | 1445 | ||
1454 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) | 1446 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) |
1455 | { | 1447 | { |
@@ -1753,7 +1745,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) | |||
1753 | #define NET_SKB_PAD max(32, L1_CACHE_BYTES) | 1745 | #define NET_SKB_PAD max(32, L1_CACHE_BYTES) |
1754 | #endif | 1746 | #endif |
1755 | 1747 | ||
1756 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 1748 | int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
1757 | 1749 | ||
1758 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) | 1750 | static inline void __skb_trim(struct sk_buff *skb, unsigned int len) |
1759 | { | 1751 | { |
@@ -1765,7 +1757,7 @@ static inline void __skb_trim(struct sk_buff *skb, unsigned int len) | |||
1765 | skb_set_tail_pointer(skb, len); | 1757 | skb_set_tail_pointer(skb, len); |
1766 | } | 1758 | } |
1767 | 1759 | ||
1768 | extern void skb_trim(struct sk_buff *skb, unsigned int len); | 1760 | void skb_trim(struct sk_buff *skb, unsigned int len); |
1769 | 1761 | ||
1770 | static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) | 1762 | static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) |
1771 | { | 1763 | { |
@@ -1838,7 +1830,7 @@ static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) | |||
1838 | * the list and one reference dropped. This function does not take the | 1830 | * the list and one reference dropped. This function does not take the |
1839 | * list lock and the caller must hold the relevant locks to use it. | 1831 | * list lock and the caller must hold the relevant locks to use it. |
1840 | */ | 1832 | */ |
1841 | extern void skb_queue_purge(struct sk_buff_head *list); | 1833 | void skb_queue_purge(struct sk_buff_head *list); |
1842 | static inline void __skb_queue_purge(struct sk_buff_head *list) | 1834 | static inline void __skb_queue_purge(struct sk_buff_head *list) |
1843 | { | 1835 | { |
1844 | struct sk_buff *skb; | 1836 | struct sk_buff *skb; |
@@ -1850,11 +1842,10 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1850 | #define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER) | 1842 | #define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER) |
1851 | #define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE | 1843 | #define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE |
1852 | 1844 | ||
1853 | extern void *netdev_alloc_frag(unsigned int fragsz); | 1845 | void *netdev_alloc_frag(unsigned int fragsz); |
1854 | 1846 | ||
1855 | extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, | 1847 | struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length, |
1856 | unsigned int length, | 1848 | gfp_t gfp_mask); |
1857 | gfp_t gfp_mask); | ||
1858 | 1849 | ||
1859 | /** | 1850 | /** |
1860 | * netdev_alloc_skb - allocate an skbuff for rx on a specific device | 1851 | * netdev_alloc_skb - allocate an skbuff for rx on a specific device |
@@ -2342,60 +2333,42 @@ static inline void skb_frag_add_head(struct sk_buff *skb, struct sk_buff *frag) | |||
2342 | #define skb_walk_frags(skb, iter) \ | 2333 | #define skb_walk_frags(skb, iter) \ |
2343 | for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) | 2334 | for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) |
2344 | 2335 | ||
2345 | extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, | 2336 | struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, |
2346 | int *peeked, int *off, int *err); | 2337 | int *peeked, int *off, int *err); |
2347 | extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, | 2338 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, |
2348 | int noblock, int *err); | 2339 | int *err); |
2349 | extern unsigned int datagram_poll(struct file *file, struct socket *sock, | 2340 | unsigned int datagram_poll(struct file *file, struct socket *sock, |
2350 | struct poll_table_struct *wait); | 2341 | struct poll_table_struct *wait); |
2351 | extern int skb_copy_datagram_iovec(const struct sk_buff *from, | 2342 | int skb_copy_datagram_iovec(const struct sk_buff *from, int offset, |
2352 | int offset, struct iovec *to, | 2343 | struct iovec *to, int size); |
2353 | int size); | 2344 | int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, int hlen, |
2354 | extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, | 2345 | struct iovec *iov); |
2355 | int hlen, | 2346 | int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset, |
2356 | struct iovec *iov); | 2347 | const struct iovec *from, int from_offset, |
2357 | extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, | 2348 | int len); |
2358 | int offset, | 2349 | int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *frm, |
2359 | const struct iovec *from, | 2350 | int offset, size_t count); |
2360 | int from_offset, | 2351 | int skb_copy_datagram_const_iovec(const struct sk_buff *from, int offset, |
2361 | int len); | 2352 | const struct iovec *to, int to_offset, |
2362 | extern int zerocopy_sg_from_iovec(struct sk_buff *skb, | 2353 | int size); |
2363 | const struct iovec *frm, | 2354 | void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
2364 | int offset, | 2355 | void skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb); |
2365 | size_t count); | 2356 | int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags); |
2366 | extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, | 2357 | __wsum skb_checksum(const struct sk_buff *skb, int offset, int len, |
2367 | int offset, | 2358 | __wsum csum); |
2368 | const struct iovec *to, | 2359 | int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len); |
2369 | int to_offset, | 2360 | int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len); |
2370 | int size); | 2361 | __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to, |
2371 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 2362 | int len, __wsum csum); |
2372 | extern void skb_free_datagram_locked(struct sock *sk, | 2363 | int skb_splice_bits(struct sk_buff *skb, unsigned int offset, |
2373 | struct sk_buff *skb); | 2364 | struct pipe_inode_info *pipe, unsigned int len, |
2374 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 2365 | unsigned int flags); |
2375 | unsigned int flags); | 2366 | void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
2376 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, | 2367 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); |
2377 | int len, __wsum csum); | 2368 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); |
2378 | extern int skb_copy_bits(const struct sk_buff *skb, int offset, | 2369 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
2379 | void *to, int len); | 2370 | |
2380 | extern int skb_store_bits(struct sk_buff *skb, int offset, | 2371 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); |
2381 | const void *from, int len); | ||
2382 | extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, | ||
2383 | int offset, u8 *to, int len, | ||
2384 | __wsum csum); | ||
2385 | extern int skb_splice_bits(struct sk_buff *skb, | ||
2386 | unsigned int offset, | ||
2387 | struct pipe_inode_info *pipe, | ||
2388 | unsigned int len, | ||
2389 | unsigned int flags); | ||
2390 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | ||
2391 | extern void skb_split(struct sk_buff *skb, | ||
2392 | struct sk_buff *skb1, const u32 len); | ||
2393 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | ||
2394 | int shiftlen); | ||
2395 | extern void skb_scrub_packet(struct sk_buff *skb, bool xnet); | ||
2396 | |||
2397 | extern struct sk_buff *skb_segment(struct sk_buff *skb, | ||
2398 | netdev_features_t features); | ||
2399 | 2372 | ||
2400 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 2373 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
2401 | int len, void *buffer) | 2374 | int len, void *buffer) |
@@ -2440,7 +2413,7 @@ static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb, | |||
2440 | memcpy(skb->data + offset, from, len); | 2413 | memcpy(skb->data + offset, from, len); |
2441 | } | 2414 | } |
2442 | 2415 | ||
2443 | extern void skb_init(void); | 2416 | void skb_init(void); |
2444 | 2417 | ||
2445 | static inline ktime_t skb_get_ktime(const struct sk_buff *skb) | 2418 | static inline ktime_t skb_get_ktime(const struct sk_buff *skb) |
2446 | { | 2419 | { |
@@ -2483,12 +2456,12 @@ static inline ktime_t net_invalid_timestamp(void) | |||
2483 | return ktime_set(0, 0); | 2456 | return ktime_set(0, 0); |
2484 | } | 2457 | } |
2485 | 2458 | ||
2486 | extern void skb_timestamping_init(void); | 2459 | void skb_timestamping_init(void); |
2487 | 2460 | ||
2488 | #ifdef CONFIG_NETWORK_PHY_TIMESTAMPING | 2461 | #ifdef CONFIG_NETWORK_PHY_TIMESTAMPING |
2489 | 2462 | ||
2490 | extern void skb_clone_tx_timestamp(struct sk_buff *skb); | 2463 | void skb_clone_tx_timestamp(struct sk_buff *skb); |
2491 | extern bool skb_defer_rx_timestamp(struct sk_buff *skb); | 2464 | bool skb_defer_rx_timestamp(struct sk_buff *skb); |
2492 | 2465 | ||
2493 | #else /* CONFIG_NETWORK_PHY_TIMESTAMPING */ | 2466 | #else /* CONFIG_NETWORK_PHY_TIMESTAMPING */ |
2494 | 2467 | ||
@@ -2529,8 +2502,8 @@ void skb_complete_tx_timestamp(struct sk_buff *skb, | |||
2529 | * generates a software time stamp (otherwise), then queues the clone | 2502 | * generates a software time stamp (otherwise), then queues the clone |
2530 | * to the error queue of the socket. Errors are silently ignored. | 2503 | * to the error queue of the socket. Errors are silently ignored. |
2531 | */ | 2504 | */ |
2532 | extern void skb_tstamp_tx(struct sk_buff *orig_skb, | 2505 | void skb_tstamp_tx(struct sk_buff *orig_skb, |
2533 | struct skb_shared_hwtstamps *hwtstamps); | 2506 | struct skb_shared_hwtstamps *hwtstamps); |
2534 | 2507 | ||
2535 | static inline void sw_tx_timestamp(struct sk_buff *skb) | 2508 | static inline void sw_tx_timestamp(struct sk_buff *skb) |
2536 | { | 2509 | { |
@@ -2562,8 +2535,8 @@ static inline void skb_tx_timestamp(struct sk_buff *skb) | |||
2562 | */ | 2535 | */ |
2563 | void skb_complete_wifi_ack(struct sk_buff *skb, bool acked); | 2536 | void skb_complete_wifi_ack(struct sk_buff *skb, bool acked); |
2564 | 2537 | ||
2565 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); | 2538 | __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); |
2566 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); | 2539 | __sum16 __skb_checksum_complete(struct sk_buff *skb); |
2567 | 2540 | ||
2568 | static inline int skb_csum_unnecessary(const struct sk_buff *skb) | 2541 | static inline int skb_csum_unnecessary(const struct sk_buff *skb) |
2569 | { | 2542 | { |
@@ -2593,7 +2566,7 @@ static inline __sum16 skb_checksum_complete(struct sk_buff *skb) | |||
2593 | } | 2566 | } |
2594 | 2567 | ||
2595 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2568 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
2596 | extern void nf_conntrack_destroy(struct nf_conntrack *nfct); | 2569 | void nf_conntrack_destroy(struct nf_conntrack *nfct); |
2597 | static inline void nf_conntrack_put(struct nf_conntrack *nfct) | 2570 | static inline void nf_conntrack_put(struct nf_conntrack *nfct) |
2598 | { | 2571 | { |
2599 | if (nfct && atomic_dec_and_test(&nfct->use)) | 2572 | if (nfct && atomic_dec_and_test(&nfct->use)) |
@@ -2732,9 +2705,8 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | |||
2732 | return skb->queue_mapping != 0; | 2705 | return skb->queue_mapping != 0; |
2733 | } | 2706 | } |
2734 | 2707 | ||
2735 | extern u16 __skb_tx_hash(const struct net_device *dev, | 2708 | u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb, |
2736 | const struct sk_buff *skb, | 2709 | unsigned int num_tx_queues); |
2737 | unsigned int num_tx_queues); | ||
2738 | 2710 | ||
2739 | #ifdef CONFIG_XFRM | 2711 | #ifdef CONFIG_XFRM |
2740 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 2712 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
@@ -2788,7 +2760,7 @@ static inline bool skb_is_gso_v6(const struct sk_buff *skb) | |||
2788 | return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; | 2760 | return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; |
2789 | } | 2761 | } |
2790 | 2762 | ||
2791 | extern void __skb_warn_lro_forwarding(const struct sk_buff *skb); | 2763 | void __skb_warn_lro_forwarding(const struct sk_buff *skb); |
2792 | 2764 | ||
2793 | static inline bool skb_warn_if_lro(const struct sk_buff *skb) | 2765 | static inline bool skb_warn_if_lro(const struct sk_buff *skb) |
2794 | { | 2766 | { |