From: David S. Miller Date: Mon, 4 Oct 2010 18:56:38 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: upstream/snapshot3+hdmi~12689^2~261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21a180cda012e1f93e362dd4a9b0bfd3d8c92940;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 Conflicts: net/ipv4/Kconfig net/ipv4/tcp_timer.c --- 21a180cda012e1f93e362dd4a9b0bfd3d8c92940 diff --cc net/8021q/vlan_core.c index 0eb486d,0eb96f7..b6d55a9 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@@ -24,10 -24,13 +24,13 @@@ int __vlan_hwaccel_rx(struct sk_buff *s if (vlan_dev) skb->dev = vlan_dev; - else if (vlan_id) - goto drop; + else if (vlan_id) { + if (!(skb->dev->flags & IFF_PROMISC)) + goto drop; + skb->pkt_type = PACKET_OTHERHOST; + } - return (polling ? netif_receive_skb(skb) : netif_rx(skb)); + return polling ? netif_receive_skb(skb) : netif_rx(skb); drop: dev_kfree_skb_any(skb); @@@ -101,16 -105,16 +104,19 @@@ vlan_gro_common(struct napi_struct *nap if (vlan_dev) skb->dev = vlan_dev; - else if (vlan_id) - goto drop; + else if (vlan_id) { + if (!(skb->dev->flags & IFF_PROMISC)) + goto drop; + skb->pkt_type = PACKET_OTHERHOST; + } for (p = napi->gro_list; p; p = p->next) { - NAPI_GRO_CB(p)->same_flow = - p->dev == skb->dev && !compare_ether_header( - skb_mac_header(p), skb_gro_mac_header(skb)); + unsigned long diffs; + + diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; + diffs |= compare_ether_header(skb_mac_header(p), + skb_gro_mac_header(skb)); + NAPI_GRO_CB(p)->same_flow = !diffs; NAPI_GRO_CB(p)->flush = 0; } diff --cc net/ipv4/Kconfig index 5462e2d,7cd7760..e848e6c --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@@ -215,15 -215,9 +215,15 @@@ config NET_IPI be inserted in and removed from the running kernel whenever you want). Most people won't need this and can say N. +config NET_IPGRE_DEMUX + tristate "IP: GRE demultiplexer" + help + This is helper module to demultiplex GRE packets on GRE version field criteria. + Required by ip_gre and pptp modules. + config NET_IPGRE tristate "IP: GRE tunnels over IP" - depends on NET_IPGRE_DEMUX - depends on IPV6 || IPV6=n ++ depends on (IPV6 || IPV6=n) && NET_IPGRE_DEMUX help Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the diff --cc net/ipv4/tcp_timer.c index baea4a1,74c54b3..f3c8c6c --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@@ -139,9 -140,11 +140,11 @@@ static void tcp_mtu_probing(struct inet */ static bool retransmits_timed_out(struct sock *sk, unsigned int boundary, - unsigned int timeout) ++ unsigned int timeout, + bool syn_set) { - unsigned int timeout, linear_backoff_thresh; - unsigned int start_ts; + unsigned int linear_backoff_thresh, start_ts; + unsigned int rto_base = syn_set ? TCP_TIMEOUT_INIT : TCP_RTO_MIN; if (!inet_csk(sk)->icsk_retransmits) return false; @@@ -151,15 -154,14 +154,15 @@@ else start_ts = tcp_sk(sk)->retrans_stamp; - linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base); - - if (boundary <= linear_backoff_thresh) - timeout = ((2 << boundary) - 1) * rto_base; - else - timeout = ((2 << linear_backoff_thresh) - 1) * rto_base + - (boundary - linear_backoff_thresh) * TCP_RTO_MAX; + if (likely(timeout == 0)) { - linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN); ++ linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base); + if (boundary <= linear_backoff_thresh) - timeout = ((2 << boundary) - 1) * TCP_RTO_MIN; ++ timeout = ((2 << boundary) - 1) * rto_base; + else - timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN + ++ timeout = ((2 << linear_backoff_thresh) - 1) * rto_base + + (boundary - linear_backoff_thresh) * TCP_RTO_MAX; + } return (tcp_time_stamp - start_ts) >= timeout; } @@@ -174,8 -176,9 +177,9 @@@ static int tcp_write_timeout(struct soc if (icsk->icsk_retransmits) dst_negative_advice(sk); retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; + syn_set = 1; } else { -- if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0)) { ++ if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) { /* Black hole detection */ tcp_mtu_probing(icsk, sk); @@@ -188,16 -191,14 +192,15 @@@ retry_until = tcp_orphan_retries(sk, alive); do_reset = alive || -- !retransmits_timed_out(sk, retry_until, 0); ++ !retransmits_timed_out(sk, retry_until, 0, 0); if (tcp_out_of_resources(sk, do_reset)) return 1; } } - if (retransmits_timed_out(sk, retry_until, syn_set)) { + if (retransmits_timed_out(sk, retry_until, - (1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV) ? 0 : - icsk->icsk_user_timeout)) { ++ syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) { /* Has it gone just too far? */ tcp_write_err(sk); return 1; @@@ -439,7 -440,7 +442,7 @@@ out_reset_timer icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX); } inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, TCP_RTO_MAX); -- if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0)) ++ if (retransmits_timed_out(sk, sysctl_tcp_retries1 + 1, 0, 0)) __sk_dst_reset(sk); out:;