diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 13:03:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 13:03:46 -0400 |
commit | cb62ab71fe2b16e8203a0f0a2ef4eda23d761338 (patch) | |
tree | 536ba39658e47d511a489c52f7aac60cd78967e5 /net/decnet/dn_route.c | |
parent | 31ed8e6f93a27304c9e157dab0267772cd94eaad (diff) | |
parent | 74863948f925d9f3bb4e3d3a783e49e9c662d839 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller:
1) Get rid of the error prone NLA_PUT*() macros that used an embedded
goto.
2) Kill off the token-ring and MCA networking drivers, from Paul
Gortmaker.
3) Reduce high-order allocations made by datagram AF_UNIX sockets, from
Eric Dumazet.
4) Add PTP hardware clock support to IGB and IXGBE, from Richard
Cochran and Jacob Keller.
5) Allow users to query timestamping capabilities of a card via
ethtool, from Richard Cochran.
6) Add loadbalance mode to the teaming driver, from Jiri Pirko. Part
of this is that we can now have BPF filters not attached to sockets,
and the loadbalancing function is calculated using one.
7) Francois Romieu went through the network drivers removing gratuitous
uses of netdev->base_addr, perhaps some day we can remove it
completely but it's used for ISA probing still.
8) Add a BPF JIT for sparc. I know, who cares, right? :-)
9) Move networking sysctl registry away from using the compatability
mode interfaces in the sysctl code. From Eric W Biederman.
10) Pavel Emelyanov added a way to save and restore TCP socket state via
TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as
well as a way to forcefully bind a socket to a port via the
sk->sk_reuse value SK_FORCE_REUSE. There is also a
TCP_REPAIR_OPTIONS which allows to reinstante the TCP options
enabled on the connection.
11) Several enhancements from Eric Dumazet that, in particular, can
enhance splice performance on TCP sockets significantly.
a) Reset the offset of the per-socket sendmsg page when we know
we're the only use of the page in linear_to_page().
b) Add facilities such that skb->data can be backed a page rather
than SLAB kmalloc'd memory. In particular devices which were
receiving into linear RX buffers can now end up providing paged
data.
The big result is that code like splice and GRO do not have to copy
any more.
12) Allow a pure sender to more gracefully handle ACK backlogs in TCP.
What can happen at high rates is that the sender hasn't grown his
receive buffer limits at all (he's not receiving data so really
doesn't need to), but the non-data ACKs consume receive buffer
space.
sk_add_backlog() is too aggressive in dropping frames in this case,
so relax it's requirements by using the receive buffer plus the send
buffer limit as the backlog limit instead of just the former.
Also from Eric Dumazet.
13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and
Chris Elston.
14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng.
Basically, we can start fast retransmit before hiting the dupack
threshold under certain conditions.
15) New CODEL active queue management packet scheduler, from Eric
Dumazet based upon initial work by Dave Taht.
Basically, the big feature is that packets are dropped (or ECN bits
are set) based upon how long packets live in the queue, rather than
the queue length (which is what RED uses).
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits)
drivers/net/stmmac: seq_file fix memory leak
ipv6/exthdrs: strict Pad1 and PadN check
USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
USB: qmi_wwan: Make forced int 4 whitelist generic
net/ipv4: replace simple_strtoul with kstrtoul
net/ipv4/ipconfig: neaten __setup placement
net: qmi_wwan: Add Vodafone/Huawei K5005 support
net: cdc_ether: Add ZTE WWAN matches before generic Ethernet
ipv6: use skb coalescing in reassembly
ipv4: use skb coalescing in defragmentation
net: introduce skb_try_coalesce()
net:ipv6:fixed space issues relating to operators.
net:ipv6:fixed a trailing white space issue.
ipv6: disable GSO on sockets hitting dst_allfrag
tg3: use netdev_alloc_frag() API
net: napi_frags_skb() is static
ppp: avoid false drop_monitor false positives
ipv6: bool/const conversions phase2
ipx: Remove spurious NULL checking in ipx_ioctl().
...
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 80a3de4906d3..586302e557ad 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -122,7 +122,7 @@ static int dn_route_input(struct sk_buff *); | |||
122 | static void dn_run_flush(unsigned long dummy); | 122 | static void dn_run_flush(unsigned long dummy); |
123 | 123 | ||
124 | static struct dn_rt_hash_bucket *dn_rt_hash_table; | 124 | static struct dn_rt_hash_bucket *dn_rt_hash_table; |
125 | static unsigned dn_rt_hash_mask; | 125 | static unsigned int dn_rt_hash_mask; |
126 | 126 | ||
127 | static struct timer_list dn_route_timer; | 127 | static struct timer_list dn_route_timer; |
128 | static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); | 128 | static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); |
@@ -149,13 +149,13 @@ static void dn_dst_destroy(struct dst_entry *dst) | |||
149 | dst_destroy_metrics_generic(dst); | 149 | dst_destroy_metrics_generic(dst); |
150 | } | 150 | } |
151 | 151 | ||
152 | static __inline__ unsigned dn_hash(__le16 src, __le16 dst) | 152 | static __inline__ unsigned int dn_hash(__le16 src, __le16 dst) |
153 | { | 153 | { |
154 | __u16 tmp = (__u16 __force)(src ^ dst); | 154 | __u16 tmp = (__u16 __force)(src ^ dst); |
155 | tmp ^= (tmp >> 3); | 155 | tmp ^= (tmp >> 3); |
156 | tmp ^= (tmp >> 5); | 156 | tmp ^= (tmp >> 5); |
157 | tmp ^= (tmp >> 10); | 157 | tmp ^= (tmp >> 10); |
158 | return dn_rt_hash_mask & (unsigned)tmp; | 158 | return dn_rt_hash_mask & (unsigned int)tmp; |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline void dnrt_free(struct dn_route *rt) | 161 | static inline void dnrt_free(struct dn_route *rt) |
@@ -297,7 +297,7 @@ static inline int compare_keys(struct flowidn *fl1, struct flowidn *fl2) | |||
297 | (fl1->flowidn_iif ^ fl2->flowidn_iif)) == 0; | 297 | (fl1->flowidn_iif ^ fl2->flowidn_iif)) == 0; |
298 | } | 298 | } |
299 | 299 | ||
300 | static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route **rp) | 300 | static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_route **rp) |
301 | { | 301 | { |
302 | struct dn_route *rth; | 302 | struct dn_route *rth; |
303 | struct dn_route __rcu **rthp; | 303 | struct dn_route __rcu **rthp; |
@@ -748,8 +748,7 @@ static int dn_output(struct sk_buff *skb) | |||
748 | dn_to_neigh_output); | 748 | dn_to_neigh_output); |
749 | 749 | ||
750 | error: | 750 | error: |
751 | if (net_ratelimit()) | 751 | net_dbg_ratelimited("dn_output: This should not happen\n"); |
752 | printk(KERN_DEBUG "dn_output: This should not happen\n"); | ||
753 | 752 | ||
754 | kfree_skb(skb); | 753 | kfree_skb(skb); |
755 | 754 | ||
@@ -807,12 +806,10 @@ drop: | |||
807 | */ | 806 | */ |
808 | static int dn_rt_bug(struct sk_buff *skb) | 807 | static int dn_rt_bug(struct sk_buff *skb) |
809 | { | 808 | { |
810 | if (net_ratelimit()) { | 809 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
811 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | ||
812 | 810 | ||
813 | printk(KERN_DEBUG "dn_rt_bug: skb from:%04x to:%04x\n", | 811 | net_dbg_ratelimited("dn_rt_bug: skb from:%04x to:%04x\n", |
814 | le16_to_cpu(cb->src), le16_to_cpu(cb->dst)); | 812 | le16_to_cpu(cb->src), le16_to_cpu(cb->dst)); |
815 | } | ||
816 | 813 | ||
817 | kfree_skb(skb); | 814 | kfree_skb(skb); |
818 | 815 | ||
@@ -934,8 +931,8 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o | |||
934 | struct dn_route *rt = NULL; | 931 | struct dn_route *rt = NULL; |
935 | struct net_device *dev_out = NULL, *dev; | 932 | struct net_device *dev_out = NULL, *dev; |
936 | struct neighbour *neigh = NULL; | 933 | struct neighbour *neigh = NULL; |
937 | unsigned hash; | 934 | unsigned int hash; |
938 | unsigned flags = 0; | 935 | unsigned int flags = 0; |
939 | struct dn_fib_res res = { .fi = NULL, .type = RTN_UNICAST }; | 936 | struct dn_fib_res res = { .fi = NULL, .type = RTN_UNICAST }; |
940 | int err; | 937 | int err; |
941 | int free_res = 0; | 938 | int free_res = 0; |
@@ -1209,7 +1206,7 @@ e_neighbour: | |||
1209 | */ | 1206 | */ |
1210 | static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *flp, int flags) | 1207 | static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *flp, int flags) |
1211 | { | 1208 | { |
1212 | unsigned hash = dn_hash(flp->saddr, flp->daddr); | 1209 | unsigned int hash = dn_hash(flp->saddr, flp->daddr); |
1213 | struct dn_route *rt = NULL; | 1210 | struct dn_route *rt = NULL; |
1214 | 1211 | ||
1215 | if (!(flags & MSG_TRYHARD)) { | 1212 | if (!(flags & MSG_TRYHARD)) { |
@@ -1275,7 +1272,7 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1275 | struct net_device *out_dev = NULL; | 1272 | struct net_device *out_dev = NULL; |
1276 | struct dn_dev *dn_db; | 1273 | struct dn_dev *dn_db; |
1277 | struct neighbour *neigh = NULL; | 1274 | struct neighbour *neigh = NULL; |
1278 | unsigned hash; | 1275 | unsigned int hash; |
1279 | int flags = 0; | 1276 | int flags = 0; |
1280 | __le16 gateway = 0; | 1277 | __le16 gateway = 0; |
1281 | __le16 local_src = 0; | 1278 | __le16 local_src = 0; |
@@ -1327,9 +1324,7 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1327 | 1324 | ||
1328 | out_dev = DN_FIB_RES_DEV(res); | 1325 | out_dev = DN_FIB_RES_DEV(res); |
1329 | if (out_dev == NULL) { | 1326 | if (out_dev == NULL) { |
1330 | if (net_ratelimit()) | 1327 | net_crit_ratelimited("Bug in dn_route_input_slow() No output device\n"); |
1331 | printk(KERN_CRIT "Bug in dn_route_input_slow() " | ||
1332 | "No output device\n"); | ||
1333 | goto e_inval; | 1328 | goto e_inval; |
1334 | } | 1329 | } |
1335 | dev_hold(out_dev); | 1330 | dev_hold(out_dev); |
@@ -1490,7 +1485,7 @@ static int dn_route_input(struct sk_buff *skb) | |||
1490 | { | 1485 | { |
1491 | struct dn_route *rt; | 1486 | struct dn_route *rt; |
1492 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 1487 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
1493 | unsigned hash = dn_hash(cb->src, cb->dst); | 1488 | unsigned int hash = dn_hash(cb->src, cb->dst); |
1494 | 1489 | ||
1495 | if (skb_dst(skb)) | 1490 | if (skb_dst(skb)) |
1496 | return 0; | 1491 | return 0; |