diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 21:09:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 21:09:01 -0400 |
commit | 1e30c1b3866968ff584ae3cd3909ef93957bb215 (patch) | |
tree | 0ee70a264f7bed4047f68ed3aeb68d6c4cf4e136 /include | |
parent | a1857ebe752d77d96c89d964500a9528df6d320e (diff) | |
parent | c7109986db3c945f50ceed884a30e0fd8af3b89b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates and fixes from David Miller:
1) Reinstate the no-ref optimization for input route lookups in ipv4 to
fix some routing cache removal perf regressions.
2) Make TCP socket pre-demux work on ipv6 side too, from Eric Dumazet.
3) Get RX hash value from correct place in be2net driver, from
Sarveshwar Bandi.
4) Validation of FIB cached routes missing critical check, from Eric
Dumazet.
5) EEH support in mlx4 driver, from Kleber Sacilotto de Souza.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (23 commits)
ipv6: Early TCP socket demux
ipv4: Fix input route performance regression.
pch_gbe: vlan skb len fix
pch_gbe: add extra clean tx
pch_gbe: fix transmit watchdog timeout
ixgbe: fix panic while dumping packets on Tx hang with IOMMU
be2net: Fix to parse RSS hash from Receive completions correctly.
net/mlx4_en: Limit the RFS filter IDs to be < RPS_NO_FILTER
hyperv: Add error handling to rndis_filter_device_add()
hyperv: Add a check for ring_size value
ipv4: rt_cache_valid must check expired routes
net/pch_gpe: Cannot disable ethernet autonegation
qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
netiucv: cleanup attribute usage
net: wiznet add missing HAS_IOMEM dependency
be2net: Missing byteswap in be_get_fw_log_level causes oops on PowerPC
mlx4: Add support for EEH error recovery
cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
wanmain: comparing array with NULL
caif: fix NULL pointer check
...
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet6_hashtables.h | 13 | ||||
-rw-r--r-- | include/net/protocol.h | 2 | ||||
-rw-r--r-- | include/net/route.h | 19 |
3 files changed, 26 insertions, 8 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 00cbb4384c79..9e34c877a770 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -96,14 +96,15 @@ static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo, | |||
96 | const __be16 sport, | 96 | const __be16 sport, |
97 | const __be16 dport) | 97 | const __be16 dport) |
98 | { | 98 | { |
99 | struct sock *sk; | 99 | struct sock *sk = skb_steal_sock(skb); |
100 | 100 | ||
101 | if (unlikely(sk = skb_steal_sock(skb))) | 101 | if (sk) |
102 | return sk; | 102 | return sk; |
103 | else return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, | 103 | |
104 | &ipv6_hdr(skb)->saddr, sport, | 104 | return __inet6_lookup(dev_net(skb_dst(skb)->dev), hashinfo, |
105 | &ipv6_hdr(skb)->daddr, ntohs(dport), | 105 | &ipv6_hdr(skb)->saddr, sport, |
106 | inet6_iif(skb)); | 106 | &ipv6_hdr(skb)->daddr, ntohs(dport), |
107 | inet6_iif(skb)); | ||
107 | } | 108 | } |
108 | 109 | ||
109 | extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, | 110 | extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, |
diff --git a/include/net/protocol.h b/include/net/protocol.h index 057f2d315567..929528c73fe8 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -52,6 +52,8 @@ struct net_protocol { | |||
52 | 52 | ||
53 | #if IS_ENABLED(CONFIG_IPV6) | 53 | #if IS_ENABLED(CONFIG_IPV6) |
54 | struct inet6_protocol { | 54 | struct inet6_protocol { |
55 | void (*early_demux)(struct sk_buff *skb); | ||
56 | |||
55 | int (*handler)(struct sk_buff *skb); | 57 | int (*handler)(struct sk_buff *skb); |
56 | 58 | ||
57 | void (*err_handler)(struct sk_buff *skb, | 59 | void (*err_handler)(struct sk_buff *skb, |
diff --git a/include/net/route.h b/include/net/route.h index c29ef2733f2d..8c52bc6f1c90 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/inet_sock.h> | 30 | #include <net/inet_sock.h> |
31 | #include <linux/in_route.h> | 31 | #include <linux/in_route.h> |
32 | #include <linux/rtnetlink.h> | 32 | #include <linux/rtnetlink.h> |
33 | #include <linux/rcupdate.h> | ||
33 | #include <linux/route.h> | 34 | #include <linux/route.h> |
34 | #include <linux/ip.h> | 35 | #include <linux/ip.h> |
35 | #include <linux/cache.h> | 36 | #include <linux/cache.h> |
@@ -157,8 +158,22 @@ static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 | |||
157 | return ip_route_output_key(net, fl4); | 158 | return ip_route_output_key(net, fl4); |
158 | } | 159 | } |
159 | 160 | ||
160 | extern int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, | 161 | extern int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src, |
161 | u8 tos, struct net_device *devin); | 162 | u8 tos, struct net_device *devin); |
163 | |||
164 | static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, | ||
165 | u8 tos, struct net_device *devin) | ||
166 | { | ||
167 | int err; | ||
168 | |||
169 | rcu_read_lock(); | ||
170 | err = ip_route_input_noref(skb, dst, src, tos, devin); | ||
171 | if (!err) | ||
172 | skb_dst_force(skb); | ||
173 | rcu_read_unlock(); | ||
174 | |||
175 | return err; | ||
176 | } | ||
162 | 177 | ||
163 | extern void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, | 178 | extern void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, |
164 | int oif, u32 mark, u8 protocol, int flow_flags); | 179 | int oif, u32 mark, u8 protocol, int flow_flags); |