1. 11 Aug, 2018 17 commits
    • Ilias Apalodimas's avatar
      net: socionext: Use descriptor info instead of MMIO reads on Rx · 63ae7949
      Ilias Apalodimas authored
      MMIO reads for remaining packets in queue occur (at least)twice per
      invocation of netsec_process_rx(). We can use the packet descriptor to
      identify if it's owned by the hardware and break out, avoiding the more
      expensive MMIO read operations. This has a ~2% increase on the pps of the
      Rx path when tested with 64byte packets
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63ae7949
    • YueHaibing's avatar
      vxge: remove set but not used variable 'req_out', 'status' and 'ret' · 78aca3bb
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/ethernet/neterion/vxge/vxge-config.c:1097:6: warning:
       variable 'ret' set but not used [-Wunused-but-set-variable]
      drivers/net/ethernet/neterion/vxge/vxge-config.c:2263:6: warning:
       variable 'req_out' set but not used [-Wunused-but-set-variable]
      drivers/net/ethernet/neterion/vxge/vxge-config.c:2262:22: warning:
       variable 'status' set but not used [-Wunused-but-set-variable]
      drivers/net/ethernet/neterion/vxge/vxge-config.c:2360:22: warning:
       variable 'status' set but not used [-Wunused-but-set-variable]
        enum vxge_hw_status status = VXGE_HW_OK;
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78aca3bb
    • David S. Miller's avatar
      Merge branch 'virtio_net-Expand-affinity-to-arbitrary-numbers-of-cpu-and-vq' · 29afde50
      David S. Miller authored
      Caleb Raitto says:
      
      ====================
      virtio_net: Expand affinity to arbitrary numbers of cpu and vq
      
      Virtio-net tries to pin each virtual queue rx and tx interrupt to a cpu if
      there are as many queues as cpus.
      
      Expand this heuristic to configure a reasonable affinity setting also
      when the number of cpus != the number of virtual queues.
      
      Patch 1 allows vqs to take an affinity mask with more than 1 cpu.
      Patch 2 generalizes the algorithm in virtnet_set_affinity beyond
      the case where #cpus == #vqs.
      
      v2 changes:
      Renamed "virtio_net: Make vp_set_vq_affinity() take a mask." to
      "virtio: Make vp_set_vq_affinity() take a mask."
      
      Tested:
      
      [InstanceSetup]
      set_multiqueue = false
      
      $ cd /proc/irq
      $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
      0-15
      0
      0
      1
      1
      2
      2
      3
      3
      4
      4
      5
      5
      6
      6
      7
      7
      8
      8
      9
      9
      10
      10
      11
      11
      12
      12
      13
      13
      14
      14
      15
      15
      0-15
      0-15
      0-15
      0-15
      
      $ cd /sys/class/net/eth0/queues/
      $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
      0001
      0002
      0004
      0008
      0010
      0020
      0040
      0080
      0100
      0200
      0400
      0800
      1000
      2000
      4000
      8000
      
      $ sudo ethtool -L eth0 combined 15
      
      $ cd /proc/irq
      $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
      0-15
      0-1
      0-1
      2
      2
      3
      3
      4
      4
      5
      5
      6
      6
      7
      7
      8
      8
      9
      9
      10
      10
      11
      11
      12
      12
      13
      13
      14
      14
      15
      15
      15
      15
      0-15
      0-15
      0-15
      0-15
      
      $ cd /sys/class/net/eth0/queues/
      $ for i in `seq 0 14` ; do sudo grep ".*" tx-$i/xps_cpus; done
      0003
      0004
      0008
      0010
      0020
      0040
      0080
      0100
      0200
      0400
      0800
      1000
      2000
      4000
      8000
      
      $ sudo ethtool -L eth0 combined 8
      
      $ cd /proc/irq
      $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
      0-15
      0-1
      0-1
      2-3
      2-3
      4-5
      4-5
      6-7
      6-7
      8-9
      8-9
      10-11
      10-11
      12-13
      12-13
      14-15
      14-15
      9
      9
      10
      10
      11
      11
      12
      12
      13
      13
      14
      14
      15
      15
      15
      15
      0-15
      0-15
      0-15
      0-15
      
      $ cd /sys/class/net/eth0/queues/
      $ for i in `seq 0 7` ; do sudo grep ".*" tx-$i/xps_cpus; done
      0003
      000c
      0030
      00c0
      0300
      0c00
      3000
      c000
      
      $ sudo ethtool -L eth0 combined 16
      $ sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu15/online"
      
      $ cd /proc/irq
      $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
      0-15
      0
      0
      1
      1
      2
      2
      3
      3
      4
      4
      5
      5
      6
      6
      7
      7
      8
      8
      9
      9
      10
      10
      11
      11
      12
      12
      13
      13
      14
      14
      0
      0
      0-15
      0-15
      0-15
      0-15
      
      $ cd /sys/class/net/eth0/queues/
      $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
      0001
      0002
      0004
      0008
      0010
      0020
      0040
      0080
      0100
      0200
      0400
      0800
      1000
      2000
      4000
      0001
      
      $ for i in `seq 8 15`; \
      do sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu$i/online"; done
      
      $ cd /proc/irq
      $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
      0-15
      0
      0
      1
      1
      2
      2
      3
      3
      4
      4
      5
      5
      6
      6
      7
      7
      0
      0
      1
      1
      2
      2
      3
      3
      4
      4
      5
      5
      6
      6
      7
      7
      0-15
      0-15
      0-15
      0-15
      
      $ cd /sys/class/net/eth0/queues/
      $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
      0001
      0002
      0004
      0008
      0010
      0020
      0040
      0080
      0001
      0002
      0004
      0008
      0010
      0020
      0040
      0080
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29afde50
    • Caleb Raitto's avatar
      virtio_net: Stripe queue affinities across cores. · 2ca653d6
      Caleb Raitto authored
      Always set the affinity hint, even if #cpu != #vq.
      
      Handle the case where #cpu > #vq (including when #cpu % #vq != 0) and
      when #vq > #cpu (including when #vq % #cpu != 0).
      Signed-off-by: default avatarCaleb Raitto <caraitto@google.com>
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarJon Olson <jonolson@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ca653d6
    • Caleb Raitto's avatar
      virtio: Make vp_set_vq_affinity() take a mask. · 19e226e8
      Caleb Raitto authored
      Make vp_set_vq_affinity() take a cpumask instead of taking a single CPU.
      
      If there are fewer queues than cores, queue affinity should be able to
      map to multiple cores.
      
      Link: https://patchwork.ozlabs.org/patch/948149/Suggested-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarCaleb Raitto <caraitto@google.com>
      Acked-by: default avatarGonglei <arei.gonglei@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19e226e8
    • Bryan Whitehead's avatar
      lan743x: lan743x: Add PTP support · 07624df1
      Bryan Whitehead authored
      PTP support includes:
          Ingress, and egress timestamping.
          One step timestamping available.
          PTP clock support.
          Periodic output support.
      Signed-off-by: default avatarBryan Whitehead <Bryan.Whitehead@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07624df1
    • David S. Miller's avatar
      Merge branch 'tcp-new-mechanism-to-ACK-immediately' · 217e502b
      David S. Miller authored
      Yuchung Cheng says:
      
      ====================
      tcp: new mechanism to ACK immediately
      
      This patch is a follow-up feature improvement to the recent fixes on
      the performance issues in ECN (delayed) ACKs. Many of the fixes use
      tcp_enter_quickack_mode routine to force immediate ACKs. However the
      routine also reset tracking interactive session. This is not ideal
      because these immediate ACKs are required by protocol specifics
      unrelated to the interactiveness nature of the application.
      
      This patch set introduces a new flag to send a one-time immediate ACK
      without changing the status of interactive session tracking. With this
      patch set the immediate ACKs are generated upon these protocol states:
      
      1) When a hole is repaired
      2) When CE status changes between subsequent data packets received
      3) When a data packet carries CWR flag
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      217e502b
    • Yuchung Cheng's avatar
      tcp: avoid resetting ACK timer upon receiving packet with ECN CWR flag · fd2123a3
      Yuchung Cheng authored
      Previously commit 9aee4000 ("tcp: ack immediately when a cwr
      packet arrives") calls tcp_enter_quickack_mode to force sending
      two immediate ACKs upon receiving a packet w/ CWR flag. The side
      effect is it'll also reset the delayed ACK timer and interactive
      session tracking. This patch removes that side effect by using the
      new ACK_NOW flag to force an immmediate ACK.
      
      Packetdrill to demonstrate:
      
          0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
         +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
         +0 setsockopt(3, SOL_TCP, TCP_CONGESTION, "dctcp", 5) = 0
         +0 bind(3, ..., ...) = 0
         +0 listen(3, 1) = 0
      
         +0 < [ect0] SEW 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
         +0 > SE. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
        +.1 < [ect0] . 1:1(0) ack 1 win 257
         +0 accept(3, ..., ...) = 4
      
         +0 < [ect0] . 1:1001(1000) ack 1 win 257
         +0 > [ect01] . 1:1(0) ack 1001
      
         +0 write(4, ..., 1) = 1
         +0 > [ect01] P. 1:2(1) ack 1001
      
         +0 < [ect0] . 1001:2001(1000) ack 2 win 257
         +0 write(4, ..., 1) = 1
         +0 > [ect01] P. 2:3(1) ack 2001
      
         +0 < [ect0] . 2001:3001(1000) ack 3 win 257
         +0 < [ect0] . 3001:4001(1000) ack 3 win 257
         // Ack delayed ...
      
         +.01 < [ce] P. 4001:4501(500) ack 3 win 257
         +0 > [ect01] . 3:3(0) ack 4001
         +0 > [ect01] E. 3:3(0) ack 4501
      
      +.001 read(4, ..., 4500) = 4500
         +0 write(4, ..., 1) = 1
         +0 > [ect01] PE. 3:4(1) ack 4501 win 100
      
       +.01 < [ect0] W. 4501:5501(1000) ack 4 win 257
         // No delayed ACK on CWR flag
         +0 > [ect01] . 4:4(0) ack 5501
      
       +.31 < [ect0] . 5501:6501(1000) ack 4 win 257
         +0 > [ect01] . 4:4(0) ack 6501
      
      Fixes: 9aee4000 ("tcp: ack immediately when a cwr packet arrives")
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd2123a3
    • Yuchung Cheng's avatar
      tcp: always ACK immediately on hole repairs · 15bdd568
      Yuchung Cheng authored
      RFC 5681 sec 4.2:
        To provide feedback to senders recovering from losses, the receiver
        SHOULD send an immediate ACK when it receives a data segment that
        fills in all or part of a gap in the sequence space.
      
      When a gap is partially filled, __tcp_ack_snd_check already checks
      the out-of-order queue and correctly send an immediate ACK. However
      when a gap is fully filled, the previous implementation only resets
      pingpong mode which does not guarantee an immediate ACK because the
      quick ACK counter may be zero. This patch addresses this issue by
      marking the one-time immediate ACK flag instead.
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarWei Wang <weiwan@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15bdd568
    • Yuchung Cheng's avatar
      tcp: avoid resetting ACK timer in DCTCP · d2ccd7bc
      Yuchung Cheng authored
      The recent fix of acking immediately in DCTCP on CE status change
      has an undesirable side-effect: it also resets TCP ack timer and
      disables pingpong mode (interactive session). But the CE status
      change has nothing to do with them. This patch addresses that by
      using the new one-time immediate ACK flag instead of calling
      tcp_enter_quickack_mode().
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarWei Wang <weiwan@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2ccd7bc
    • Yuchung Cheng's avatar
      tcp: mandate a one-time immediate ACK · 466466dc
      Yuchung Cheng authored
      Add a new flag to indicate a one-time immediate ACK. This flag is
      occasionaly set under specific TCP protocol states in addition to
      the more common quickack mechanism for interactive application.
      
      In several cases in the TCP code we want to force an immediate ACK
      but do not want to call tcp_enter_quickack_mode() because we do
      not want to forget the icsk_ack.pingpong or icsk_ack.ato state.
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarWei Wang <weiwan@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      466466dc
    • Gustavo A. R. Silva's avatar
      wimax: usb-tx: mark expected switch fall-through · 8a8a894e
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Notice that in this particular case, I placed the "fall through"
      annotation at the bottom of the case, which is what GCC is expecting
      to find.
      
      Addresses-Coverity-ID: 115075 ("Missing break in switch")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8a8a894e
    • Gustavo A. R. Silva's avatar
      wimax: usb-fw: mark expected switch fall-through · 84906307
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Notice that in this particular case, I placed the "fall through"
      annotation at the bottom of the case, which is what GCC is expecting
      to find.
      
      Addresses-Coverity-ID: 1369529 ("Missing break in switch")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84906307
    • Gustavo A. R. Silva's avatar
      net: dp83640: Mark expected switch fall-throughs · d331e758
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Notice that in this particular case, I replaced the code comment at the
      top of the switch statement with a proper "fall through" annotation for
      each case, which is what GCC is expecting to find.
      
      Addresses-Coverity-ID: 1056542 ("Missing break in switch")
      Addresses-Coverity-ID: 1339579 ("Missing break in switch")
      Addresses-Coverity-ID: 1369526 ("Missing break in switch")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d331e758
    • Colin Ian King's avatar
      rxrpc: remove redundant static int 'zero' · 98ed1e64
      Colin Ian King authored
      The static int 'zero' is defined but is never used hence it is
      redundant and can be removed. The use of this variable was removed
      with commit a158bdd3 ("rxrpc: Fix call timeouts").
      
      Cleans up clang warning:
      warning: 'zero' defined but not used [-Wunused-const-variable=]
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      98ed1e64
    • zhong jiang's avatar
      drivers/net/usb/r8152: remove the unneeded variable "ret" in rtl8152_system_suspend · f741917e
      zhong jiang authored
      rtl8152_system_suspend defines the variable "ret", but it is not modified
      after initialization. So just remove it.
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f741917e
    • Vasundhara Volam's avatar
      bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c · 8605212a
      Vasundhara Volam authored
      This patch fixes following smatch warnings:
      
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for 'seg_hdr->signature' (5 vs 4)
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2858 bnxt_fill_coredump_record() error: strcpy() '"cOrE"' too large for 'record->signature' (5 vs 4)
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2879 bnxt_fill_coredump_record() error: strcpy() 'utsname()->sysname' too large for 'record->os_name' (65 vs 32)
      
      Fixes: 6c5657d0 ("bnxt_en: Add support for ethtool get dump.")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8605212a
  2. 10 Aug, 2018 18 commits
  3. 09 Aug, 2018 5 commits