1. 15 Nov, 2016 6 commits
    • Toke Høiland-Jørgensen's avatar
      ath9k: Switch to using mac80211 intermediate software queues. · 50f08edf
      Toke Høiland-Jørgensen authored
      This switches ath9k over to using the mac80211 intermediate software
      queueing mechanism for data packets. It removes the queueing inside the
      driver, except for the retry queue, and instead pulls from mac80211 when
      a packet is needed. The retry queue is used to store a packet that was
      pulled but can't be sent immediately.
      
      The old code path in ath_tx_start that would queue packets has been
      removed completely, as has the qlen limit tunables (since there's no
      longer a queue in the driver to limit).
      
      The mac80211 intermediate software queues offer significant latency
      reductions, and this patch allows ath9k to realise them. The exact gains
      from this varies with the test scenario, but in an access point scenario
      we have seen latency reductions ranging from 1/3 to as much as an order
      of magnitude. We also achieve slightly better aggregation.
      
      Median latency (ping) figures with this patch applied at the access point,
      with two high-rate stations and one low-rate station (HT20 5Ghz), running
      a Flent rtt_fair_var_up test with one TCP flow and one ping flow going to
      each station:
      
                                       Fast station        Slow station
      Default pfifo_fast qdisc:            430.4 ms            638.7 ms
      fq_codel qdisc on iface:              35.5 ms            211.8 ms
      This patch set:                       22.4 ms             38.2 ms
      
      Median aggregation sizes over the same test:
      
      Default pfifo_fast qdisc:            9.5 pkts            1.9 pkts
      fq_codel qdisc on iface:            11.2 pkts            1.9 pkts
      This patch set:                     13.9 pkts            1.9 pkts
      
      This patch is based on Tim's original patch set, but reworked quite
      thoroughly.
      
      Cc: Tim Shepard <shep@alum.mit.edu>
      Cc: Felix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      50f08edf
    • Colin Ian King's avatar
      ath9k_htc: fix minor mistakes in dev_err messages · 14acebc3
      Colin Ian King authored
      Add missing space in a dev_err message and join wrapped text so
      it does not span multiple lines.  Fix spelling mistake on "unknown".
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      14acebc3
    • Martin Blumenstingl's avatar
      ath9k: parse the device configuration from an OF node · 138b4125
      Martin Blumenstingl authored
      This allows setting the MAC address and specifying that the firmware
      will be requested from userspace (because there might not be a hardware
      EEPROM connected to the chip) for ath9k based PCI devices using
      the device tree.
      
      There is some out-of-tree code to "convert devicetree to
      ath9k_platform_data" (for example in OpenWrt and LEDE) which becomes
      obsolete with this patch.
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      138b4125
    • Martin Blumenstingl's avatar
      ath9k: add a helper to get the string representation of ath_bus_type · b40ded2a
      Martin Blumenstingl authored
      This can be used when the ath_bus_type has to be presented in a log
      message or firmware filename.
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      b40ded2a
    • Martin Blumenstingl's avatar
      Documentation: dt: net: add ath9k wireless device binding · fc383ffd
      Martin Blumenstingl authored
      Add documentation how devicetree can be used to configure ath9k based
      devices.
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      fc383ffd
    • Vittorio Gambaletta (VittGam)'s avatar
      ath9k: Really fix LED polarity for some Mini PCI AR9220 MB92 cards. · 79e57dd1
      Vittorio Gambaletta (VittGam) authored
      The active_high LED of my Wistron DNMA-92 is still being recognized as
      active_low on 4.7.6 mainline. When I was preparing my former commit
      0f9edcdd ("ath9k: Fix LED polarity for some Mini PCI AR9220 MB92
      cards.") to fix that I must have somehow messed up with testing, because
      I tested the final version of that patch before sending it, and it was
      apparently working; but now it is not working on 4.7.6 mainline.
      
      I initially added the PCI_DEVICE_SUB section for 0x0029/0x2096 above the
      PCI_VDEVICE section for 0x0029; but then I moved the former below the
      latter after seeing how 0x002A sections were sorted in the file.
      
      This turned out to be wrong: if a generic PCI_VDEVICE entry (that has
      both subvendor and subdevice IDs set to PCI_ANY_ID) is put before a more
      specific one (PCI_DEVICE_SUB), then the generic PCI_VDEVICE entry will
      match first and will be used.
      
      With this patch, 0x0029/0x2096 has finally got active_high LED on 4.7.6.
      
      While I'm at it, let's fix 0x002A too by also moving its generic definition
      below its specific ones.
      
      Fixes: 0f9edcdd ("ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.")
      Cc: <stable@vger.kernel.org> #4.7+
      Signed-off-by: default avatarVittorio Gambaletta <linuxbugs@vittgam.net>
      [kvalo@qca.qualcomm.com: improve the commit log based on email discussions]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      79e57dd1
  2. 09 Nov, 2016 1 commit
  3. 27 Oct, 2016 1 commit
  4. 26 Oct, 2016 17 commits
  5. 23 Oct, 2016 11 commits
  6. 22 Oct, 2016 4 commits
    • David S. Miller's avatar
      Merge branch 'bpf-numa-id' · 67dc1596
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      Add BPF numa id helper
      
      This patch set adds a helper for retrieving current numa node
      id and a test case for SO_REUSEPORT.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67dc1596
    • Daniel Borkmann's avatar
      reuseport, bpf: add test case for bpf_get_numa_node_id · 3c2c3c16
      Daniel Borkmann authored
      The test case is very similar to reuseport_bpf_cpu, only that here
      we select socket members based on current numa node id.
      
        # numactl -H
        available: 2 nodes (0-1)
        node 0 cpus: 0 1 2 3 4 5 12 13 14 15 16 17
        node 0 size: 128867 MB
        node 0 free: 120080 MB
        node 1 cpus: 6 7 8 9 10 11 18 19 20 21 22 23
        node 1 size: 96765 MB
        node 1 free: 87504 MB
        node distances:
        node   0   1
          0:  10  20
          1:  20  10
      
        # ./reuseport_bpf_numa
        ---- IPv4 UDP ----
        send node 0, receive socket 0
        send node 1, receive socket 1
        send node 1, receive socket 1
        send node 0, receive socket 0
        ---- IPv6 UDP ----
        send node 0, receive socket 0
        send node 1, receive socket 1
        send node 1, receive socket 1
        send node 0, receive socket 0
        ---- IPv4 TCP ----
        send node 0, receive socket 0
        send node 1, receive socket 1
        send node 1, receive socket 1
        send node 0, receive socket 0
        ---- IPv6 TCP ----
        send node 0, receive socket 0
        send node 1, receive socket 1
        send node 1, receive socket 1
        send node 0, receive socket 0
        SUCCESS
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c2c3c16
    • Daniel Borkmann's avatar
      bpf: add helper for retrieving current numa node id · 2d0e30c3
      Daniel Borkmann authored
      Use case is mainly for soreuseport to select sockets for the local
      numa node, but since generic, lets also add this for other networking
      and tracing program types.
      Suggested-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2d0e30c3
    • David S. Miller's avatar
      Merge branch 'udpmem' · a10b91b8
      David S. Miller authored
      Paolo Abeni says:
      
      ====================
      udp: refactor memory accounting
      
      This patch series refactor the udp memory accounting, replacing the
      generic implementation with a custom one, in order to remove the needs for
      locking the socket on the enqueue and dequeue operations. The socket backlog
      usage is dropped, as well.
      
      The first patch factor out pieces of some queue and memory management
      socket helpers, so that they can later be used by the udp memory accounting
      functions.
      The second patch adds the memory account helpers, without using them.
      The third patch replacse the old rx memory accounting path for udp over ipv4 and
      udp over ipv6. In kernel UDP users are updated, as well.
      
      The memory accounting schema is described in detail in the individual patch
      commit message.
      
      The performance gain depends on the specific scenario; with few flows (and
      little contention in the original code) the differences are in the noise range,
      while with several flows contending the same socket, the measured speed-up
      is relevant (e.g. even over 100% in case of extreme contention)
      
      Many thanks to Eric Dumazet for the reiterated reviews and suggestions.
      
      v5 -> v6:
       - do not orphan the skb on enqueue, skb_steal_sock() already did
         the work for us
      
      v4 -> v5:
       - use the receive queue spin lock to protect the memory accounting
       - several minor clean-up
      
      v3 -> v4:
       - simplified the locking schema, always use a plain spinlock
      
      v2 -> v3:
       - do not set the now unsed backlog_rcv callback
      
      v1 -> v2:
       - changed slighly the memory accounting schema, we now perform lazy reclaim
       - fixed forward_alloc updating issue
       - fixed memory counter integer overflows
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a10b91b8