1. 08 Feb, 2018 11 commits
    • Song Liu's avatar
      tcp: tracepoint: only call trace_tcp_send_reset with full socket · 5c487bb9
      Song Liu authored
      tracepoint tcp_send_reset requires a full socket to work. However, it
      may be called when in TCP_TIME_WAIT:
      
              case TCP_TW_RST:
                      tcp_v6_send_reset(sk, skb);
                      inet_twsk_deschedule_put(inet_twsk(sk));
                      goto discard_it;
      
      To avoid this problem, this patch checks the socket with sk_fullsock()
      before calling trace_tcp_send_reset().
      
      Fixes: c24b14c4 ("tcp: add tracepoint trace_tcp_send_reset")
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      Reviewed-by: default avatarLawrence Brakmo <brakmo@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c487bb9
    • Md. Islam's avatar
      sch_netem: Bug fixing in calculating Netem interval · 043e337f
      Md. Islam authored
      In Kernel 4.15.0+, Netem does not work properly.
      
      Netem setup:
      
      tc qdisc add dev h1-eth0 root handle 1: netem delay 10ms 2ms
      
      Result:
      
      PING 172.16.101.2 (172.16.101.2) 56(84) bytes of data.
      64 bytes from 172.16.101.2: icmp_seq=1 ttl=64 time=22.8 ms
      64 bytes from 172.16.101.2: icmp_seq=2 ttl=64 time=10.9 ms
      64 bytes from 172.16.101.2: icmp_seq=3 ttl=64 time=10.9 ms
      64 bytes from 172.16.101.2: icmp_seq=5 ttl=64 time=11.4 ms
      64 bytes from 172.16.101.2: icmp_seq=6 ttl=64 time=11.8 ms
      64 bytes from 172.16.101.2: icmp_seq=4 ttl=64 time=4303 ms
      64 bytes from 172.16.101.2: icmp_seq=10 ttl=64 time=11.2 ms
      64 bytes from 172.16.101.2: icmp_seq=11 ttl=64 time=10.3 ms
      64 bytes from 172.16.101.2: icmp_seq=7 ttl=64 time=4304 ms
      64 bytes from 172.16.101.2: icmp_seq=8 ttl=64 time=4303 ms
      
      Patch:
      
      (rnd % (2 * sigma)) - sigma was overflowing s32. After applying the
      patch, I found following output which is desirable.
      
      PING 172.16.101.2 (172.16.101.2) 56(84) bytes of data.
      64 bytes from 172.16.101.2: icmp_seq=1 ttl=64 time=21.1 ms
      64 bytes from 172.16.101.2: icmp_seq=2 ttl=64 time=8.46 ms
      64 bytes from 172.16.101.2: icmp_seq=3 ttl=64 time=9.00 ms
      64 bytes from 172.16.101.2: icmp_seq=4 ttl=64 time=11.8 ms
      64 bytes from 172.16.101.2: icmp_seq=5 ttl=64 time=8.36 ms
      64 bytes from 172.16.101.2: icmp_seq=6 ttl=64 time=11.8 ms
      64 bytes from 172.16.101.2: icmp_seq=7 ttl=64 time=8.11 ms
      64 bytes from 172.16.101.2: icmp_seq=8 ttl=64 time=10.0 ms
      64 bytes from 172.16.101.2: icmp_seq=9 ttl=64 time=11.3 ms
      64 bytes from 172.16.101.2: icmp_seq=10 ttl=64 time=11.5 ms
      64 bytes from 172.16.101.2: icmp_seq=11 ttl=64 time=10.2 ms
      Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      043e337f
    • Grygorii Strashko's avatar
      net: ethernet: ti: cpsw: fix net watchdog timeout · 62f94c21
      Grygorii Strashko authored
      It was discovered that simple program which indefinitely sends 200b UDP
      packets and runs on TI AM574x SoC (SMP) under RT Kernel triggers network
      watchdog timeout in TI CPSW driver (<6 hours run). The network watchdog
      timeout is triggered due to race between cpsw_ndo_start_xmit() and
      cpsw_tx_handler() [NAPI]
      
      cpsw_ndo_start_xmit()
      	if (unlikely(!cpdma_check_free_tx_desc(txch))) {
      		txq = netdev_get_tx_queue(ndev, q_idx);
      		netif_tx_stop_queue(txq);
      
      ^^ as per [1] barier has to be used after set_bit() otherwise new value
      might not be visible to other cpus
      	}
      
      cpsw_tx_handler()
      	if (unlikely(netif_tx_queue_stopped(txq)))
      		netif_tx_wake_queue(txq);
      
      and when it happens ndev TX queue became disabled forever while driver's HW
      TX queue is empty.
      
      Fix this, by adding smp_mb__after_atomic() after netif_tx_stop_queue()
      calls and double check for free TX descriptors after stopping ndev TX queue
      - if there are free TX descriptors wake up ndev TX queue.
      
      [1] https://www.kernel.org/doc/html/latest/core-api/atomic_ops.htmlSigned-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Reviewed-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      62f94c21
    • Thomas Falcon's avatar
      ibmvnic: Ensure that buffers are NULL after free · b0992eca
      Thomas Falcon authored
      This change will guard against a double free in the case that the
      buffers were previously freed at some other time, such as during
      a device reset. It resolves a kernel oops that occurred when changing
      the VNIC device's MTU.
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0992eca
    • John Allen's avatar
      ibmvnic: Fix rx queue cleanup for non-fatal resets · 3468656f
      John Allen authored
      At some point, a check was added to exit the polling routine during resets.
      This makes sense for most reset conditions, but for a non-fatal error, we
      expect the polling routine to continue running to properly clean up the rx
      queues. This patch checks if we are performing a non-fatal reset and if we
      are, continues normal polling operation.
      Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3468656f
    • Amritha Nambiar's avatar
      i40e: Fix the number of queues available to be mapped for use · bc6d33c8
      Amritha Nambiar authored
      Fix the number of queues per enabled TC and report available queues
      to the kernel without having to limit them to the max RSS limit so
      they are available to be mapped for XPS. This allows a queue per
      processing thread available for handling traffic for the given
      traffic class.
      Signed-off-by: default avatarAmritha Nambiar <amritha.nambiar@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc6d33c8
    • David Ahern's avatar
      net/ipv6: onlink nexthop checks should default to main table · 44750f84
      David Ahern authored
      Because of differences in how ipv4 and ipv6 handle fib lookups,
      verification of nexthops with onlink flag need to default to the main
      table rather than the local table used by IPv4. As it stands an
      address within a connected route on device 1 can be used with
      onlink on device 2. Updating the table properly rejects the route
      due to the egress device mismatch.
      
      Update the extack message as well to show it could be a device
      mismatch for the nexthop spec.
      
      Fixes: fc1e64e1 ("net/ipv6: Add support for onlink flag")
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44750f84
    • David Ahern's avatar
      net/ipv6: Handle reject routes with onlink flag · 58e354c0
      David Ahern authored
      Verification of nexthops with onlink flag need to handle unreachable
      routes. The lookup is only intended to validate the gateway address
      is not a local address and if the gateway resolves the egress device
      must match the given device. Hence, hitting any default reject route
      is ok.
      
      Fixes: fc1e64e1 ("net/ipv6: Add support for onlink flag")
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58e354c0
    • Shannon Nelson's avatar
      sun: Add SPDX license tags to Sun network drivers · c861ef83
      Shannon Nelson authored
      Add the appropriate SPDX license tags to the Sun network drivers
      as outlined in Documentation/process/license-rules.rst.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
      Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c861ef83
    • David Howells's avatar
      rxrpc: Fix received abort handling · 17e9e23b
      David Howells authored
      AF_RXRPC is incorrectly sending back to the server any abort it receives
      for a client connection.  This is due to the final-ACK offload to the
      connection event processor patch.  The abort code is copied into the
      last-call information on the connection channel and then the event
      processor is set.
      
      Instead, the following should be done:
      
       (1) In the case of a final-ACK for a successful call, the ACK should be
           scheduled as before.
      
       (2) In the case of a locally generated ABORT, the ABORT details should be
           cached for sending in response to further packets related to that
           call and no further action scheduled at call disconnect time.
      
       (3) In the case of an ACK received from the peer, the call should be
           considered dead, no ABORT should be transmitted at this time.  In
           response to further non-ABORT packets from the peer relating to this
           call, an RX_USER_ABORT ABORT should be transmitted.
      
       (4) In the case of a call killed due to network error, an RX_USER_ABORT
           ABORT should be cached for transmission in response to further
           packets, but no ABORT should be sent at this time.
      
      Fixes: 3136ef49 ("rxrpc: Delay terminal ACK transmission on a client call")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17e9e23b
    • Christophe JAILLET's avatar
      cxgb4: Fix error handling path in 'init_one()' · e729452e
      Christophe JAILLET authored
      Commit baf50868 ("cxgb4: restructure VF mgmt code") has reordered
      some code but an error handling label has not been updated accordingly.
      So fix it and free 'adapter' if 't4_wait_dev_ready()' fails.
      
      Fixes: baf50868 ("cxgb4: restructure VF mgmt code")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e729452e
  2. 07 Feb, 2018 29 commits