1. 25 Mar, 2020 5 commits
  2. 24 Mar, 2020 31 commits
  3. 23 Mar, 2020 1 commit
    • Eric Dumazet's avatar
      tcp: repair: fix TCP_QUEUE_SEQ implementation · 6cd6cbf5
      Eric Dumazet authored
      When application uses TCP_QUEUE_SEQ socket option to
      change tp->rcv_next, we must also update tp->copied_seq.
      
      Otherwise, stuff relying on tcp_inq() being precise can
      eventually be confused.
      
      For example, tcp_zerocopy_receive() might crash because
      it does not expect tcp_recv_skb() to return NULL.
      
      We could add tests in various places to fix the issue,
      or simply make sure tcp_inq() wont return a random value,
      and leave fast path as it is.
      
      Note that this fixes ioctl(fd, SIOCINQ, &val) at the same
      time.
      
      Fixes: ee995283 ("tcp: Initial repair mode")
      Fixes: 05255b82 ("tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cd6cbf5
  4. 22 Mar, 2020 3 commits
    • Alan Maguire's avatar
      selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc · 83a9b6f6
      Alan Maguire authored
      Many systems build/test up-to-date kernels with older libcs, and
      an older glibc (2.17) lacks the definition of SOL_DCCP in
      /usr/include/bits/socket.h (it was added in the 4.6 timeframe).
      
      Adding the definition to the test program avoids a compilation
      failure that gets in the way of building tools/testing/selftests/net.
      The test itself will work once the definition is added; either
      skipping due to DCCP not being configured in the kernel under test
      or passing, so there are no other more up-to-date glibc dependencies
      here it seems beyond that missing definition.
      
      Fixes: 11fb60d1 ("selftests: net: reuseport_addr_any: add DCCP")
      Signed-off-by: default avatarAlan Maguire <alan.maguire@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83a9b6f6
    • Doug Berger's avatar
      net: bcmgenet: always enable status blocks · 9a9ba2a4
      Doug Berger authored
      The hardware offloading of the NETIF_F_HW_CSUM and NETIF_F_RXCSUM
      features requires the use of Transmit Status Blocks before transmit
      frame data and Receive Status Blocks before receive frame data to
      carry the checksum information.
      
      Unfortunately, these status blocks are currently only enabled when
      the NETIF_F_HW_CSUM feature is enabled. As a result NETIF_F_RXCSUM
      will not actually be offloaded to the hardware unless both it and
      NETIF_F_HW_CSUM are enabled. Fortunately, that is the default
      configuration.
      
      This commit addresses this issue by always enabling the use of
      status blocks on both transmit and receive frames. Further, it
      replaces the use of a dedicated flag within the driver private
      data structure with direct use of the netdev features flags.
      
      Fixes: 81015539 ("net: bcmgenet: use CHECKSUM_COMPLETE for NETIF_F_RXCSUM")
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a9ba2a4
    • Grygorii Strashko's avatar
      net: phy: dp83867: w/a for fld detect threshold bootstrapping issue · 749f6f68
      Grygorii Strashko authored
      When the DP83867 PHY is strapped to enable Fast Link Drop (FLD) feature
      STRAP_STS2.STRAP_ FLD (reg 0x006F bit 10), the Energy Lost Threshold for
      FLD Energy Lost Mode FLD_THR_CFG.ENERGY_LOST_FLD_THR (reg 0x002e bits 2:0)
      will be defaulted to 0x2. This may cause the phy link to be unstable. The
      new DP83867 DM recommends to always restore ENERGY_LOST_FLD_THR to 0x1.
      
      Hence, restore default value of FLD_THR_CFG.ENERGY_LOST_FLD_THR to 0x1 when
      FLD is enabled by bootstrapping as recommended by DM.
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      749f6f68