summaryrefslogtreecommitdiff
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 7a37369..caaff5f 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -57,7 +57,15 @@ struct ip_options {
unsigned char __data[0];
};
-#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
+struct ip_options_rcu {
+ struct rcu_head rcu;
+ struct ip_options opt;
+};
+
+struct ip_options_data {
+ struct ip_options_rcu opt;
+ char data[40];
+};
struct inet_request_sock {
struct request_sock req;
@@ -78,7 +86,7 @@ struct inet_request_sock {
acked : 1,
no_srccheck: 1;
kmemcheck_bitfield_end(flags);
- struct ip_options *opt;
+ struct ip_options_rcu *opt;
};
static 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)
struct inet_cork {
unsigned int flags;
- unsigned int fragsize;
+ __be32 addr;
struct ip_options *opt;
+ unsigned int fragsize;
struct dst_entry *dst;
int length; /* Total length of all frames */
- __be32 addr;
- struct flowi fl;
struct page *page;
u32 off;
u8 tx_flags;
};
+struct inet_cork_full {
+ struct inet_cork base;
+ struct flowi fl;
+};
+
struct ip_mc_socklist;
struct ipv6_pinfo;
struct rtable;
@@ -140,7 +152,7 @@ struct inet_sock {
__be16 inet_sport;
__u16 inet_id;
- struct ip_options *opt;
+ struct ip_options_rcu __rcu *inet_opt;
__u8 tos;
__u8 min_ttl;
__u8 mc_ttl;
@@ -156,7 +168,7 @@ struct inet_sock {
int mc_index;
__be32 mc_addr;
struct ip_mc_socklist __rcu *mc_list;
- struct inet_cork cork;
+ struct inet_cork_full cork;
};
#define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */