Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Mon, 4 Oct 2010 18:56:38 +0000 (11:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Oct 2010 18:56:38 +0000 (11:56 -0700)
Conflicts:
net/ipv4/Kconfig
net/ipv4/tcp_timer.c

13 files changed:
1  2 
drivers/net/3c59x.c
drivers/net/Kconfig
drivers/net/tulip/de2104x.c
net/8021q/vlan_core.c
net/core/iovec.c
net/ipv4/Kconfig
net/ipv4/route.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_timer.c
net/ipv6/route.c
net/phonet/pep.c
net/sctp/socket.c

Simple merge
Simple merge
Simple merge
index 0eb486d342dcf1aa91baf64af831517f413ae97a,0eb96f7e44befb0155e364749f38eb37af0c2354..b6d55a9304f2bcb39a3bf9c4ee4f586412532f8e
@@@ -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;
        }
  
Simple merge
index 5462e2d147a690b69e780c5c161427e6a5f745f8,7cd7760144f7dd1998276f4e2976e4a4a1c8135d..e848e6c062cddbc29d8b846227476f778a20e6ab
@@@ -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
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge
Simple merge
index baea4a1290224e86c9f7c3cab646636fe86e35f9,74c54b30600f618522e07581c43130eea031f2db..f3c8c6c019ae9790d0d1c79bb695d1cb5ac8ff25
@@@ -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;
        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);
  
-                       timeout = ((2 << boundary) - 1) * TCP_RTO_MIN;
 +              if (boundary <= linear_backoff_thresh)
-                       timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN +
++                      timeout = ((2 << boundary) - 1) * rto_base;
 +              else
++                      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);
  
  
                        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:;
Simple merge
Simple merge
Simple merge