aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 7a37369f8ea3..caaff5f5f39f 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -57,7 +57,15 @@ struct ip_options {
57 unsigned char __data[0]; 57 unsigned char __data[0];
58}; 58};
59 59
60#define optlength(opt) (sizeof(struct ip_options) + opt->optlen) 60struct ip_options_rcu {
61 struct rcu_head rcu;
62 struct ip_options opt;
63};
64
65struct ip_options_data {
66 struct ip_options_rcu opt;
67 char data[40];
68};
61 69
62struct inet_request_sock { 70struct inet_request_sock {
63 struct request_sock req; 71 struct request_sock req;
@@ -78,7 +86,7 @@ struct inet_request_sock {
78 acked : 1, 86 acked : 1,
79 no_srccheck: 1; 87 no_srccheck: 1;
80 kmemcheck_bitfield_end(flags); 88 kmemcheck_bitfield_end(flags);
81 struct ip_options *opt; 89 struct ip_options_rcu *opt;
82}; 90};
83 91
84static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) 92static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
@@ -88,17 +96,21 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
88 96
89struct inet_cork { 97struct inet_cork {
90 unsigned int flags; 98 unsigned int flags;
91 unsigned int fragsize; 99 __be32 addr;
92 struct ip_options *opt; 100 struct ip_options *opt;
101 unsigned int fragsize;
93 struct dst_entry *dst; 102 struct dst_entry *dst;
94 int length; /* Total length of all frames */ 103 int length; /* Total length of all frames */
95 __be32 addr;
96 struct flowi fl;
97 struct page *page; 104 struct page *page;
98 u32 off; 105 u32 off;
99 u8 tx_flags; 106 u8 tx_flags;
100}; 107};
101 108
109struct inet_cork_full {
110 struct inet_cork base;
111 struct flowi fl;
112};
113
102struct ip_mc_socklist; 114struct ip_mc_socklist;
103struct ipv6_pinfo; 115struct ipv6_pinfo;
104struct rtable; 116struct rtable;
@@ -140,7 +152,7 @@ struct inet_sock {
140 __be16 inet_sport; 152 __be16 inet_sport;
141 __u16 inet_id; 153 __u16 inet_id;
142 154
143 struct ip_options *opt; 155 struct ip_options_rcu __rcu *inet_opt;
144 __u8 tos; 156 __u8 tos;
145 __u8 min_ttl; 157 __u8 min_ttl;
146 __u8 mc_ttl; 158 __u8 mc_ttl;
@@ -156,7 +168,7 @@ struct inet_sock {
156 int mc_index; 168 int mc_index;
157 __be32 mc_addr; 169 __be32 mc_addr;
158 struct ip_mc_socklist __rcu *mc_list; 170 struct ip_mc_socklist __rcu *mc_list;
159 struct inet_cork cork; 171 struct inet_cork_full cork;
160}; 172};
161 173
162#define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */ 174#define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */