Skip to content
Snippets Groups Projects
  1. Nov 13, 2012
  2. Nov 12, 2012
  3. Nov 10, 2012
  4. Nov 09, 2012
  5. Nov 08, 2012
  6. Nov 07, 2012
  7. Nov 04, 2012
  8. Nov 03, 2012
    • John Fastabend's avatar
      net: fix bridge notify hook to manage flags correctly · c38e01b8
      John Fastabend authored
      
      The bridge notify hook rtnl_bridge_notify() was not handling the
      case where the master flags was set or with both flags set. First
      flags are not being passed correctly and second the logic to parse
      them is broken.
      
      This patch passes the original flags value and fixes the
      logic.
      
      Reported-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c38e01b8
    • John Fastabend's avatar
      rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump · a7a558fe
      John Fastabend authored
      
      Change the dflt fdb dump handler to use RTM_NEWNEIGH to
      be compatible with bridge dump routines.
      
      The dump reply from the network driver handlers should
      match the reply from bridge handler. The fact they were
      not in the ixgbe case was effectively a bug. This patch
      resolves it.
      
      Applications that were not checking the nlmsg type will
      continue to work. And now applications that do check
      the type will work as expected.
      
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7a558fe
    • Vimalkumar's avatar
      htb: improved accuracy at high rates · 56b765b7
      Vimalkumar authored
      
      Current HTB (and TBF) uses rate table computed by the "tc"
      userspace program, which has the following issue:
      
      The rate table has 256 entries to map packet lengths
      to token (time units).  With TSO sized packets, the
      256 entry granularity leads to loss/gain of rate,
      making the token bucket inaccurate.
      
      Thus, instead of relying on rate table, this patch
      explicitly computes the time and accounts for packet
      transmission times with nanosecond granularity.
      
      This greatly improves accuracy of HTB with a wide
      range of packet sizes.
      
      Example:
      
      tc qdisc add dev $dev root handle 1: \
              htb default 1
      
      tc class add dev $dev classid 1:1 parent 1: \
              rate 5Gbit mtu 64k
      
      Here is an example of inaccuracy:
      
      $ iperf -c host -t 10 -i 1
      
      With old htb:
      eth4:   34.76 Mb/s In  5827.98 Mb/s Out -  65836.0 p/s In  481273.0 p/s Out
      [SUM]  9.0-10.0 sec   669 MBytes  5.61 Gbits/sec
      [SUM]  0.0-10.0 sec  6.50 GBytes  5.58 Gbits/sec
      
      With new htb:
      eth4:   28.36 Mb/s In  5208.06 Mb/s Out -  53704.0 p/s In  430076.0 p/s Out
      [SUM]  9.0-10.0 sec   594 MBytes  4.98 Gbits/sec
      [SUM]  0.0-10.0 sec  5.80 GBytes  4.98 Gbits/sec
      
      The bits per second on the wire is still 5200Mb/s with new HTB
      because qdisc accounts for packet length using skb->len, which
      is smaller than total bytes on the wire if GSO is used.  But
      that is for another patch regardless of how time is accounted.
      
      Many thanks to Eric Dumazet for review and feedback.
      
      Signed-off-by: default avatarVimalkumar <j.vimal@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56b765b7
    • Xiaotian Feng's avatar
      tipc: do not use tasklet_disable before tasklet_kill · d145f7ec
      Xiaotian Feng authored
      
      If tasklet_disable() is called before related tasklet handled,
      tasklet_kill will never be finished. tasklet_kill is enough.
      
      Signed-off-by: default avatarXiaotian Feng <dannyfeng@tencent.com>
      Cc: Jon Maloy <jon.maloy@ericsson.com>
      Cc: Allan Stephens <allan.stephens@windriver.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Cc: tipc-discussion@lists.sourceforge.net
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d145f7ec
    • Amerigo Wang's avatar
      ipv6: introduce ip6_rt_put() · 94e187c0
      Amerigo Wang authored
      
      As suggested by Eric, we could introduce a helper function
      for ipv6 too, to avoid checking if rt is NULL before
      dst_release().
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94e187c0
    • Neil Horman's avatar
      sctp: Clean up type-punning in sctp_cmd_t union · b26ddd81
      Neil Horman authored
      
      Lots of points in the sctp_cmd_interpreter function treat the sctp_cmd_t arg as
      a void pointer, even though they are written as various other types.  Theres no
      need for this as doing so just leads to possible type-punning issues that could
      cause crashes, and if we remain type-consistent we can actually just remove the
      void * member of the union entirely.
      
      Change Notes:
      
      v2)
      	* Dropped chunk that modified SCTP_NULL to create a marker pattern
      	 should anyone try to use a SCTP_NULL() assigned sctp_arg_t, Assigning
      	 to .zero provides the same effect and should be faster, per Vlad Y.
      
      v3)
      	* Reverted part of V2, opting to use memset instead of .zero, so that
      	 the entire union is initalized thus avoiding the i164 speculative load
      	 problems previously encountered, per Dave M..  Also rewrote
      	 SCTP_[NO]FORCE so as to use common infrastructure a little more
      
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: Vlad Yasevich <vyasevich@gmail.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: linux-sctp@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b26ddd81
    • Amerigo Wang's avatar
      ipv6: remove a useless NULL check · 1a940835
      Amerigo Wang authored
      
      In dev_forward_change(), it is useless to check if idev->dev
      is NULL, it is always non-NULL here.
      
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1a940835
    • Daniel Borkmann's avatar
      pktgen: clean up ktime_t helpers · 398f382c
      Daniel Borkmann authored
      
      Some years ago, the ktime_t helper functions ktime_now() and ktime_lt()
      have been introduced. Instead of defining them inside pktgen.c, they
      should either use ktime_t library functions or, if not available, they
      should be defined in ktime.h, so that also others can benefit from them.
      ktime_compare() is introduced with a similar notion as in timespec_compare().
      
      Signed-off-by: default avatarDaniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      398f382c
    • Eric Dumazet's avatar
      tcp: better retrans tracking for defer-accept · e6c022a4
      Eric Dumazet authored
      
      For passive TCP connections using TCP_DEFER_ACCEPT facility,
      we incorrectly increment req->retrans each time timeout triggers
      while no SYNACK is sent.
      
      SYNACK are not sent for TCP_DEFER_ACCEPT that were established (for
      which we received the ACK from client). Only the last SYNACK is sent
      so that we can receive again an ACK from client, to move the req into
      accept queue. We plan to change this later to avoid the useless
      retransmit (and potential problem as this SYNACK could be lost)
      
      TCP_INFO later gives wrong information to user, claiming imaginary
      retransmits.
      
      Decouple req->retrans field into two independent fields :
      
      num_retrans : number of retransmit
      num_timeout : number of timeouts
      
      num_timeout is the counter that is incremented at each timeout,
      regardless of actual SYNACK being sent or not, and used to
      compute the exponential timeout.
      
      Introduce inet_rtx_syn_ack() helper to increment num_retrans
      only if ->rtx_syn_ack() succeeded.
      
      Use inet_rtx_syn_ack() from tcp_check_req() to increment num_retrans
      when we re-send a SYNACK in answer to a (retransmitted) SYN.
      Prior to this patch, we were not counting these retransmits.
      
      Change tcp_v[46]_rtx_synack() to increment TCP_MIB_RETRANSSEGS
      only if a synack packet was successfully queued.
      
      Reported-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
      Cc: Elliott Hughes <enh@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6c022a4
    • Pavel Emelyanov's avatar
      tcp-repair: Handle zero-length data put in rcv queue · c454e611
      Pavel Emelyanov authored
      
      When sending data into a tcp socket in repair state we should check
      for the amount of data being 0 explicitly. Otherwise we'll have an skb
      with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
      (in particular a warn_on in tcp_recvmsg shoots).
      
      Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Reported-by: default avatarGiorgos Mavrikas <gmavrikas@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c454e611
    • Tom Parkin's avatar
      l2tp: fix oops in l2tp_eth_create() error path · 78933636
      Tom Parkin authored
      
      When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
      any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
      32k-interface limit), the netdev is freed in the error path.  However, the
      l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
      l2tp_eth_delete() then attempting to unregister the same netdev later in the
      session teardown.  This results in an oops.
      
      To avoid this, clear the session dev pointer in the error path.
      
      Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78933636
Loading