projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7928833
)
ipv4: Cache net in iptunnel_xmit
author
Eric W. Biederman
<
[email protected]
>
Wed, 7 Oct 2015 21:48:41 +0000
(16:48 -0500)
committer
David S. Miller
<
[email protected]
>
Thu, 8 Oct 2015 11:26:59 +0000
(
04:26
-0700)
Store net in a variable in ip_tunnel_xmit so it does not need
to be recomputed when it is used again.
Signed-off-by: "Eric W. Biederman" <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_tunnel_core.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_tunnel_core.c
b/net/ipv4/ip_tunnel_core.c
index 8d85ecd1ced5fee9af70a9293c5fd75d3606a268..caef8e2c281dbacc70821bf4360ab1d12427c4f2 100644
(file)
--- a/
net/ipv4/ip_tunnel_core.c
+++ b/
net/ipv4/ip_tunnel_core.c
@@
-53,6
+53,7
@@
int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
__u8 tos, __u8 ttl, __be16 df, bool xnet)
{
int pkt_len = skb->len - skb_inner_network_offset(skb);
+ struct net *net = dev_net(rt->dst.dev);
struct iphdr *iph;
int err;
@@
-76,8
+77,7
@@
int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
iph->daddr = dst;
iph->saddr = src;
iph->ttl = ttl;
- __ip_select_ident(dev_net(rt->dst.dev), iph,
- skb_shinfo(skb)->gso_segs ?: 1);
+ __ip_select_ident(net, iph, skb_shinfo(skb)->gso_segs ?: 1);
err = ip_local_out(sk, skb);
if (unlikely(net_xmit_eval(err)))