Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jun 06, 2019
  2. Jun 05, 2019
    • David S. Miller's avatar
      Merge branch 'tcp-flowlabel' · ec01147a
      David S. Miller authored
      
      Eric Dumazet says:
      
      ====================
      ipv6: tcp: more control on RST flowlabels
      
      First patch allows to reflect incoming IPv6 flowlabel
      on RST packets sent when no socket could handle the packet.
      
      Second patch makes sure we send the same flowlabel
      for RST or ACK packets on behalf of TIME_WAIT sockets.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec01147a
    • Eric Dumazet's avatar
      ipv6: tcp: send consistent flowlabel in TIME_WAIT state · 50a8accf
      Eric Dumazet authored
      After commit 1d13a96c
      
       ("ipv6: tcp: fix flowlabel value in ACK
      messages"), we stored in tw_flowlabel the flowlabel, in the
      case ACK packets needed to be sent on behalf of a TIME_WAIT socket.
      
      We can use the same field so that RST packets sent from
      TIME_WAIT state also use a consistent flowlabel.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Florent Fourcot <florent.fourcot@wifirst.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50a8accf
    • Eric Dumazet's avatar
      ipv6: tcp: enable flowlabel reflection in some RST packets · 323a53c4
      Eric Dumazet authored
      When RST packets are sent because no socket could be found,
      it makes sense to use flowlabel_reflect sysctl to decide
      if a reflection of the flowlabel is requested.
      
      This extends commit 22b6722b
      
       ("ipv6: Add sysctl for per
      namespace flow label reflection"), for some TCP RST packets.
      
      In order to provide full control of this new feature,
      flowlabel_reflect becomes a bitmask.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      323a53c4
    • Gustavo A. R. Silva's avatar
      lib: objagg: Use struct_size() in kzalloc() · e736bf72
      Gustavo A. R. Silva authored
      
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct objagg_stats {
      	...
              struct objagg_obj_stats_info stats_info[];
      };
      
      size = sizeof(*objagg_stats) + sizeof(objagg_stats->stats_info[0]) * count;
      instance = kzalloc(size, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, stats_info, count), GFP_KERNEL);
      
      Notice that, in this case, variable alloc_size is not necessary, hence it
      is removed.
      
      This code was detected with the help of Coccinelle.
      
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e736bf72
    • Zhiqiang Liu's avatar
      inet_connection_sock: remove unused parameter of reqsk_queue_unlink func · 8b5e07d7
      Zhiqiang Liu authored
      
      small cleanup: "struct request_sock_queue *queue" parameter of reqsk_queue_unlink
      func is never used in the func, so we can remove it.
      
      Signed-off-by: default avatarZhiqiang Liu <liuzhiqiang26@huawei.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b5e07d7
    • Heiner Kallweit's avatar
      net: phy: remove state PHY_FORCING · 2bd229df
      Heiner Kallweit authored
      
      In the early days of phylib we had a functionality that changed to the
      next lower speed in fixed mode if no link was established after a
      certain period of time. This functionality has been removed years ago,
      and state PHY_FORCING isn't needed any longer. Instead we can go from
      UP to RUNNING or NOLINK directly (same as in autoneg mode).
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2bd229df
    • Zhu Yanjun's avatar
      net: rds: add per rds connection cache statistics · fe3475af
      Zhu Yanjun authored
      
      The variable cache_allocs is to indicate how many frags (KiB) are in one
      rds connection frag cache.
      The command "rds-info -Iv" will output the rds connection cache
      statistics as below:
      "
      RDS IB Connections:
            LocalAddr RemoteAddr Tos SL  LocalDev            RemoteDev
            1.1.1.14 1.1.1.14   58 255  fe80::2:c903:a:7a31 fe80::2:c903:a:7a31
            send_wr=256, recv_wr=1024, send_sge=8, rdma_mr_max=4096,
            rdma_mr_size=257, cache_allocs=12
      "
      This means that there are about 12KiB frag in this rds connection frag
      cache.
      Since rds.h in rds-tools is not related with the kernel rds.h, the change
      in kernel rds.h does not affect rds-tools.
      rds-info in rds-tools 2.0.5 and 2.0.6 is tested with this commit. It works
      well.
      
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe3475af
    • David S. Miller's avatar
      Merge branch 'dwmac-mediatek' · dceebd4c
      David S. Miller authored
      
      Biao Huang says:
      
      ====================
      complete dwmac-mediatek driver and fix flow control issue
      
      Changes in v2:
              patch#1: there is no extra action in mediatek_dwmac_remove, remove it
      
      v1:
      This series mainly complete dwmac-mediatek driver:
              1. add power on/off operations for dwmac-mediatek.
              2. disable rx watchdog to reduce rx path reponding time.
              3. change the default value of tx-frames from 25 to 1, so
                 ptp4l will test pass by default.
      
      and also fix the issue that flow control won't be disabled any more
      once being enabled.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dceebd4c
    • Biao Huang's avatar
      net: stmmac: dwmac4: fix flow control issue · ee326fd0
      Biao Huang authored
      Current dwmac4_flow_ctrl will not clear
      GMAC_RX_FLOW_CTRL_RFE/GMAC_RX_FLOW_CTRL_RFE bits,
      so MAC hw will keep flow control on although expecting
      flow control off by ethtool. Add codes to fix it.
      
      Fixes: 477286b5
      
       ("stmmac: add GMAC4 core support")
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee326fd0
    • Biao Huang's avatar
      net: stmmac: modify default value of tx-frames · d2facb4b
      Biao Huang authored
      
      the default value of tx-frames is 25, it's too late when
      passing tstamp to stack, then the ptp4l will fail:
      
      ptp4l -i eth0 -f gPTP.cfg -m
      ptp4l: selected /dev/ptp0 as PTP clock
      ptp4l: port 1: INITIALIZING to LISTENING on INITIALIZE
      ptp4l: port 0: INITIALIZING to LISTENING on INITIALIZE
      ptp4l: port 1: link up
      ptp4l: timed out while polling for tx timestamp
      ptp4l: increasing tx_timestamp_timeout may correct this issue,
             but it is likely caused by a driver bug
      ptp4l: port 1: send peer delay response failed
      ptp4l: port 1: LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
      
      ptp4l tests pass when changing the tx-frames from 25 to 1 with
      ethtool -C option.
      It should be fine to set tx-frames default value to 1, so ptp4l will pass
      by default.
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2facb4b