1. 11 Feb, 2019 3 commits
    • Johannes Berg's avatar
      cfg80211: fix and clean up cfg80211_gen_new_bssid() · 5d4071ab
      Johannes Berg authored
      Fix cfg80211_gen_new_bssid() to not rely on u64 modulo arithmetic,
      which isn't needed since we really just want to mask there. Also,
      clean it up to calculate the mask only once and use GENMASK_ULL()
      instead of open-coding the mask calculation.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5d4071ab
    • Jouni Malinen's avatar
      cfg80211: Use const more consistently in for_each_element macros · 7388afe0
      Jouni Malinen authored
      Enforce the first argument to be a correct type of a pointer to struct
      element and avoid unnecessary typecasts from const to non-const pointers
      (the change in validate_ie_attr() is needed to make this part work). In
      addition, avoid signed/unsigned comparison within for_each_element() and
      mark struct element packed just in case.
      Signed-off-by: default avatarJouni Malinen <j@w1.fi>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      7388afe0
    • Johannes Berg's avatar
      cfg80211: restore regulatory without calling userspace · e646a025
      Johannes Berg authored
      Jouni reports that in some cases it is possible that getting
      disconnected (or stopping AP, after previous patches) results
      in further operations hitting the window within the regulatory
      core restoring the regdomain to the defaults. The reason for
      this is that we have to call out to CRDA or otherwise do some
      asynchronous work, and thus can't do the restore atomically.
      
      However, we've previously seen all the data we need to do the
      restore, so we can hang on to that data and use it later for
      the restore. This makes the whole thing happen within a single
      locked section and thus atomic.
      
      However, we can't *always* do this - there are unfortunately
      cases where the restore needs to re-request, because this is
      also used (abused?) as an error recovery process, so make the
      new behaviour optional and only use it when doing a regular
      restore as described above.
      Reported-by: default avatarJouni Malinen <j@w1.fi>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      e646a025
  2. 08 Feb, 2019 21 commits
  3. 05 Feb, 2019 9 commits
  4. 04 Feb, 2019 7 commits
    • David S. Miller's avatar
      Merge branch 'sh_eth-implement-simple-RX-checksum-offload' · d3ab9df5
      David S. Miller authored
      Sergei Shtylyov says:
      
      ====================
      sh_eth: implement simple RX checksum offload
      
      Here's a set of 7 patches against DaveM's 'net-next.git' repo. I'm implemeting
      the simple RX checksum offload (like was done for the 'ravb' driver by Simon
      Horman); it has been only tested on the R8A7740 and R8A77980 SoCs, the other
      SoCs should just work (according to their manuals)...
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3ab9df5
    • Sergei Shtylyov's avatar
      sh_eth: offload RX checksum on SH7763 · 997feb11
      Sergei Shtylyov authored
      The SH7763 SoC manual describes the Ether MAC's RX checksum offload
      the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      997feb11
    • Sergei Shtylyov's avatar
      sh_eth: offload RX checksum on SH7734 · 06240e1b
      Sergei Shtylyov authored
      The SH7734 SoC manual describes the Ether MAC's RX checksum offload
      the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06240e1b
    • Sergei Shtylyov's avatar
      sh_eth: offload RX checksum on R8A77980 · 0da843ad
      Sergei Shtylyov authored
      The R-Car V3H (R8A77980) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MAC...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0da843ad
    • Sergei Shtylyov's avatar
      sh_eth: offload RX checksum on R8A7740 · 040c16fd
      Sergei Shtylyov authored
      The R-Mobile A1 (R8A7740) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MAC...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      040c16fd
    • Sergei Shtylyov's avatar
      sh_eth: offload RX checksum on R7S72100 · 48132cd0
      Sergei Shtylyov authored
      The RZ/A1H (R7S721000) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48132cd0
    • Sergei Shtylyov's avatar
      sh_eth: RX checksum offload support · f8e022db
      Sergei Shtylyov authored
      Add support for the RX checksum offload. This is enabled by default and
      may be disabled and re-enabled using 'ethtool':
      
      # ethtool -K eth0 rx off
      # ethtool -K eth0 rx on
      
      Some Ether MACs provide a simple checksumming scheme which appears to be
      completely compatible with CHECKSUM_COMPLETE: sum of all packet data after
      the L2 header is appended to packet data; this may be trivially read by
      the driver and used to update the skb accordingly. The same checksumming
      scheme is implemented in the EtherAVB MACs and now supported by the 'ravb'
      driver.
      
      In terms of performance, throughput is close to gigabit line rate with the
      RX checksum offload both enabled and disabled.  The 'perf' output, however,
      appears to indicate that significantly less time is spent in do_csum() --
      this is as expected.
      
      Test results with RX checksum offload enabled:
      
      ~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
      TCP MAERTS TEST to 192.168.2.4
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
      131072  16384  16384    10.01     933.93
      [ perf record: Woken up 8 times to write data ]
      [ perf record: Captured and wrote 1.955 MB perf.data (41940 samples) ]
      ~/netperf-2.2pl4# perf report
      Samples: 41K of event 'cycles:ppp', Event count (approx.): 9915302763
      Overhead  Command          Shared Object             Symbol
         9.44%  netperf          [kernel.kallsyms]         [k] __arch_copy_to_user
         7.75%  swapper          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
         6.31%  swapper          [kernel.kallsyms]         [k] default_idle_call
         5.89%  swapper          [kernel.kallsyms]         [k] arch_cpu_idle
         4.37%  swapper          [kernel.kallsyms]         [k] tick_nohz_idle_exit
         4.02%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
         2.52%  netperf          [kernel.kallsyms]         [k] preempt_count_sub
         1.81%  netperf          [kernel.kallsyms]         [k] tcp_recvmsg
         1.80%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irqres
         1.78%  netperf          [kernel.kallsyms]         [k] preempt_count_add
         1.36%  netperf          [kernel.kallsyms]         [k] __tcp_transmit_skb
         1.20%  netperf          [kernel.kallsyms]         [k] __local_bh_enable_ip
         1.10%  netperf          [kernel.kallsyms]         [k] sh_eth_start_xmit
      
      Test results with RX checksum offload disabled:
      
      ~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
      TCP MAERTS TEST to 192.168.2.4
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      131072  16384  16384    10.01     932.04
      [ perf record: Woken up 14 times to write data ]
      [ perf record: Captured and wrote 3.642 MB perf.data (78817 samples) ]
      ~/netperf-2.2pl4# perf report
      Samples: 78K of event 'cycles:ppp', Event count (approx.): 18091442796
      Overhead  Command          Shared Object       Symbol
         7.00%  swapper          [kernel.kallsyms]   [k] do_csum
         3.94%  swapper          [kernel.kallsyms]   [k] sh_eth_poll
         3.83%  ksoftirqd/0      [kernel.kallsyms]   [k] do_csum
         3.23%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
         2.87%  netperf          [kernel.kallsyms]   [k] __arch_copy_to_user
         2.86%  swapper          [kernel.kallsyms]   [k] arch_cpu_idle
         2.13%  swapper          [kernel.kallsyms]   [k] default_idle_call
         2.12%  ksoftirqd/0      [kernel.kallsyms]   [k] sh_eth_poll
         2.02%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
         1.84%  swapper          [kernel.kallsyms]   [k] __softirqentry_text_start
         1.64%  swapper          [kernel.kallsyms]   [k] tick_nohz_idle_exit
         1.53%  netperf          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
         1.32%  netperf          [kernel.kallsyms]   [k] preempt_count_sub
         1.27%  swapper          [kernel.kallsyms]   [k] __pi___inval_dcache_area
         1.22%  swapper          [kernel.kallsyms]   [k] check_preemption_disabled
         1.01%  ksoftirqd/0      [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
      
      The above results collected on the R-Car V3H Starter Kit board.
      
      Based on the commit 4d86d381 ("ravb: RX checksum offload")...
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8e022db