diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-01 23:09:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-01 23:09:08 -0500 |
commit | 5983fe2b29df5885880d7fa3b91aca306c7564ef (patch) | |
tree | c9d968a776b7d1f8dc446d2857f6cefddec6edb0 /include | |
parent | 5611cc4572e889b62a7b4c72a413536bf6a9c416 (diff) | |
parent | 3ced1be5490f5c415d51a1e5918beeb9239d546b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits)
netfilter: Remove ADVANCED dependency from NF_CONNTRACK_NETBIOS_NS
ipv4: flush route cache after change accept_local
sch_red: fix red_change
Revert "udp: remove redundant variable"
bridge: master device stuck in no-carrier state forever when in user-stp mode
ipv4: Perform peer validation on cached route lookup.
net/core: fix rollback handler in register_netdevice_notifier
sch_red: fix red_calc_qavg_from_idle_time
bonding: only use primary address for ARP
ipv4: fix lockdep splat in rt_cache_seq_show
sch_teql: fix lockdep splat
net: fec: Select the FEC driver by default for i.MX SoCs
isdn: avoid copying too long drvid
isdn: make sure strings are null terminated
netlabel: Fix build problems when IPv6 is not enabled
sctp: better integer overflow check in sctp_auth_create_key()
sctp: integer overflow in sctp_auth_create_key()
ipv6: Set mcast_hops to IPV6_DEFAULT_MCASTHOPS when -1 was given.
net: Fix corruption in /proc/*/net/dev_mcast
mac80211: fix race between the AGG SM and the Tx data path
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/linux/pkt_sched.h | 6 | ||||
-rw-r--r-- | include/net/dst.h | 7 | ||||
-rw-r--r-- | include/net/dst_ops.h | 2 | ||||
-rw-r--r-- | include/net/inet_sock.h | 2 | ||||
-rw-r--r-- | include/net/inetpeer.h | 1 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_ecache.h | 19 | ||||
-rw-r--r-- | include/net/netns/conntrack.h | 2 | ||||
-rw-r--r-- | include/net/red.h | 15 | ||||
-rw-r--r-- | include/net/route.h | 4 |
10 files changed, 30 insertions, 30 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index cbeb5867cff7..a82ad4dd306a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2536,6 +2536,8 @@ extern void net_disable_timestamp(void); | |||
2536 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); | 2536 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); |
2537 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); | 2537 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); |
2538 | extern void dev_seq_stop(struct seq_file *seq, void *v); | 2538 | extern void dev_seq_stop(struct seq_file *seq, void *v); |
2539 | extern int dev_seq_open_ops(struct inode *inode, struct file *file, | ||
2540 | const struct seq_operations *ops); | ||
2539 | #endif | 2541 | #endif |
2540 | 2542 | ||
2541 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 2543 | extern int netdev_class_create_file(struct class_attribute *class_attr); |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index c5336705921f..7281d5acf2f9 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -30,7 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | struct tc_stats { | 32 | struct tc_stats { |
33 | __u64 bytes; /* NUmber of enqueues bytes */ | 33 | __u64 bytes; /* Number of enqueued bytes */ |
34 | __u32 packets; /* Number of enqueued packets */ | 34 | __u32 packets; /* Number of enqueued packets */ |
35 | __u32 drops; /* Packets dropped because of lack of resources */ | 35 | __u32 drops; /* Packets dropped because of lack of resources */ |
36 | __u32 overlimits; /* Number of throttle events when this | 36 | __u32 overlimits; /* Number of throttle events when this |
@@ -297,7 +297,7 @@ struct tc_htb_glob { | |||
297 | __u32 debug; /* debug flags */ | 297 | __u32 debug; /* debug flags */ |
298 | 298 | ||
299 | /* stats */ | 299 | /* stats */ |
300 | __u32 direct_pkts; /* count of non shapped packets */ | 300 | __u32 direct_pkts; /* count of non shaped packets */ |
301 | }; | 301 | }; |
302 | enum { | 302 | enum { |
303 | TCA_HTB_UNSPEC, | 303 | TCA_HTB_UNSPEC, |
@@ -503,7 +503,7 @@ enum { | |||
503 | }; | 503 | }; |
504 | #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) | 504 | #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) |
505 | 505 | ||
506 | /* State transition probablities for 4 state model */ | 506 | /* State transition probabilities for 4 state model */ |
507 | struct tc_netem_gimodel { | 507 | struct tc_netem_gimodel { |
508 | __u32 p13; | 508 | __u32 p13; |
509 | __u32 p31; | 509 | __u32 p31; |
diff --git a/include/net/dst.h b/include/net/dst.h index 4fb6c4381791..6faec1a60216 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -205,12 +205,7 @@ dst_feature(const struct dst_entry *dst, u32 feature) | |||
205 | 205 | ||
206 | static inline u32 dst_mtu(const struct dst_entry *dst) | 206 | static inline u32 dst_mtu(const struct dst_entry *dst) |
207 | { | 207 | { |
208 | u32 mtu = dst_metric_raw(dst, RTAX_MTU); | 208 | return dst->ops->mtu(dst); |
209 | |||
210 | if (!mtu) | ||
211 | mtu = dst->ops->default_mtu(dst); | ||
212 | |||
213 | return mtu; | ||
214 | } | 209 | } |
215 | 210 | ||
216 | /* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */ | 211 | /* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */ |
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 9adb99845a56..e1c2ee0eef47 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h | |||
@@ -17,7 +17,7 @@ struct dst_ops { | |||
17 | int (*gc)(struct dst_ops *ops); | 17 | int (*gc)(struct dst_ops *ops); |
18 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | 18 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); |
19 | unsigned int (*default_advmss)(const struct dst_entry *); | 19 | unsigned int (*default_advmss)(const struct dst_entry *); |
20 | unsigned int (*default_mtu)(const struct dst_entry *); | 20 | unsigned int (*mtu)(const struct dst_entry *); |
21 | u32 * (*cow_metrics)(struct dst_entry *, unsigned long); | 21 | u32 * (*cow_metrics)(struct dst_entry *, unsigned long); |
22 | void (*destroy)(struct dst_entry *); | 22 | void (*destroy)(struct dst_entry *); |
23 | void (*ifdown)(struct dst_entry *, | 23 | void (*ifdown)(struct dst_entry *, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index b897d6e6d0a5..f941964a9931 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -31,6 +31,7 @@ | |||
31 | /** struct ip_options - IP Options | 31 | /** struct ip_options - IP Options |
32 | * | 32 | * |
33 | * @faddr - Saved first hop address | 33 | * @faddr - Saved first hop address |
34 | * @nexthop - Saved nexthop address in LSRR and SSRR | ||
34 | * @is_data - Options in __data, rather than skb | 35 | * @is_data - Options in __data, rather than skb |
35 | * @is_strictroute - Strict source route | 36 | * @is_strictroute - Strict source route |
36 | * @srr_is_hit - Packet destination addr was our one | 37 | * @srr_is_hit - Packet destination addr was our one |
@@ -41,6 +42,7 @@ | |||
41 | */ | 42 | */ |
42 | struct ip_options { | 43 | struct ip_options { |
43 | __be32 faddr; | 44 | __be32 faddr; |
45 | __be32 nexthop; | ||
44 | unsigned char optlen; | 46 | unsigned char optlen; |
45 | unsigned char srr; | 47 | unsigned char srr; |
46 | unsigned char rr; | 48 | unsigned char rr; |
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 78c83e62218f..e9ff3fc5e688 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -35,6 +35,7 @@ struct inet_peer { | |||
35 | 35 | ||
36 | u32 metrics[RTAX_MAX]; | 36 | u32 metrics[RTAX_MAX]; |
37 | u32 rate_tokens; /* rate limiting for ICMP */ | 37 | u32 rate_tokens; /* rate limiting for ICMP */ |
38 | int redirect_genid; | ||
38 | unsigned long rate_last; | 39 | unsigned long rate_last; |
39 | unsigned long pmtu_expires; | 40 | unsigned long pmtu_expires; |
40 | u32 pmtu_orig; | 41 | u32 pmtu_orig; |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index 4283508b3e18..a88fb6939387 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -67,18 +67,18 @@ struct nf_ct_event_notifier { | |||
67 | int (*fcn)(unsigned int events, struct nf_ct_event *item); | 67 | int (*fcn)(unsigned int events, struct nf_ct_event *item); |
68 | }; | 68 | }; |
69 | 69 | ||
70 | extern struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; | 70 | extern int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *nb); |
71 | extern int nf_conntrack_register_notifier(struct nf_ct_event_notifier *nb); | 71 | extern void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb); |
72 | extern void nf_conntrack_unregister_notifier(struct nf_ct_event_notifier *nb); | ||
73 | 72 | ||
74 | extern void nf_ct_deliver_cached_events(struct nf_conn *ct); | 73 | extern void nf_ct_deliver_cached_events(struct nf_conn *ct); |
75 | 74 | ||
76 | static inline void | 75 | static inline void |
77 | nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) | 76 | nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) |
78 | { | 77 | { |
78 | struct net *net = nf_ct_net(ct); | ||
79 | struct nf_conntrack_ecache *e; | 79 | struct nf_conntrack_ecache *e; |
80 | 80 | ||
81 | if (nf_conntrack_event_cb == NULL) | 81 | if (net->ct.nf_conntrack_event_cb == NULL) |
82 | return; | 82 | return; |
83 | 83 | ||
84 | e = nf_ct_ecache_find(ct); | 84 | e = nf_ct_ecache_find(ct); |
@@ -95,11 +95,12 @@ nf_conntrack_eventmask_report(unsigned int eventmask, | |||
95 | int report) | 95 | int report) |
96 | { | 96 | { |
97 | int ret = 0; | 97 | int ret = 0; |
98 | struct net *net = nf_ct_net(ct); | ||
98 | struct nf_ct_event_notifier *notify; | 99 | struct nf_ct_event_notifier *notify; |
99 | struct nf_conntrack_ecache *e; | 100 | struct nf_conntrack_ecache *e; |
100 | 101 | ||
101 | rcu_read_lock(); | 102 | rcu_read_lock(); |
102 | notify = rcu_dereference(nf_conntrack_event_cb); | 103 | notify = rcu_dereference(net->ct.nf_conntrack_event_cb); |
103 | if (notify == NULL) | 104 | if (notify == NULL) |
104 | goto out_unlock; | 105 | goto out_unlock; |
105 | 106 | ||
@@ -164,9 +165,8 @@ struct nf_exp_event_notifier { | |||
164 | int (*fcn)(unsigned int events, struct nf_exp_event *item); | 165 | int (*fcn)(unsigned int events, struct nf_exp_event *item); |
165 | }; | 166 | }; |
166 | 167 | ||
167 | extern struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | 168 | extern int nf_ct_expect_register_notifier(struct net *net, struct nf_exp_event_notifier *nb); |
168 | extern int nf_ct_expect_register_notifier(struct nf_exp_event_notifier *nb); | 169 | extern void nf_ct_expect_unregister_notifier(struct net *net, struct nf_exp_event_notifier *nb); |
169 | extern void nf_ct_expect_unregister_notifier(struct nf_exp_event_notifier *nb); | ||
170 | 170 | ||
171 | static inline void | 171 | static inline void |
172 | nf_ct_expect_event_report(enum ip_conntrack_expect_events event, | 172 | nf_ct_expect_event_report(enum ip_conntrack_expect_events event, |
@@ -174,11 +174,12 @@ nf_ct_expect_event_report(enum ip_conntrack_expect_events event, | |||
174 | u32 pid, | 174 | u32 pid, |
175 | int report) | 175 | int report) |
176 | { | 176 | { |
177 | struct net *net = nf_ct_exp_net(exp); | ||
177 | struct nf_exp_event_notifier *notify; | 178 | struct nf_exp_event_notifier *notify; |
178 | struct nf_conntrack_ecache *e; | 179 | struct nf_conntrack_ecache *e; |
179 | 180 | ||
180 | rcu_read_lock(); | 181 | rcu_read_lock(); |
181 | notify = rcu_dereference(nf_expect_event_cb); | 182 | notify = rcu_dereference(net->ct.nf_expect_event_cb); |
182 | if (notify == NULL) | 183 | if (notify == NULL) |
183 | goto out_unlock; | 184 | goto out_unlock; |
184 | 185 | ||
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index 0249399e51a7..7a911eca0f18 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -18,6 +18,8 @@ struct netns_ct { | |||
18 | struct hlist_nulls_head unconfirmed; | 18 | struct hlist_nulls_head unconfirmed; |
19 | struct hlist_nulls_head dying; | 19 | struct hlist_nulls_head dying; |
20 | struct ip_conntrack_stat __percpu *stat; | 20 | struct ip_conntrack_stat __percpu *stat; |
21 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; | ||
22 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | ||
21 | int sysctl_events; | 23 | int sysctl_events; |
22 | unsigned int sysctl_events_retry_timeout; | 24 | unsigned int sysctl_events_retry_timeout; |
23 | int sysctl_acct; | 25 | int sysctl_acct; |
diff --git a/include/net/red.h b/include/net/red.h index 3319f16b3beb..b72a3b833936 100644 --- a/include/net/red.h +++ b/include/net/red.h | |||
@@ -116,7 +116,7 @@ struct red_parms { | |||
116 | u32 qR; /* Cached random number */ | 116 | u32 qR; /* Cached random number */ |
117 | 117 | ||
118 | unsigned long qavg; /* Average queue length: A scaled */ | 118 | unsigned long qavg; /* Average queue length: A scaled */ |
119 | psched_time_t qidlestart; /* Start of current idle period */ | 119 | ktime_t qidlestart; /* Start of current idle period */ |
120 | }; | 120 | }; |
121 | 121 | ||
122 | static inline u32 red_rmask(u8 Plog) | 122 | static inline u32 red_rmask(u8 Plog) |
@@ -148,17 +148,17 @@ static inline void red_set_parms(struct red_parms *p, | |||
148 | 148 | ||
149 | static inline int red_is_idling(struct red_parms *p) | 149 | static inline int red_is_idling(struct red_parms *p) |
150 | { | 150 | { |
151 | return p->qidlestart != PSCHED_PASTPERFECT; | 151 | return p->qidlestart.tv64 != 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void red_start_of_idle_period(struct red_parms *p) | 154 | static inline void red_start_of_idle_period(struct red_parms *p) |
155 | { | 155 | { |
156 | p->qidlestart = psched_get_time(); | 156 | p->qidlestart = ktime_get(); |
157 | } | 157 | } |
158 | 158 | ||
159 | static inline void red_end_of_idle_period(struct red_parms *p) | 159 | static inline void red_end_of_idle_period(struct red_parms *p) |
160 | { | 160 | { |
161 | p->qidlestart = PSCHED_PASTPERFECT; | 161 | p->qidlestart.tv64 = 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline void red_restart(struct red_parms *p) | 164 | static inline void red_restart(struct red_parms *p) |
@@ -170,13 +170,10 @@ static inline void red_restart(struct red_parms *p) | |||
170 | 170 | ||
171 | static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p) | 171 | static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p) |
172 | { | 172 | { |
173 | psched_time_t now; | 173 | s64 delta = ktime_us_delta(ktime_get(), p->qidlestart); |
174 | long us_idle; | 174 | long us_idle = min_t(s64, delta, p->Scell_max); |
175 | int shift; | 175 | int shift; |
176 | 176 | ||
177 | now = psched_get_time(); | ||
178 | us_idle = psched_tdiff_bounded(now, p->qidlestart, p->Scell_max); | ||
179 | |||
180 | /* | 177 | /* |
181 | * The problem: ideally, average length queue recalcultion should | 178 | * The problem: ideally, average length queue recalcultion should |
182 | * be done over constant clock intervals. This is too expensive, so | 179 | * be done over constant clock intervals. This is too expensive, so |
diff --git a/include/net/route.h b/include/net/route.h index db7b3432f07c..91855d185b53 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -71,12 +71,12 @@ struct rtable { | |||
71 | struct fib_info *fi; /* for client ref to shared metrics */ | 71 | struct fib_info *fi; /* for client ref to shared metrics */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static inline bool rt_is_input_route(struct rtable *rt) | 74 | static inline bool rt_is_input_route(const struct rtable *rt) |
75 | { | 75 | { |
76 | return rt->rt_route_iif != 0; | 76 | return rt->rt_route_iif != 0; |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline bool rt_is_output_route(struct rtable *rt) | 79 | static inline bool rt_is_output_route(const struct rtable *rt) |
80 | { | 80 | { |
81 | return rt->rt_route_iif == 0; | 81 | return rt->rt_route_iif == 0; |
82 | } | 82 | } |