1. 23 Jul, 2018 17 commits
  2. 22 Jul, 2018 18 commits
  3. 21 Jul, 2018 5 commits
    • YueHaibing's avatar
      libcxgb: replace vmalloc and memset with vzalloc · 4c303373
      YueHaibing authored
      Use vzalloc instead of the vmalloc, memset combo
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c303373
    • YueHaibing's avatar
      net: hix5hd2_gmac: use dma_zalloc_coherent instead of allocator/memset · c1907e53
      YueHaibing authored
      Use dma_zalloc_coherent instead of dma_alloc_coherent
      followed by memset 0.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1907e53
    • YueHaibing's avatar
      tipc: make some functions static · e064cce1
      YueHaibing authored
      Fixes the following sparse warnings:
      
      net/tipc/link.c:376:5: warning: symbol 'link_bc_rcv_gap' was not declared. Should it be static?
      net/tipc/link.c:823:6: warning: symbol 'link_prepare_wakeup' was not declared. Should it be static?
      net/tipc/link.c:959:6: warning: symbol 'tipc_link_advance_backlog' was not declared. Should it be static?
      net/tipc/link.c:1009:5: warning: symbol 'tipc_link_retrans' was not declared. Should it be static?
      net/tipc/monitor.c:687:5: warning: symbol '__tipc_nl_add_monitor_peer' was not declared. Should it be static?
      net/tipc/group.c:230:20: warning: symbol 'tipc_group_find_member' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e064cce1
    • Gustavo A. R. Silva's avatar
      net: sched: use PTR_ERR_OR_ZERO macro in tcf_block_cb_register · baa2d2b1
      Gustavo A. R. Silva authored
      This line makes up what macro PTR_ERR_OR_ZERO already does. So,
      make use of PTR_ERR_OR_ZERO rather than an open-code version.
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      baa2d2b1
    • David S. Miller's avatar
      Merge branch 'tcp-improve-setsockopt-TCP_USER_TIMEOUT-accuracy' · d1afdc51
      David S. Miller authored
      Jon Maxwell says:
      
      ====================
      tcp: improve setsockopt() TCP_USER_TIMEOUT accuracy
      
      The patch was becoming bigger based on feedback therefore I have
      implemented a series of 3 commits instead in V4.
      
      This series is a continuation based on V3 here and associated feedback:
      
      https://patchwork.kernel.org/patch/10516195/
      
      Suggestions by Neal Cardwell:
      
      1) Fix up units mismatch regarding msec/jiffies.
      2) Address possiblility of time_remaining being negative.
      3) Add a helper routine tcp_clamp_rto_to_user_timeout() to do the rto
      calculation.
      4) Move start_ts logic into helper routine tcp_retrans_stamp() to
      validate tcp_sk(sk)->retrans_stamp.
      5) Some u32 declation and return refactoring.
      6) Return 0 instead of false in tcp_retransmit_stamp(), it's not a bool.
      
      Suggestions by David Laight:
      
      1) Don't cache rto in tcp_clamp_rto_to_user_timeout().
      
      Suggestions by Eric Dumazet:
      
      1) Make u32 declartions consistent.
      2) Use patch series for easier review.
      3) Convert icsk->icsk_user_timeout to millisconds to avoid jiffie to
      msec dance.
      4) Use seperate titles for each commit in the series.
      5) Fix fuzzy indentation and line wrap issues.
      6) Make commit titles descriptive.
      
      Changes:
      
      1) Call tcp_clamp_rto_to_user_timeout(sk) as an argument to
      inet_csk_reset_xmit_timer() to save on rto declaration.
      
      Every time the TCP retransmission timer fires. It checks to see if
      there is a timeout before scheduling the next retransmit timer. The
      retransmit interval between each retransmission increases
      exponentially. The issue is that in order for the timeout to occur the
      retransmit timer needs to fire again. If the user timeout check happens
      after the 9th retransmit for example. It needs to wait for the 10th
      retransmit timer to fire in order to evaluate whether a timeout has
      occurred or not. If the interval is large enough then the timeout will
      be inaccurate.
      
      For example with a TCP_USER_TIMEOUT of 10 seconds without patch:
      
      1st retransmit:
      
      22:25:18.973488 IP host1.49310 > host2.search-agent: Flags [.]
      
      Last retransmit:
      
      22:25:26.205499 IP host1.49310 > host2.search-agent: Flags [.]
      
      Timeout:
      
      send: Connection timed out
      Sun Jul  1 22:25:34 EDT 2018
      
      We can see that last retransmit took ~7 seconds. Which pushed the total
      timeout to ~15 seconds instead of the expected 10 seconds. This gets
      more inaccurate the larger the TCP_USER_TIMEOUT value. As the interval
      increases.
      
      Add tcp_clamp_rto_to_user_timeout() to determine if the user rto has
      expired. Or whether the rto interval needs to be recalculated. Use the
      original interval if user rto is not set.
      
      Test results with the patch is the expected 10 second timeout:
      
      1st retransmit:
      
      01:37:59.022555 IP host1.49310 > host2.search-agent: Flags [.]
      
      Last retransmit:
      
      01:38:06.486558 IP host1.49310 > host2.search-agent: Flags [.]
      
      Timeout:
      
      send: Connection timed out
      Mon Jul  2 01:38:09 EDT 2018
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1afdc51