1. 22 Mar, 2016 21 commits
  2. 21 Mar, 2016 8 commits
  3. 20 Mar, 2016 11 commits
    • David S. Miller's avatar
      Revert "lan78xx: add ndo_get_stats64" · 1c191307
      David S. Miller authored
      This reverts commit a59f8c5b.
      
      There are several bugs in this new code, for example:
      
      1) Uses sleeping locks in get_stats64, which is not allowed,
         as the operation can be invoked in an atomic context.
      
      2) Uses PM fields without CONFIG_PM or similar guards.
      
      3) Does not synchronize HW stats when the device runtime
         suspends.
      
      Therefore this is being reverted until a correct version
      is implemented.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c191307
    • Luis de Bethencourt's avatar
      net: sched: Add description for cpu_bstats argument · e9fc2f05
      Luis de Bethencourt authored
      Commit 22e0f8b9 ("net: sched: make bstats per cpu and estimator RCU safe")
      added the argument cpu_bstats to functions gen_new_estimator and
      gen_replace_estimator and now the descriptions of these are missing for the
      documentation. Adding them.
      Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9fc2f05
    • Luis de Bethencourt's avatar
      gen_stats.c: Add description for cpu argument · b002fdcc
      Luis de Bethencourt authored
      Function gnet_stats_copy_basic is missing the description of the cpu
      argument in the documentation. Adding it.
      Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b002fdcc
    • Tina Ruchandani's avatar
      isdn: Use ktime_t instead of 'struct timeval' · ebf918cf
      Tina Ruchandani authored
      'struct timeval' uses 32-bit representation for seconds which will
      overflow in year 2038 and beyond. mISDN/clock.c needs to compute and
      store elapsed time in intervals of 125 microseconds. This patch replaces
      the usage of 'struct timeval' with 64-bit ktime_t which is y2038 safe.
      The patch also replaces do_gettimeofday() (wall-clock time) with
      ktime_get() (monotonic time) since we only care about elapsed time here.
      Signed-off-by: default avatarTina Ruchandani <ruchandani.tina@gmail.com>
      Suggested-by: default avatarArnd Bergmnann <arnd@arndb.de>
      Suggested-by: default avatarDavid Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebf918cf
    • David S. Miller's avatar
      Merge branch 'tunnel-fixes' · 4320f219
      David S. Miller authored
      Jesse Gross says:
      
      ====================
      Tunneling fixes
      
      This series fixes a problem that was reported where encapsulated packets
      do not have their encapsulation offload markers stripped off when being
      decapsulated. This causes a significant performance drop if the packets
      are later retransmitted.
      
      Fixing this revealed two other bugs which are also addressed as prerequisites:
       * GRO can aggregate packets for multiple layers of encapsulation which the
         stack cannot properly handle.
       * IPIP packets which are combined by GRO are not marked properly with their
         GSO type.
      
      Note that this is based off the net-next tree as the current target for
      bug fixes.
      
      v2: No code changes, just additional information in commit messages and
          a new cover letter.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4320f219
    • Jesse Gross's avatar
      tunnels: Remove encapsulation offloads on decap. · a09a4c8d
      Jesse Gross authored
      If a packet is either locally encapsulated or processed through GRO
      it is marked with the offloads that it requires. However, when it is
      decapsulated these tunnel offload indications are not removed. This
      means that if we receive an encapsulated TCP packet, aggregate it with
      GRO, decapsulate, and retransmit the resulting frame on a NIC that does
      not support encapsulation, we won't be able to take advantage of hardware
      offloads even though it is just a simple TCP packet at this point.
      
      This fixes the problem by stripping off encapsulation offload indications
      when packets are decapsulated.
      
      The performance impacts of this bug are significant. In a test where a
      Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed, decapsulated,
      and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a
      result of avoiding unnecessary segmentation at the VM tap interface.
      Reported-by: default avatarRamu Ramamurthy <sramamur@linux.vnet.ibm.com>
      Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE")
      Signed-off-by: default avatarJesse Gross <jesse@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a09a4c8d
    • Jesse Gross's avatar
      tunnels: Don't apply GRO to multiple layers of encapsulation. · fac8e0f5
      Jesse Gross authored
      When drivers express support for TSO of encapsulated packets, they
      only mean that they can do it for one layer of encapsulation.
      Supporting additional levels would mean updating, at a minimum,
      more IP length fields and they are unaware of this.
      
      No encapsulation device expresses support for handling offloaded
      encapsulated packets, so we won't generate these types of frames
      in the transmit path. However, GRO doesn't have a check for
      multiple levels of encapsulation and will attempt to build them.
      
      UDP tunnel GRO actually does prevent this situation but it only
      handles multiple UDP tunnels stacked on top of each other. This
      generalizes that solution to prevent any kind of tunnel stacking
      that would cause problems.
      
      Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
      Signed-off-by: default avatarJesse Gross <jesse@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fac8e0f5
    • Jesse Gross's avatar
      ipip: Properly mark ipip GRO packets as encapsulated. · b8cba75b
      Jesse Gross authored
      ipip encapsulated packets can be merged together by GRO but the result
      does not have the proper GSO type set or even marked as being
      encapsulated at all. Later retransmission of these packets will likely
      fail if the device does not support ipip offloads. This is similar to
      the issue resolved in IPv6 sit in feec0cb3
      ("ipv6: gro: support sit protocol").
      Reported-by: default avatarPatrick Boutilier <boutilpj@ednet.ns.ca>
      Fixes: 9667e9bb ("ipip: Add gro callbacks to ipip offload")
      Tested-by: default avatarPatrick Boutilier <boutilpj@ednet.ns.ca>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarJesse Gross <jesse@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8cba75b
    • Marcelo Ricardo Leitner's avatar
      sctp: keep fragmentation point aligned to word size · 659e0bca
      Marcelo Ricardo Leitner authored
      If the user supply a different fragmentation point or if there is a
      network header that cause it to not be aligned, force it to be aligned.
      
      Fragmentation point at a value that is not aligned is not optimal.  It
      causes extra padding to be used and has just no pros.
      
      v2:
       - Make use of the new WORD_TRUNC macro
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      659e0bca
    • Marcelo Ricardo Leitner's avatar
      sctp: align MTU to a word · 3822a5ff
      Marcelo Ricardo Leitner authored
      SCTP is a protocol that is aligned to a word (4 bytes). Thus using bare
      MTU can sometimes return values that are not aligned, like for loopback,
      which is 65536 but ipv4_mtu() limits that to 65535. This mis-alignment
      will cause the last non-aligned bytes to never be used and can cause
      issues with congestion control.
      
      So it's better to just consider a lower MTU and keep congestion control
      calcs saner as they are based on PMTU.
      
      Same applies to icmp frag needed messages, which is also fixed by this
      patch.
      
      One other effect of this is the inability to send MTU-sized packet
      without queueing or fragmentation and without hitting Nagle. As the
      check performed at sctp_packet_can_append_data():
      
      if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
      	/* Enough data queued to fill a packet */
      	return SCTP_XMIT_OK;
      
      with the above example of MTU, if there are no other messages queued,
      one cannot send a packet that just fits one packet (65532 bytes) and
      without causing DATA chunk fragmentation or a delay.
      
      v2:
       - Added WORD_TRUNC macro
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3822a5ff
    • Marcelo Ricardo Leitner's avatar
      sctp: do not leak chunks that are sent to unconfirmed paths · 31b055ef
      Marcelo Ricardo Leitner authored
      Currently, if a chunk is scheduled to be sent through a transport that
      is currently unconfirmed, it will be leaked as it is dequeued from outq
      and is not re-queued nor freed.
      
      As I'm not aware of any situation that may lead to this situation, I'm
      fixing this by freeing the chunk and also logging a trace so that we can
      fix the other bug if it ever happens.
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31b055ef