1. 09 Jun, 2015 6 commits
  2. 01 Jun, 2015 2 commits
    • Michal Kazior's avatar
      ath10k: fix possible ps sleep crash · 0bcbbe67
      Michal Kazior authored
      If probing failed pci sleep timer could remain
      running and trigger after ath10k structures were
      freed causing invalid pointer dereference:
      
       BUG: unable to handle kernel paging request at ffffc90001c80004
       IP: [<ffffffff81354728>] iowrite32+0x38/0x40
       ...
       Call Trace:
        <IRQ>
        [<ffffffffa00da048>] ? __ath10k_pci_sleep+0x48/0x60 [ath10k_pci]
        [<ffffffffa00da44e>] ath10k_pci_ps_timer+0x5e/0x80 [ath10k_pci]
        [<ffffffff810b210e>] call_timer_fn+0x3e/0x120
        [<ffffffffa00da3f0>] ? ath10k_pci_wake+0x150/0x150 [ath10k_pci]
        [<ffffffff810b3d11>] run_timer_softirq+0x201/0x2e0
        [<ffffffff8105d73f>] __do_softirq+0xaf/0x290
        [<ffffffff8105da95>] irq_exit+0x95/0xa0
        [<ffffffff81950406>] smp_apic_timer_interrupt+0x46/0x60
        [<ffffffff8194e77e>] apic_timer_interrupt+0x6e/0x80
      
      Fixes: 77258d40 ("ath10k: enable pci soc powersaving")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      0bcbbe67
    • Rajkumar Manoharan's avatar
      ath10k: bypass PLL setting on target init for QCA9888 · 163f5264
      Rajkumar Manoharan authored
      Some of of qca988x solutions are having global reset issue
      during target initialization. Bypassing PLL setting before
      downloading firmware and letting the SoC run on REF_CLK is fixing
      the problem. Corresponding firmware change is also needed to set
      the clock source once the target is initialized. Since 10.2.4
      firmware is having this ROM patch, applying skip_clock_init only
      for 10.2.4 firmware versions.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      163f5264
  3. 29 May, 2015 4 commits
    • Michal Kazior's avatar
      ath10k: add missing firmware declarations · e451c1db
      Michal Kazior authored
      This could lead userspace initram images getting
      built without necessary firmware files included
      leading to probing failures of ath10k on boot with
      QCA61X4.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      e451c1db
    • Michal Kazior's avatar
      ath10k: fix inconsistent survey reports · 44b7d483
      Michal Kazior authored
      In some cases some channel survey data was
      reported incorrect.
      
      Channel info events were expected to come in pairs
      without and with COMPLETE flag set respectively
      for each channel visit during scan.
      
      The known deviation from this is rule for last
      scan chan info and first (next) scan chan info
      both have COMPLETE flag set. This was either
      programmed with the intent of providing BSS cycle
      count info or this is an artefact of firmware scan
      state machine. Either way this is useless due to
      short wraparound time, wraparound quirks and no
      overflow notification.
      
      Survey dumps now include only data gathered during
      scan channel visits that can be computed
      correctly.
      
      This should improve hostapd ACS a little bit.
      Reported-by: default avatarSrinivasa Duvvuri <sduvvuri@chromium.org>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      44b7d483
    • Michal Kazior's avatar
      ath10k: handle cycle counter wraparound · 587f7031
      Michal Kazior authored
      When QCA988X cycle counter HW register wraps
      around it resets to 0x7fffffff instead of 0. All
      other cycle counter related registers are divided
      by 2 so they never wraparound themselves. QCA61X4
      has a uniform CC and it wraparounds in a regular
      fashion though.
      
      Worst case wraparound time is approx 24 seconds
      (2**31 / 88MHz). Since scan channel visit times
      are max 5 seconds (offchannel case) it is
      guaranteed there's been at most 1 wraparound and
      it is possible to compute survey active time
      value. It is, however, impossible to determine the
      point at which Rx Clear Count has been divided by
      two so it is not reported upon wraparound.
      
      This fixes some occasional incorrect survey data
      on QCA988X as some channels (depending on how/when
      scan/offchannel requests were requested) would
      have approx 24 sec active time which wasn't
      actually the case.
      
      This should improve hostapd ACS a little bit.
      Reported-by: default avatarSrinivasa Duvvuri <sduvvuri@chromium.org>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      587f7031
    • Michal Kazior's avatar
      ath10k: move cycle_count macro · 0936ea3f
      Michal Kazior authored
      The macro isn't WMI specific. Instead it is
      related to hardware chip so move the macro
      accordingly. While at it document the magic value.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      0936ea3f
  4. 25 May, 2015 22 commits
  5. 23 May, 2015 6 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 36583eb5
      David S. Miller authored
      Conflicts:
      	drivers/net/ethernet/cadence/macb.c
      	drivers/net/phy/phy.c
      	include/linux/skbuff.h
      	net/ipv4/tcp.c
      	net/switchdev/switchdev.c
      
      Switchdev was a case of RTNH_H_{EXTERNAL --> OFFLOAD}
      renaming overlapping with net-next changes of various
      sorts.
      
      phy.c was a case of two changes, one adding a local
      variable to a function whilst the second was removing
      one.
      
      tcp.c overlapped a deadlock fix with the addition of new tcp_info
      statistic values.
      
      macb.c involved the addition of two zyncq device entries.
      
      skbuff.h involved adding back ipv4_daddr to nf_bridge_info
      whilst net-next changes put two other existing members of
      that struct into a union.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36583eb5
    • David S. Miller's avatar
      Merge branch 'pktgen-new-scripts' · fa7912be
      David S. Miller authored
      Jesper Dangaard Brouer says:
      
      ====================
      pktgen: cleanups and introducing new samples/pktgen scripts
      
      v3:
       - Aborted v2 send due it was not generating diff stat
         (this is a bug in stg-mail, if not in the root directory)
      
      v2: address nitpicks from Cong Wang
       - Remove useless cat's, but keep them for old pgset()
       - Comment on: Due to pgctrl, cannot use exit code $? from grep
       - Use arithmetic compare in pktgen_sample03_burst_single_flow.sh
      
      This patchset is focused on making pktgen easier to use and better
      documented. It contains a number of documentation updates and minor
      changes to pktgen.  The major contribution is introduction of common
      helper function for sample scripts.
      
      Instead of the old pgset() function, three new shell functions for
      configuring the different components of pktgen are introduced:
       pg_ctrl(), pg_thread() and pg_set().
      
      The new functions correspond to pktgens different components.
       * pg_ctrl()   control "pgctrl" (/proc/net/pktgen/pgctrl)
       * pg_thread() control the kernel threads and binding to devices
       * pg_set()    control setup of individual devices
      
      Helpers also provide consistent parameter parsing across the sample
      scripts.
      
      Usage example:
       ./pktgen_sample01_simple.sh -i eth41 -m 00:12:C0:02:AC:5A -d 192.168.41.2
      
      Usage: ./pktgen_sample01_simple.sh [-vx] -i ethX
        -i : ($DEV)       output interface/device (required)
        -s : ($PKT_SIZE)  packet size
        -d : ($DEST_IP)   destination IP
        -m : ($DST_MAC)   destination MAC-addr
        -t : ($THREADS)   threads to start
        -c : ($SKB_CLONE) SKB clones send before alloc new SKB
        -b : ($BURST)     HW level bursting of SKBs
        -v : ($VERBOSE)   verbose
        -x : ($DEBUG)     debug
      
      These scripts are borrowed from:
       https://github.com/netoptimizer/network-testing/tree/master/pktgen
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa7912be
    • Jesper Dangaard Brouer's avatar
      pktgen: add benchmark script pktgen_bench_xmit_mode_netif_receive.sh · 05a14d5e
      Jesper Dangaard Brouer authored
      This script pktgen_bench_xmit_mode_netif_receive.sh is a benchmark
      script, which can be used for benchmarking part of the network stack.
      This can be used for performance improving or catching regression in
      that area.
      
      The script is developed for benchmarking ingress qdisc path, original
      idea by Alexei Starovoitov.  This script don't really need any
      hardware.  This is achieved via the recently introduced stack inject
      feature "xmit_mode netif_receive". See commit 62f64aed ("pktgen:
      introduce xmit_mode '<start_xmit|netif_receive>'").
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05a14d5e
    • Jesper Dangaard Brouer's avatar
      pktgen: add sample script pktgen_sample03_burst_single_flow.sh · 1d73ba16
      Jesper Dangaard Brouer authored
      Add the pktgen samples script pktgen_sample03_burst_single_flow.sh
      that demonstrates how to acheive maximum performance.
      
      If correctly tuned[1] single CPU 10Gbit/s wirespeed small pkts is
      possible[2] which is 14.88Mpps.  The trick is to take advantage of the
      "burst" feature introduced in commit 38b2cf29 ("net: pktgen:
      packet bursting via skb->xmit_more").
      
      [1] http://netoptimizer.blogspot.dk/2014/06/pktgen-for-network-overload-testing.html
      [2] http://netoptimizer.blogspot.dk/2014/10/unlocked-10gbps-tx-wirespeed-smallest.htmlSigned-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d73ba16
    • Jesper Dangaard Brouer's avatar
      pktgen: add sample script pktgen_sample02_multiqueue.sh · 282fb589
      Jesper Dangaard Brouer authored
      Add the pktgen samples script pktgen_sample02_multiqueue.sh that
      demonstrates generating packets on multiqueue NICs.
      
      Specifically notice the options "-t" that specifies how many
      kernel threads to activate.  Also notice the flag QUEUE_MAP_CPU,
      which cause the SKB TX queue to be mapped to the CPU running the
      kernel thread.  For best scalability people are also encourage to
      map NIC IRQ /proc/irq/*/smp_affinity to CPU number.
      
      Usage example with "-t" 4 threads and help:
       ./pktgen_sample02_multiqueue.sh -i eth4 -m 00:1B:21:3C:9D:F8 -t 4
      
      Usage: ./pktgen_sample02_multiqueue.sh [-vx] -i ethX
        -i : ($DEV)       output interface/device (required)
        -s : ($PKT_SIZE)  packet size
        -d : ($DEST_IP)   destination IP
        -m : ($DST_MAC)   destination MAC-addr
        -t : ($THREADS)   threads to start
        -c : ($SKB_CLONE) SKB clones send before alloc new SKB
        -b : ($BURST)     HW level bursting of SKBs
        -v : ($VERBOSE)   verbose
        -x : ($DEBUG)     debug
      
      Removing pktgen.conf-2-1 and pktgen.conf-2-2 as these examples
      should be covered now.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      282fb589
    • Jesper Dangaard Brouer's avatar
      pktgen: add sample script pktgen_sample01_simple.sh · 6f094797
      Jesper Dangaard Brouer authored
      Add the first basic pktgen samples script pktgen_sample01_simple.sh,
      which demonstrates the a simple use of the helper functions.
      Removing pktgen.conf-1-1 as that example should be covered now.
      
      The naming scheme pktgen_sampleNN, where NN is a number, should encourage
      reading the samples in a specific order.
      
      Script cause pktgen sending with a single thread and single interface,
      and introduce flow variation via random UDP source port.
      
      Usage example and help:
       ./pktgen_sample01_simple.sh -i eth4 -m 00:1B:21:3C:9D:F8 -d 192.168.8.2
      
      Usage: ./pktgen_sample01_simple.sh [-vx] -i ethX
        -i : ($DEV)       output interface/device (required)
        -s : ($PKT_SIZE)  packet size
        -d : ($DEST_IP)   destination IP
        -m : ($DST_MAC)   destination MAC-addr
        -c : ($SKB_CLONE) SKB clones send before alloc new SKB
        -v : ($VERBOSE)   verbose
        -x : ($DEBUG)     debug
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f094797