diff options
Diffstat (limited to 'include/net')
32 files changed, 161 insertions, 58 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6b75a6971346..d2df55b0c213 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -119,7 +119,7 @@ do { \ | |||
119 | * @P9_TREAD: request to transfer data from a file or directory | 119 | * @P9_TREAD: request to transfer data from a file or directory |
120 | * @P9_RREAD: response with data requested | 120 | * @P9_RREAD: response with data requested |
121 | * @P9_TWRITE: reuqest to transfer data to a file | 121 | * @P9_TWRITE: reuqest to transfer data to a file |
122 | * @P9_RWRITE: response with out much data was transfered to file | 122 | * @P9_RWRITE: response with out much data was transferred to file |
123 | * @P9_TCLUNK: forget about a handle to an entity within the file system | 123 | * @P9_TCLUNK: forget about a handle to an entity within the file system |
124 | * @P9_RCLUNK: response when server has forgotten about the handle | 124 | * @P9_RCLUNK: response when server has forgotten about the handle |
125 | * @P9_TREMOVE: request to remove an entity from the hierarchy | 125 | * @P9_TREMOVE: request to remove an entity from the hierarchy |
@@ -139,8 +139,6 @@ do { \ | |||
139 | */ | 139 | */ |
140 | 140 | ||
141 | enum p9_msg_t { | 141 | enum p9_msg_t { |
142 | P9_TSYNCFS = 0, | ||
143 | P9_RSYNCFS, | ||
144 | P9_TLERROR = 6, | 142 | P9_TLERROR = 6, |
145 | P9_RLERROR, | 143 | P9_RLERROR, |
146 | P9_TSTATFS = 8, | 144 | P9_TSTATFS = 8, |
@@ -294,7 +292,7 @@ enum p9_perm_t { | |||
294 | * | 292 | * |
295 | * QID types are a subset of permissions - they are primarily | 293 | * QID types are a subset of permissions - they are primarily |
296 | * used to differentiate semantics for a file system entity via | 294 | * used to differentiate semantics for a file system entity via |
297 | * a jump-table. Their value is also the most signifigant 16 bits | 295 | * a jump-table. Their value is also the most significant 16 bits |
298 | * of the permission_t | 296 | * of the permission_t |
299 | * | 297 | * |
300 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 298 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
@@ -366,8 +364,8 @@ struct p9_qid { | |||
366 | /** | 364 | /** |
367 | * struct p9_stat - file system metadata information | 365 | * struct p9_stat - file system metadata information |
368 | * @size: length prefix for this stat structure instance | 366 | * @size: length prefix for this stat structure instance |
369 | * @type: the type of the server (equivilent to a major number) | 367 | * @type: the type of the server (equivalent to a major number) |
370 | * @dev: the sub-type of the server (equivilent to a minor number) | 368 | * @dev: the sub-type of the server (equivalent to a minor number) |
371 | * @qid: unique id from the server of type &p9_qid | 369 | * @qid: unique id from the server of type &p9_qid |
372 | * @mode: Plan 9 format permissions of type &p9_perm_t | 370 | * @mode: Plan 9 format permissions of type &p9_perm_t |
373 | * @atime: Last access/read time | 371 | * @atime: Last access/read time |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 0a30977e3c1f..051a99f79769 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -101,7 +101,7 @@ enum p9_req_status_t { | |||
101 | * Transport use an array to track outstanding requests | 101 | * Transport use an array to track outstanding requests |
102 | * instead of a list. While this may incurr overhead during initial | 102 | * instead of a list. While this may incurr overhead during initial |
103 | * allocation or expansion, it makes request lookup much easier as the | 103 | * allocation or expansion, it makes request lookup much easier as the |
104 | * tag id is a index into an array. (We use tag+1 so that we can accomodate | 104 | * tag id is a index into an array. (We use tag+1 so that we can accommodate |
105 | * the -1 tag for the T_VERSION request). | 105 | * the -1 tag for the T_VERSION request). |
106 | * This also has the nice effect of only having to allocate wait_queues | 106 | * This also has the nice effect of only having to allocate wait_queues |
107 | * once, instead of constantly allocating and freeing them. Its possible | 107 | * once, instead of constantly allocating and freeing them. Its possible |
@@ -218,8 +218,8 @@ void p9_client_disconnect(struct p9_client *clnt); | |||
218 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
220 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, |
222 | int clone); | 222 | char **wnames, int clone); |
223 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
225 | char *extension); | 225 | char *extension); |
@@ -230,7 +230,6 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | |||
230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); |
233 | int p9_client_sync_fs(struct p9_fid *fid); | ||
234 | int p9_client_remove(struct p9_fid *fid); | 233 | int p9_client_remove(struct p9_fid *fid); |
235 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
236 | u64 offset, u32 count); | 235 | u64 offset, u32 count); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 82868f18c573..8f08c736c4c3 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ |
32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 |
33 | /* Send pay load seperately to transport layer along with PDU.*/ | 33 | /* Send pay load separately to transport layer along with PDU.*/ |
34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 |
35 | 35 | ||
36 | /** | 36 | /** |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ec6acf2f1c0b..2c0d309c7381 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -84,6 +84,8 @@ enum { | |||
84 | HCI_SERVICE_CACHE, | 84 | HCI_SERVICE_CACHE, |
85 | HCI_LINK_KEYS, | 85 | HCI_LINK_KEYS, |
86 | HCI_DEBUG_KEYS, | 86 | HCI_DEBUG_KEYS, |
87 | |||
88 | HCI_RESET, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | /* HCI ioctl defines */ | 91 | /* HCI ioctl defines */ |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index f688478bfb84..f33d36341132 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
@@ -69,7 +69,7 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
69 | * cfcnfg_add_adapt_layer to specify PHY for the link. | 69 | * cfcnfg_add_adapt_layer to specify PHY for the link. |
70 | * @pref: The phy (link layer) preference. | 70 | * @pref: The phy (link layer) preference. |
71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. | 71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. |
72 | * @stx: Specify if Start Of Frame eXtention is used. | 72 | * @stx: Specify if Start Of Frame extension is used. |
73 | */ | 73 | */ |
74 | 74 | ||
75 | void | 75 | void |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 60f7876b6da8..b2b9d28cb4ab 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -486,7 +486,8 @@ struct rate_info { | |||
486 | * @plink_state: mesh peer link state | 486 | * @plink_state: mesh peer link state |
487 | * @signal: signal strength of last received packet in dBm | 487 | * @signal: signal strength of last received packet in dBm |
488 | * @signal_avg: signal strength average in dBm | 488 | * @signal_avg: signal strength average in dBm |
489 | * @txrate: current unicast bitrate to this station | 489 | * @txrate: current unicast bitrate from this station |
490 | * @rxrate: current unicast bitrate to this station | ||
490 | * @rx_packets: packets received from this station | 491 | * @rx_packets: packets received from this station |
491 | * @tx_packets: packets transmitted to this station | 492 | * @tx_packets: packets transmitted to this station |
492 | * @tx_retries: cumulative retry counts | 493 | * @tx_retries: cumulative retry counts |
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..75b95df4afe7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -345,7 +345,7 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
345 | 345 | ||
346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | 346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
347 | { | 347 | { |
348 | struct dst_entry *child = skb_dst(skb)->child; | 348 | struct dst_entry *child = dst_clone(skb_dst(skb)->child); |
349 | 349 | ||
350 | skb_dst_drop(skb); | 350 | skb_dst_drop(skb); |
351 | return child; | 351 | return child; |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index fa157712e982..a79b6cfb02a8 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -11,7 +11,7 @@ struct gnet_dump { | |||
11 | struct sk_buff * skb; | 11 | struct sk_buff * skb; |
12 | struct nlattr * tail; | 12 | struct nlattr * tail; |
13 | 13 | ||
14 | /* Backward compatability */ | 14 | /* Backward compatibility */ |
15 | int compat_tc_stats; | 15 | int compat_tc_stats; |
16 | int compat_xstats; | 16 | int compat_xstats; |
17 | void * xstats; | 17 | void * xstats; |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 04977eefb0ee..fccc2180c61b 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -286,5 +286,21 @@ static inline void ipv6_ib_mc_map(const struct in6_addr *addr, | |||
286 | buf[9] = broadcast[9]; | 286 | buf[9] = broadcast[9]; |
287 | memcpy(buf + 10, addr->s6_addr + 6, 10); | 287 | memcpy(buf + 10, addr->s6_addr + 6, 10); |
288 | } | 288 | } |
289 | |||
290 | static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr, | ||
291 | const unsigned char *broadcast, char *buf) | ||
292 | { | ||
293 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) { | ||
294 | memcpy(buf, broadcast, 4); | ||
295 | } else { | ||
296 | /* v4mapped? */ | ||
297 | if ((addr->s6_addr32[0] | addr->s6_addr32[1] | | ||
298 | (addr->s6_addr32[2] ^ htonl(0x0000ffff))) != 0) | ||
299 | return -EINVAL; | ||
300 | memcpy(buf, &addr->s6_addr32[3], 4); | ||
301 | } | ||
302 | return 0; | ||
303 | } | ||
304 | |||
289 | #endif | 305 | #endif |
290 | #endif | 306 | #endif |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 88bdd010d65d..2fa8d1341a0a 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) | |||
38 | return outer; | 38 | return outer; |
39 | } | 39 | } |
40 | 40 | ||
41 | #define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) | 41 | static inline void INET_ECN_xmit(struct sock *sk) |
42 | #define INET_ECN_dontxmit(sk) \ | 42 | { |
43 | do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) | 43 | inet_sk(sk)->tos |= INET_ECN_ECT_0; |
44 | if (inet6_sk(sk) != NULL) | ||
45 | inet6_sk(sk)->tclass |= INET_ECN_ECT_0; | ||
46 | } | ||
47 | |||
48 | static inline void INET_ECN_dontxmit(struct sock *sk) | ||
49 | { | ||
50 | inet_sk(sk)->tos &= ~INET_ECN_MASK; | ||
51 | if (inet6_sk(sk) != NULL) | ||
52 | inet6_sk(sk)->tclass &= ~INET_ECN_MASK; | ||
53 | } | ||
44 | 54 | ||
45 | #define IP6_ECN_flow_init(label) do { \ | 55 | #define IP6_ECN_flow_init(label) do { \ |
46 | (label) &= ~htonl(INET_ECN_MASK << 20); \ | 56 | (label) &= ~htonl(INET_ECN_MASK << 20); \ |
diff --git a/include/net/ip.h b/include/net/ip.h index a4f631108c54..7c416583b710 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -339,6 +339,14 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch | |||
339 | buf[16] = addr & 0x0f; | 339 | buf[16] = addr & 0x0f; |
340 | } | 340 | } |
341 | 341 | ||
342 | static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf) | ||
343 | { | ||
344 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) | ||
345 | memcpy(buf, broadcast, 4); | ||
346 | else | ||
347 | memcpy(buf, &naddr, sizeof(naddr)); | ||
348 | } | ||
349 | |||
342 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 350 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
343 | #include <linux/ipv6.h> | 351 | #include <linux/ipv6.h> |
344 | #endif | 352 | #endif |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 642a80bb42cf..c850e5fb967c 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) | |||
70 | extern void ip6_route_input(struct sk_buff *skb); | 70 | extern void ip6_route_input(struct sk_buff *skb); |
71 | 71 | ||
72 | extern struct dst_entry * ip6_route_output(struct net *net, | 72 | extern struct dst_entry * ip6_route_output(struct net *net, |
73 | struct sock *sk, | 73 | const struct sock *sk, |
74 | struct flowi6 *fl6); | 74 | struct flowi6 *fl6); |
75 | 75 | ||
76 | extern int ip6_route_init(void); | 76 | extern int ip6_route_init(void); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index a1a858035913..e5d66ec88cf6 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -51,7 +51,6 @@ struct fib_nh { | |||
51 | struct fib_info *nh_parent; | 51 | struct fib_info *nh_parent; |
52 | unsigned nh_flags; | 52 | unsigned nh_flags; |
53 | unsigned char nh_scope; | 53 | unsigned char nh_scope; |
54 | unsigned char nh_cfg_scope; | ||
55 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 54 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
56 | int nh_weight; | 55 | int nh_weight; |
57 | int nh_power; | 56 | int nh_power; |
@@ -62,6 +61,7 @@ struct fib_nh { | |||
62 | int nh_oif; | 61 | int nh_oif; |
63 | __be32 nh_gw; | 62 | __be32 nh_gw; |
64 | __be32 nh_saddr; | 63 | __be32 nh_saddr; |
64 | int nh_saddr_genid; | ||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -74,9 +74,10 @@ struct fib_info { | |||
74 | struct net *fib_net; | 74 | struct net *fib_net; |
75 | int fib_treeref; | 75 | int fib_treeref; |
76 | atomic_t fib_clntref; | 76 | atomic_t fib_clntref; |
77 | int fib_dead; | ||
78 | unsigned fib_flags; | 77 | unsigned fib_flags; |
79 | int fib_protocol; | 78 | unsigned char fib_dead; |
79 | unsigned char fib_protocol; | ||
80 | unsigned char fib_scope; | ||
80 | __be32 fib_prefsrc; | 81 | __be32 fib_prefsrc; |
81 | u32 fib_priority; | 82 | u32 fib_priority; |
82 | u32 *fib_metrics; | 83 | u32 *fib_metrics; |
@@ -141,12 +142,19 @@ struct fib_result_nl { | |||
141 | 142 | ||
142 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 143 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ |
143 | 144 | ||
144 | #define FIB_RES_SADDR(res) (FIB_RES_NH(res).nh_saddr) | 145 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); |
146 | |||
147 | #define FIB_RES_SADDR(net, res) \ | ||
148 | ((FIB_RES_NH(res).nh_saddr_genid == \ | ||
149 | atomic_read(&(net)->ipv4.dev_addr_genid)) ? \ | ||
150 | FIB_RES_NH(res).nh_saddr : \ | ||
151 | fib_info_update_nh_saddr((net), &FIB_RES_NH(res))) | ||
145 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) | 152 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) |
146 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) | 153 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) |
147 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) | 154 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) |
148 | 155 | ||
149 | #define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : FIB_RES_SADDR(res)) | 156 | #define FIB_RES_PREFSRC(net, res) ((res).fi->fib_prefsrc ? : \ |
157 | FIB_RES_SADDR(net, res)) | ||
150 | 158 | ||
151 | struct fib_table { | 159 | struct fib_table { |
152 | struct hlist_node tb_hlist; | 160 | struct hlist_node tb_hlist; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 272f59336b73..86aefed6140b 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb) | |||
52 | */ | 52 | */ |
53 | if (likely(skb->dev && skb->dev->nd_net)) | 53 | if (likely(skb->dev && skb->dev->nd_net)) |
54 | return dev_net(skb->dev); | 54 | return dev_net(skb->dev); |
55 | if (skb_dst(skb)->dev) | 55 | if (skb_dst(skb) && skb_dst(skb)->dev) |
56 | return dev_net(skb_dst(skb)->dev); | 56 | return dev_net(skb_dst(skb)->dev); |
57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", | 57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", |
58 | __func__, __LINE__); | 58 | __func__, __LINE__); |
@@ -92,7 +92,7 @@ static inline struct net *skb_sknet(const struct sk_buff *skb) | |||
92 | } | 92 | } |
93 | /* | 93 | /* |
94 | * This one needed for single_open_net since net is stored directly in | 94 | * This one needed for single_open_net since net is stored directly in |
95 | * private not as a struct i.e. seq_file_net cant be used. | 95 | * private not as a struct i.e. seq_file_net can't be used. |
96 | */ | 96 | */ |
97 | static inline struct net *seq_file_single_net(struct seq_file *seq) | 97 | static inline struct net *seq_file_single_net(struct seq_file *seq) |
98 | { | 98 | { |
@@ -791,6 +791,7 @@ struct ip_vs_app { | |||
791 | /* IPVS in network namespace */ | 791 | /* IPVS in network namespace */ |
792 | struct netns_ipvs { | 792 | struct netns_ipvs { |
793 | int gen; /* Generation */ | 793 | int gen; /* Generation */ |
794 | int enable; /* enable like nf_hooks do */ | ||
794 | /* | 795 | /* |
795 | * Hash table: for real service lookups | 796 | * Hash table: for real service lookups |
796 | */ | 797 | */ |
@@ -801,8 +802,6 @@ struct netns_ipvs { | |||
801 | struct list_head rs_table[IP_VS_RTAB_SIZE]; | 802 | struct list_head rs_table[IP_VS_RTAB_SIZE]; |
802 | /* ip_vs_app */ | 803 | /* ip_vs_app */ |
803 | struct list_head app_list; | 804 | struct list_head app_list; |
804 | struct mutex app_mutex; | ||
805 | struct lock_class_key app_key; /* mutex debuging */ | ||
806 | 805 | ||
807 | /* ip_vs_proto */ | 806 | /* ip_vs_proto */ |
808 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ | 807 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ |
@@ -1091,6 +1090,22 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) | |||
1091 | atomic_inc(&ctl_cp->n_control); | 1090 | atomic_inc(&ctl_cp->n_control); |
1092 | } | 1091 | } |
1093 | 1092 | ||
1093 | /* | ||
1094 | * IPVS netns init & cleanup functions | ||
1095 | */ | ||
1096 | extern int __ip_vs_estimator_init(struct net *net); | ||
1097 | extern int __ip_vs_control_init(struct net *net); | ||
1098 | extern int __ip_vs_protocol_init(struct net *net); | ||
1099 | extern int __ip_vs_app_init(struct net *net); | ||
1100 | extern int __ip_vs_conn_init(struct net *net); | ||
1101 | extern int __ip_vs_sync_init(struct net *net); | ||
1102 | extern void __ip_vs_conn_cleanup(struct net *net); | ||
1103 | extern void __ip_vs_app_cleanup(struct net *net); | ||
1104 | extern void __ip_vs_protocol_cleanup(struct net *net); | ||
1105 | extern void __ip_vs_control_cleanup(struct net *net); | ||
1106 | extern void __ip_vs_estimator_cleanup(struct net *net); | ||
1107 | extern void __ip_vs_sync_cleanup(struct net *net); | ||
1108 | extern void __ip_vs_service_cleanup(struct net *net); | ||
1094 | 1109 | ||
1095 | /* | 1110 | /* |
1096 | * IPVS application functions | 1111 | * IPVS application functions |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index 17fcd964f9d9..fb4b76d5d7f1 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -204,7 +204,7 @@ struct irlap_cb { | |||
204 | 204 | ||
205 | notify_t notify; /* Callbacks to IrLMP */ | 205 | notify_t notify; /* Callbacks to IrLMP */ |
206 | 206 | ||
207 | int mtt_required; /* Minumum turnaround time required */ | 207 | int mtt_required; /* Minimum turnaround time required */ |
208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h index 2942ad6ab932..eef53ebe3d76 100644 --- a/include/net/irda/wrapper.h +++ b/include/net/irda/wrapper.h | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ | 43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ |
44 | 44 | ||
45 | /* States for receving a frame in async mode */ | 45 | /* States for receiving a frame in async mode */ |
46 | enum { | 46 | enum { |
47 | OUTSIDE_FRAME, | 47 | OUTSIDE_FRAME, |
48 | BEGIN_FRAME, | 48 | BEGIN_FRAME, |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 205a3360156e..1121baa9f695 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -173,7 +173,7 @@ struct iucv_handler { | |||
173 | /* | 173 | /* |
174 | * The message_pending function is called after an icuv interrupt | 174 | * The message_pending function is called after an icuv interrupt |
175 | * type 0x06 or type 0x07 has been received. A new message is | 175 | * type 0x06 or type 0x07 has been received. A new message is |
176 | * availabe and can be received with iucv_message_receive. | 176 | * available and can be received with iucv_message_receive. |
177 | */ | 177 | */ |
178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); | 178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); |
179 | /* | 179 | /* |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 3afdb21cc31d..5d5a6a4732ef 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -91,7 +91,7 @@ | |||
91 | * -------------------- | 91 | * -------------------- |
92 | * The implementation goals were as follow : | 92 | * The implementation goals were as follow : |
93 | * o Obvious : you should not need a PhD to understand what's happening, | 93 | * o Obvious : you should not need a PhD to understand what's happening, |
94 | * the benefit is easier maintainance. | 94 | * the benefit is easier maintenance. |
95 | * o Flexible : it should accommodate a wide variety of driver | 95 | * o Flexible : it should accommodate a wide variety of driver |
96 | * implementations and be as flexible as the old API. | 96 | * implementations and be as flexible as the old API. |
97 | * o Lean : it should be efficient memory wise to minimise the impact | 97 | * o Lean : it should be efficient memory wise to minimise the impact |
@@ -129,7 +129,7 @@ | |||
129 | * | 129 | * |
130 | * Functions prototype uses union iwreq_data | 130 | * Functions prototype uses union iwreq_data |
131 | * ----------------------------------------- | 131 | * ----------------------------------------- |
132 | * Some would have prefered functions defined this way : | 132 | * Some would have preferred functions defined this way : |
133 | * static int mydriver_ioctl_setrate(struct net_device *dev, | 133 | * static int mydriver_ioctl_setrate(struct net_device *dev, |
134 | * long rate, int auto) | 134 | * long rate, int auto) |
135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and | 135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and |
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index 75b8e2968c9b..f57e7d46a453 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -199,7 +199,7 @@ struct llc_pdu_sn { | |||
199 | u8 ssap; | 199 | u8 ssap; |
200 | u8 ctrl_1; | 200 | u8 ctrl_1; |
201 | u8 ctrl_2; | 201 | u8 ctrl_2; |
202 | }; | 202 | } __packed; |
203 | 203 | ||
204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) | 204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) |
205 | { | 205 | { |
@@ -211,7 +211,7 @@ struct llc_pdu_un { | |||
211 | u8 dsap; | 211 | u8 dsap; |
212 | u8 ssap; | 212 | u8 ssap; |
213 | u8 ctrl_1; | 213 | u8 ctrl_1; |
214 | }; | 214 | } __packed; |
215 | 215 | ||
216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) | 216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) |
217 | { | 217 | { |
@@ -359,7 +359,7 @@ struct llc_xid_info { | |||
359 | u8 fmt_id; /* always 0x81 for LLC */ | 359 | u8 fmt_id; /* always 0x81 for LLC */ |
360 | u8 type; /* different if NULL/non-NULL LSAP */ | 360 | u8 type; /* different if NULL/non-NULL LSAP */ |
361 | u8 rw; /* sender receive window */ | 361 | u8 rw; /* sender receive window */ |
362 | }; | 362 | } __packed; |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID | 365 | * llc_pdu_init_as_xid_cmd - sets bytes 3, 4 & 5 of LLC header as XID |
@@ -415,7 +415,7 @@ struct llc_frmr_info { | |||
415 | u8 curr_ssv; /* current send state variable val */ | 415 | u8 curr_ssv; /* current send state variable val */ |
416 | u8 curr_rsv; /* current receive state variable */ | 416 | u8 curr_rsv; /* current receive state variable */ |
417 | u8 ind_bits; /* indicator bits set with macro */ | 417 | u8 ind_bits; /* indicator bits set with macro */ |
418 | }; | 418 | } __packed; |
419 | 419 | ||
420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); | 420 | extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type); |
421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); | 421 | extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8650e7bf2ed0..025d4cc7bbf8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1160,7 +1160,7 @@ enum ieee80211_hw_flags { | |||
1160 | * @napi_weight: weight used for NAPI polling. You must specify an | 1160 | * @napi_weight: weight used for NAPI polling. You must specify an |
1161 | * appropriate value here if a napi_poll operation is provided | 1161 | * appropriate value here if a napi_poll operation is provided |
1162 | * by your driver. | 1162 | * by your driver. |
1163 | 1163 | * | |
1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of | 1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of |
1165 | * sub-frames) to be used for A-MPDU block ack receiver | 1165 | * sub-frames) to be used for A-MPDU block ack receiver |
1166 | * aggregation. | 1166 | * aggregation. |
@@ -1294,7 +1294,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key | 1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key |
1295 | * handler. | 1295 | * handler. |
1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. | 1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. |
1297 | * This happens everytime the iv16 wraps around (every 65536 packets). The | 1297 | * This happens every time the iv16 wraps around (every 65536 packets). The |
1298 | * set_key() call will happen only once for each key (unless the AP did | 1298 | * set_key() call will happen only once for each key (unless the AP did |
1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is | 1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is |
1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this | 1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this |
@@ -1753,8 +1753,19 @@ enum ieee80211_ampdu_mlme_action { | |||
1753 | * that TX/RX_STOP can pass NULL for this parameter. | 1753 | * that TX/RX_STOP can pass NULL for this parameter. |
1754 | * The @buf_size parameter is only valid when the action is set to | 1754 | * The @buf_size parameter is only valid when the action is set to |
1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder | 1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder |
1756 | * buffer size (number of subframes) for this session -- aggregates | 1756 | * buffer size (number of subframes) for this session -- the driver |
1757 | * containing more subframes than this may not be transmitted to the peer. | 1757 | * may neither send aggregates containing more subframes than this |
1758 | * nor send aggregates in a way that lost frames would exceed the | ||
1759 | * buffer size. If just limiting the aggregate size, this would be | ||
1760 | * possible with a buf_size of 8: | ||
1761 | * - TX: 1.....7 | ||
1762 | * - RX: 2....7 (lost frame #1) | ||
1763 | * - TX: 8..1... | ||
1764 | * which is invalid since #1 was now re-transmitted well past the | ||
1765 | * buffer size of 8. Correct ways to retransmit #1 would be: | ||
1766 | * - TX: 1 or 18 or 81 | ||
1767 | * Even "189" would be wrong since 1 could be lost again. | ||
1768 | * | ||
1758 | * Returns a negative error code on failure. | 1769 | * Returns a negative error code on failure. |
1759 | * The callback can sleep. | 1770 | * The callback can sleep. |
1760 | * | 1771 | * |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index e2e2ef57eca2..542195d9469e 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -55,6 +55,7 @@ struct netns_ipv4 { | |||
55 | int current_rt_cache_rebuild_count; | 55 | int current_rt_cache_rebuild_count; |
56 | 56 | ||
57 | atomic_t rt_genid; | 57 | atomic_t rt_genid; |
58 | atomic_t dev_addr_genid; | ||
58 | 59 | ||
59 | #ifdef CONFIG_IP_MROUTE | 60 | #ifdef CONFIG_IP_MROUTE |
60 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 61 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index d9549af6929a..65afc4966204 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -32,7 +32,7 @@ static inline void *qdisc_priv(struct Qdisc *q) | |||
32 | 32 | ||
33 | The result: [34]86 is not good choice for QoS router :-( | 33 | The result: [34]86 is not good choice for QoS router :-( |
34 | 34 | ||
35 | The things are not so bad, because we may use artifical | 35 | The things are not so bad, because we may use artificial |
36 | clock evaluated by integration of network data flow | 36 | clock evaluated by integration of network data flow |
37 | in the most critical places. | 37 | in the most critical places. |
38 | */ | 38 | */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 5ba9f02731eb..555dd198aab7 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -14,6 +14,12 @@ | |||
14 | 14 | ||
15 | #define ROSE_MIN_LEN 3 | 15 | #define ROSE_MIN_LEN 3 |
16 | 16 | ||
17 | #define ROSE_CALL_REQ_ADDR_LEN_OFF 3 | ||
18 | #define ROSE_CALL_REQ_ADDR_LEN_VAL 0xAA /* each address is 10 digits */ | ||
19 | #define ROSE_CALL_REQ_DEST_ADDR_OFF 4 | ||
20 | #define ROSE_CALL_REQ_SRC_ADDR_OFF 9 | ||
21 | #define ROSE_CALL_REQ_FACILITIES_OFF 14 | ||
22 | |||
17 | #define ROSE_GFI 0x10 | 23 | #define ROSE_GFI 0x10 |
18 | #define ROSE_Q_BIT 0x80 | 24 | #define ROSE_Q_BIT 0x80 |
19 | #define ROSE_D_BIT 0x40 | 25 | #define ROSE_D_BIT 0x40 |
@@ -214,7 +220,7 @@ extern void rose_requeue_frames(struct sock *); | |||
214 | extern int rose_validate_nr(struct sock *, unsigned short); | 220 | extern int rose_validate_nr(struct sock *, unsigned short); |
215 | extern void rose_write_internal(struct sock *, int); | 221 | extern void rose_write_internal(struct sock *, int); |
216 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); | 222 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); |
217 | extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); | 223 | extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *); |
218 | extern void rose_disconnect(struct sock *, int, int, int); | 224 | extern void rose_disconnect(struct sock *, int, int, int); |
219 | 225 | ||
220 | /* rose_timer.c */ | 226 | /* rose_timer.c */ |
diff --git a/include/net/route.h b/include/net/route.h index 30d6cae3841a..8fce0621cad1 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -64,6 +64,7 @@ struct rtable { | |||
64 | 64 | ||
65 | __be32 rt_dst; /* Path destination */ | 65 | __be32 rt_dst; /* Path destination */ |
66 | __be32 rt_src; /* Path source */ | 66 | __be32 rt_src; /* Path source */ |
67 | int rt_route_iif; | ||
67 | int rt_iif; | 68 | int rt_iif; |
68 | int rt_oif; | 69 | int rt_oif; |
69 | __u32 rt_mark; | 70 | __u32 rt_mark; |
@@ -80,12 +81,12 @@ struct rtable { | |||
80 | 81 | ||
81 | static inline bool rt_is_input_route(struct rtable *rt) | 82 | static inline bool rt_is_input_route(struct rtable *rt) |
82 | { | 83 | { |
83 | return rt->rt_iif != 0; | 84 | return rt->rt_route_iif != 0; |
84 | } | 85 | } |
85 | 86 | ||
86 | static inline bool rt_is_output_route(struct rtable *rt) | 87 | static inline bool rt_is_output_route(struct rtable *rt) |
87 | { | 88 | { |
88 | return rt->rt_iif == 0; | 89 | return rt->rt_route_iif == 0; |
89 | } | 90 | } |
90 | 91 | ||
91 | struct ip_rt_acct { | 92 | struct ip_rt_acct { |
@@ -207,6 +208,7 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | |||
207 | 208 | ||
208 | struct in_ifaddr; | 209 | struct in_ifaddr; |
209 | extern void fib_add_ifaddr(struct in_ifaddr *); | 210 | extern void fib_add_ifaddr(struct in_ifaddr *); |
211 | extern void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *); | ||
210 | 212 | ||
211 | static inline void ip_rt_put(struct rtable * rt) | 213 | static inline void ip_rt_put(struct rtable * rt) |
212 | { | 214 | { |
@@ -269,8 +271,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt, | |||
269 | struct flowi4 fl4 = { | 271 | struct flowi4 fl4 = { |
270 | .flowi4_oif = rt->rt_oif, | 272 | .flowi4_oif = rt->rt_oif, |
271 | .flowi4_mark = rt->rt_mark, | 273 | .flowi4_mark = rt->rt_mark, |
272 | .daddr = rt->rt_key_dst, | 274 | .daddr = rt->rt_dst, |
273 | .saddr = rt->rt_key_src, | 275 | .saddr = rt->rt_src, |
274 | .flowi4_tos = rt->rt_tos, | 276 | .flowi4_tos = rt->rt_tos, |
275 | .flowi4_proto = protocol, | 277 | .flowi4_proto = protocol, |
276 | .fl4_sport = sport, | 278 | .fl4_sport = sport, |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a9505b6a18e3..b931f021d7ab 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -25,6 +25,7 @@ struct qdisc_rate_table { | |||
25 | enum qdisc_state_t { | 25 | enum qdisc_state_t { |
26 | __QDISC_STATE_SCHED, | 26 | __QDISC_STATE_SCHED, |
27 | __QDISC_STATE_DEACTIVATED, | 27 | __QDISC_STATE_DEACTIVATED, |
28 | __QDISC_STATE_THROTTLED, | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | /* | 31 | /* |
@@ -32,7 +33,6 @@ enum qdisc_state_t { | |||
32 | */ | 33 | */ |
33 | enum qdisc___state_t { | 34 | enum qdisc___state_t { |
34 | __QDISC___STATE_RUNNING = 1, | 35 | __QDISC___STATE_RUNNING = 1, |
35 | __QDISC___STATE_THROTTLED = 2, | ||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct qdisc_size_table { | 38 | struct qdisc_size_table { |
@@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) | |||
106 | 106 | ||
107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) | 107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) |
108 | { | 108 | { |
109 | return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false; | 109 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; |
110 | } | 110 | } |
111 | 111 | ||
112 | static inline void qdisc_throttled(struct Qdisc *qdisc) | 112 | static inline void qdisc_throttled(struct Qdisc *qdisc) |
113 | { | 113 | { |
114 | qdisc->__state |= __QDISC___STATE_THROTTLED; | 114 | set_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) | 117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) |
118 | { | 118 | { |
119 | qdisc->__state &= ~__QDISC___STATE_THROTTLED; | 119 | clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
120 | } | 120 | } |
121 | 121 | ||
122 | struct Qdisc_class_ops { | 122 | struct Qdisc_class_ops { |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185ca8fd1..0f6e60a9c308 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -422,7 +422,7 @@ struct sctp_cookie { | |||
422 | __u32 adaptation_ind; | 422 | __u32 adaptation_ind; |
423 | 423 | ||
424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; | 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; |
425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; | 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; |
426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; | 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; |
427 | 427 | ||
428 | /* This is a shim for my peer's INIT packet, followed by | 428 | /* This is a shim for my peer's INIT packet, followed by |
diff --git a/include/net/snmp.h b/include/net/snmp.h index 762e2abce889..27461d6dd46f 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -150,7 +150,7 @@ struct linux_xfrm_mib { | |||
150 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ | 150 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ |
151 | do { \ | 151 | do { \ |
152 | __typeof__(*mib[0]) *ptr = \ | 152 | __typeof__(*mib[0]) *ptr = \ |
153 | __this_cpu_ptr((mib)[!in_softirq()]); \ | 153 | __this_cpu_ptr((mib)[0]); \ |
154 | ptr->mibs[basefield##PKTS]++; \ | 154 | ptr->mibs[basefield##PKTS]++; \ |
155 | ptr->mibs[basefield##OCTETS] += addend;\ | 155 | ptr->mibs[basefield##OCTETS] += addend;\ |
156 | } while (0) | 156 | } while (0) |
@@ -202,7 +202,7 @@ struct linux_xfrm_mib { | |||
202 | #define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \ | 202 | #define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \ |
203 | do { \ | 203 | do { \ |
204 | __typeof__(*mib[0]) *ptr; \ | 204 | __typeof__(*mib[0]) *ptr; \ |
205 | ptr = __this_cpu_ptr((mib)[!in_softirq()]); \ | 205 | ptr = __this_cpu_ptr((mib)[0]); \ |
206 | u64_stats_update_begin(&ptr->syncp); \ | 206 | u64_stats_update_begin(&ptr->syncp); \ |
207 | ptr->mibs[basefield##PKTS]++; \ | 207 | ptr->mibs[basefield##PKTS]++; \ |
208 | ptr->mibs[basefield##OCTETS] += addend; \ | 208 | ptr->mibs[basefield##OCTETS] += addend; \ |
diff --git a/include/net/sock.h b/include/net/sock.h index da0534d3401c..01810a3f19df 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1749,7 +1749,7 @@ void sock_net_set(struct sock *sk, struct net *net) | |||
1749 | 1749 | ||
1750 | /* | 1750 | /* |
1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. | 1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. |
1752 | * They should not hold a referrence to a namespace in order to allow | 1752 | * They should not hold a reference to a namespace in order to allow |
1753 | * to stop it. | 1753 | * to stop it. |
1754 | * Sockets after sk_change_net should be released using sk_release_kernel | 1754 | * Sockets after sk_change_net should be released using sk_release_kernel |
1755 | */ | 1755 | */ |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index eeb077dd735f..a8122dc56410 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -16,7 +16,7 @@ extern struct proto tcpv6_prot; | |||
16 | 16 | ||
17 | struct flowi6; | 17 | struct flowi6; |
18 | 18 | ||
19 | /* extention headers */ | 19 | /* extension headers */ |
20 | extern int ipv6_exthdrs_init(void); | 20 | extern int ipv6_exthdrs_init(void); |
21 | extern void ipv6_exthdrs_exit(void); | 21 | extern void ipv6_exthdrs_exit(void); |
22 | extern int ipv6_frag_init(void); | 22 | extern int ipv6_frag_init(void); |
diff --git a/include/net/wimax.h b/include/net/wimax.h index 3461aa1df1e0..c799ba7b708b 100644 --- a/include/net/wimax.h +++ b/include/net/wimax.h | |||
@@ -286,7 +286,7 @@ struct wimax_dev; | |||
286 | * does not disconnect the device from the bus and return 0. | 286 | * does not disconnect the device from the bus and return 0. |
287 | * If that fails, it should resort to some sort of cold or bus | 287 | * If that fails, it should resort to some sort of cold or bus |
288 | * reset (even if it implies a bus disconnection and device | 288 | * reset (even if it implies a bus disconnection and device |
289 | * dissapearance). In that case, -ENODEV should be returned to | 289 | * disappearance). In that case, -ENODEV should be returned to |
290 | * indicate the device is gone. | 290 | * indicate the device is gone. |
291 | * This operation has to be synchronous, and return only when the | 291 | * This operation has to be synchronous, and return only when the |
292 | * reset is complete. In case of having had to resort to bus/cold | 292 | * reset is complete. In case of having had to resort to bus/cold |
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 85926231c07a..d86fffd3c03c 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h | |||
@@ -28,7 +28,7 @@ struct wpan_phy { | |||
28 | struct mutex pib_lock; | 28 | struct mutex pib_lock; |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * This is a PIB acording to 802.15.4-2006. | 31 | * This is a PIB according to 802.15.4-2006. |
32 | * We do not provide timing-related variables, as they | 32 | * We do not provide timing-related variables, as they |
33 | * aren't used outside of driver | 33 | * aren't used outside of driver |
34 | */ | 34 | */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 42a8c32a10e2..20afeaa39395 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -324,6 +324,7 @@ struct xfrm_state_afinfo { | |||
324 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); | 324 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); |
325 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); | 325 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); |
326 | int (*output)(struct sk_buff *skb); | 326 | int (*output)(struct sk_buff *skb); |
327 | int (*output_finish)(struct sk_buff *skb); | ||
327 | int (*extract_input)(struct xfrm_state *x, | 328 | int (*extract_input)(struct xfrm_state *x, |
328 | struct sk_buff *skb); | 329 | struct sk_buff *skb); |
329 | int (*extract_output)(struct xfrm_state *x, | 330 | int (*extract_output)(struct xfrm_state *x, |
@@ -1430,6 +1431,7 @@ extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); | |||
1430 | extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq); | 1431 | extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq); |
1431 | extern int xfrm_init_replay(struct xfrm_state *x); | 1432 | extern int xfrm_init_replay(struct xfrm_state *x); |
1432 | extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | 1433 | extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); |
1434 | extern int __xfrm_init_state(struct xfrm_state *x, bool init_replay); | ||
1433 | extern int xfrm_init_state(struct xfrm_state *x); | 1435 | extern int xfrm_init_state(struct xfrm_state *x); |
1434 | extern int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); | 1436 | extern int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); |
1435 | extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, | 1437 | extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, |
@@ -1453,6 +1455,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi) | |||
1453 | extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1455 | extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1454 | extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1456 | extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1455 | extern int xfrm4_output(struct sk_buff *skb); | 1457 | extern int xfrm4_output(struct sk_buff *skb); |
1458 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
1456 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); | 1459 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); |
1457 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); | 1460 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); |
1458 | extern int xfrm6_extract_header(struct sk_buff *skb); | 1461 | extern int xfrm6_extract_header(struct sk_buff *skb); |
@@ -1469,6 +1472,7 @@ extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, xfrm_address_t *saddr); | |||
1469 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1472 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1470 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1473 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1471 | extern int xfrm6_output(struct sk_buff *skb); | 1474 | extern int xfrm6_output(struct sk_buff *skb); |
1475 | extern int xfrm6_output_finish(struct sk_buff *skb); | ||
1472 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | 1476 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, |
1473 | u8 **prevhdr); | 1477 | u8 **prevhdr); |
1474 | 1478 | ||
@@ -1600,6 +1604,28 @@ static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay | |||
1600 | } | 1604 | } |
1601 | 1605 | ||
1602 | #ifdef CONFIG_XFRM_MIGRATE | 1606 | #ifdef CONFIG_XFRM_MIGRATE |
1607 | static inline int xfrm_replay_clone(struct xfrm_state *x, | ||
1608 | struct xfrm_state *orig) | ||
1609 | { | ||
1610 | x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), | ||
1611 | GFP_KERNEL); | ||
1612 | if (!x->replay_esn) | ||
1613 | return -ENOMEM; | ||
1614 | |||
1615 | x->replay_esn->bmp_len = orig->replay_esn->bmp_len; | ||
1616 | x->replay_esn->replay_window = orig->replay_esn->replay_window; | ||
1617 | |||
1618 | x->preplay_esn = kmemdup(x->replay_esn, | ||
1619 | xfrm_replay_state_esn_len(x->replay_esn), | ||
1620 | GFP_KERNEL); | ||
1621 | if (!x->preplay_esn) { | ||
1622 | kfree(x->replay_esn); | ||
1623 | return -ENOMEM; | ||
1624 | } | ||
1625 | |||
1626 | return 0; | ||
1627 | } | ||
1628 | |||
1603 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1629 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) |
1604 | { | 1630 | { |
1605 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); | 1631 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); |