Skip to content
  1. Mar 06, 2016
  2. Mar 05, 2016
  3. Mar 04, 2016
    • David Howells's avatar
      rxrpc: Clear the unused part of a sockaddr_rxrpc for memcmp() use · ab802ee0
      David Howells authored
      
      
      Clear the unused part of a sockaddr_rxrpc structs so that memcmp() can be
      used to compare them.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      ab802ee0
    • David Howells's avatar
      rxrpc: rxkad: Casts are needed when comparing be32 values · 2b15ef15
      David Howells authored
      
      
      Forced casts are needed to avoid sparse warning when directly comparing
      be32 values.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      2b15ef15
    • David Howells's avatar
      rxrpc: rxkad: The version number in the response should be net byte order · 098a2099
      David Howells authored
      
      
      The version number rxkad places in the response should be network byte
      order.
      
      Whilst we're at it, rearrange the code to be more readable.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      098a2099
    • David Howells's avatar
      rxrpc: Use ACCESS_ONCE() when accessing circular buffer pointers · ee72b9fd
      David Howells authored
      
      
      Use ACCESS_ONCE() when accessing the other-end pointer into a circular
      buffer as it's possible the other-end pointer might change whilst we're
      doing this, and if we access it twice, we might get some weird things
      happening.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      ee72b9fd
    • David Howells's avatar
      rxrpc: Adjust some whitespace and comments · b4f1342f
      David Howells authored
      
      
      Remove some excess whitespace, insert some missing spaces and adjust a
      couple of comments.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      b4f1342f
    • David Howells's avatar
      rxrpc: Be more selective about the types of received packets we accept · 351c1e64
      David Howells authored
      
      
      Currently, received RxRPC packets outside the range 1-13 are rejected.
      There are, however, holes in the range that should also be rejected - plus
      at least one type we don't yet support - so reject these also.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      351c1e64
    • David Howells's avatar
      rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtu · ee6fe085
      David Howells authored
      
      
      The upper bound of the defined range for rx_mtu is being set in the same
      member as the lower bound (extra1) rather than the correct place (extra2).
      I'm not entirely sure why this compiles.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      ee6fe085
    • David Howells's avatar
      rxrpc: The protocol family should be set to PF_RXRPC not PF_UNIX · e33b3d97
      David Howells authored
      
      
      Fix the protocol family set in the proto_ops for rxrpc to be PF_RXRPC not
      PF_UNIX.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      e33b3d97
    • David Howells's avatar
      rxrpc: Keep the skb private record of the Rx header in host byte order · 0d12f8a4
      David Howells authored
      
      
      Currently, a copy of the Rx packet header is copied into the the sk_buff
      private data so that we can advance the pointer into the buffer,
      potentially discarding the original.  At the moment, this copy is held in
      network byte order, but this means we're doing a lot of unnecessary
      translations.
      
      The reasons it was done this way are that we need the values in network
      byte order occasionally and we can use the copy, slightly modified, as part
      of an iov array when sending an ack or an abort packet.
      
      However, it seems more reasonable on review that it would be better kept in
      host byte order and that we make up a new header when we want to send
      another packet.
      
      To this end, rename the original header struct to rxrpc_wire_header (with
      BE fields) and institute a variant called rxrpc_host_header that has host
      order fields.  Change the struct in the sk_buff private data into an
      rxrpc_host_header and translate the values when filling it in.
      
      This further allows us to keep values kept in various structures in host
      byte order rather than network byte order and allows removal of some fields
      that are byteswapped duplicates.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0d12f8a4
    • David Howells's avatar
      rxrpc: Rename call events to begin RXRPC_CALL_EV_ · 4c198ad1
      David Howells authored
      
      
      Rename call event names to begin RXRPC_CALL_EV_ to distinguish them from the
      flags.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      4c198ad1
    • David Howells's avatar
      rxrpc: Convert call flag and event numbers into enums · 5b8848d1
      David Howells authored
      
      
      Convert call flag and event numbers into enums and move their definitions
      outside of the struct.
      
      Also move the call state enum outside of the struct and add an extra
      element to count the number of states.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      5b8848d1
    • David Howells's avatar
      rxrpc: Fix a case where a call event bit is being used as a flag bit · e721498a
      David Howells authored
      
      
      Fix a case where RXRPC_CALL_RELEASE (an event) is being used to specify a
      flag bit.  RXRPC_CALL_RELEASED should be used instead.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      e721498a
    • Eric Dumazet's avatar
      net: sched: use pfifo_fast for non real queues · 1f27cde3
      Eric Dumazet authored
      
      
      Some devices declare a high number of TX queues, then set a much
      lower real_num_tx_queues
      
      This cause setups using fq_codel, sfq or fq as the default qdisc to consume
      more memory than really needed.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f27cde3
    • David Ahern's avatar
      net: ipv6: Fix refcnt on host routes · 799977d9
      David Ahern authored
      Andrew and Ying Huang's test robot both reported usage count problems that
      trace back to the 'keep address on ifdown' patch.
      
      >From Andrew:
      We execute CRIU test on linux-next. On the current linux-next kernel
      they hangs on creating a network namespace.
      
      The kernel log contains many massages like this:
      [ 1036.122108] unregister_netdevice: waiting for lo to become free.
      Usage count = 2
      [ 1046.165156] unregister_netdevice: waiting for lo to become free.
      Usage count = 2
      [ 1056.210287] unregister_netdevice: waiting for lo to become free.
      Usage count = 2
      
      I tried to revert this patch and the bug disappeared.
      
      Here is a set of commands to reproduce this bug:
      
      [root@linux-next-test linux-next]# uname -a
      Linux linux-next-test 4.5.0-rc6-next-20160301+ #3 SMP Wed Mar 2
      17:32:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
      
      [root@linux-next-test ~]# unshare -n
      [root@linux-next-test ~]# ip link set up dev lo
      [root@linux-next-test ~]# ip a
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
      group default qlen 1
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      [root@linux-next-test ~]# logout
      [root@linux-next-test ~]# unshare -n
      
       -----
      
      The problem is a change made to RTM_DELADDR case in __ipv6_ifa_notify that
      was added in an early version of the offending patch and is no longer
      needed.
      
      Fixes: f1705ec1
      
       ("net: ipv6: Make address flushing on ifdown optional")
      Cc: Andrey Wagin <avagin@gmail.com>
      Cc: Ying Huang <ying.huang@linux.intel.com>
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Tested-by: default avatarJeremiah Mahler <jmmahler@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      799977d9
    • Lada Trimasova's avatar
      net: ezchip: adapt driver to little endian architecture · b54b8c2d
      Lada Trimasova authored
      
      
      Since ezchip network driver is written with big endian EZChip platform it
      is necessary to add support for little endian architecture.
      
      The first issue is that the order of the bits in a bit field is
      implementation specific. So all the bit fields are removed.
      Named constants are used to access necessary fields.
      
      And the second one is that network byte order is big endian.
      For example, data on ethernet is transmitted with most-significant
      octet (byte) first. So in case of little endian architecture
      it is important to swap data byte order when we read it from
      register. In case of unaligned access we can use "get_unaligned_be32"
      and in other case we can use function "ioread32_rep" which reads all
      data from register and works either with little endian or big endian
      architecture.
      
      And then when we are going to write data to register we need to restore
      byte order using the function "put_unaligned_be32" in case of
      unaligned access and in other case "iowrite32_rep".
      
      The last little fix is a space between type and pointer to observe
      coding style.
      
      Signed-off-by: default avatarLada Trimasova <ltrimas@synopsys.com>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Noam Camus <noamc@ezchip.com>
      Cc: Tal Zilcer <talz@ezchip.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b54b8c2d
    • Simon Horman's avatar
      sh_eth, ravb: Use ARCH_RENESAS · 274ba628
      Simon Horman authored
      
      
      Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
      
      This is part of an ongoing process to migrate from ARCH_SHMOBILE to
      ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
      appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.
      
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      274ba628
    • Arnd Bergmann's avatar
      net: mellanox: add DEVLINK dependencies · 3d1cbe83
      Arnd Bergmann authored
      
      
      The new NET_DEVLINK infrastructure can be a loadable module, but the drivers
      using it might be built-in, which causes link errors like:
      
      drivers/net/built-in.o: In function `mlx4_load_one':
      :(.text+0x2fbfda): undefined reference to `devlink_port_register'
      :(.text+0x2fc084): undefined reference to `devlink_port_unregister'
      drivers/net/built-in.o: In function `mlxsw_sx_port_remove':
      :(.text+0x33a03a): undefined reference to `devlink_port_type_clear'
      :(.text+0x33a04e): undefined reference to `devlink_port_unregister'
      
      There are multiple ways to avoid this:
      
      a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies
         for each user
      b) use 'select NET_DEVLINK' from each driver that uses it
         and hide the symbol in Kconfig.
      c) make NET_DEVLINK a 'bool' option so we don't have to
         list it as a dependency, and rely on the APIs to be
         stubbed out when it is disabled
      d) use IS_REACHABLE() rather than IS_ENABLED() to check for
         NET_DEVLINK in include/net/devlink.h
      
      This implements a variation of approach a) by adding an
      intermediate symbol that drivers can depend on, and changes
      the three drivers using it.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 09d4d087 ("mlx4: Implement devlink interface")
      Fixes: c4745500
      
       ("mlxsw: Implement devlink interface")
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d1cbe83
    • David S. Miller's avatar
      Merge branch 'for-upstream' of... · aefd3fb2
      David S. Miller authored
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      
      
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth-next 2016-03-01
      
      Here's our main set of Bluetooth & 802.15.4 patches for the 4.6 kernel.
      
       - New Bluetooth HCI driver for Intel/AG6xx controllers
       - New Broadcom ACPI IDs
       - LED trigger support for indicating Bluetooth powered state
       - Various fixes in mac802154, 6lowpan and related drivers
       - New USB IDs for AR3012 Bluetooth controllers
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aefd3fb2
    • John Fastabend's avatar
      net: relax setup_tc ndo op handle restriction · 5eb4dce3
      John Fastabend authored
      I added this check in setup_tc to multiple drivers,
      
       if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
      
      Unfortunately restricting to TC_H_ROOT like this breaks the old
      instantiation of mqprio to setup a hardware qdisc. This patch
      relaxes the test to only check the type to make it equivalent
      to the check before I broke it. With this the old instantiation
      continues to work.
      
      A good smoke test is to setup mqprio with,
      
      # tc qdisc add dev eth4 root mqprio num_tc 8 \
        map 0 1 2 3 4 5 6 7 \
        queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7
      
      Fixes: e4c6734e
      
       ("net: rework ndo tc op to consume additional qdisc handle paramete")
      Reported-by: default avatarSingh Krishneil <krishneil.k.singh@intel.com>
      Reported-by: default avatarJake Keller <jacob.e.keller@intel.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Shradha Shah <sshah@solarflare.com>
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Don Skidmore <donald.c.skidmore@intel.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5eb4dce3
    • Miaoqing Pan's avatar
      ath9k: clear bb filter calibration power threshold · 25c0f301
      Miaoqing Pan authored
      
      
      JP WiFi certification for bandwidth of channel 14 failed, the OBW
      is lower than the requirement. Clear the bb filter calibration power
      threshold to increase OBW(+2). The fix only for qca9531 chip now.
      
      Signed-off-by: default avatarMiaoqing Pan <miaoqing@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      25c0f301
    • Arnd Bergmann's avatar
      ath9k: reduce stack usage in ar9003_aic_cal_post_process · e9a26010
      Arnd Bergmann authored
      
      
      In some configurations, this function uses more than the warning limit
      of 1024 bytes:
      
      drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process':
      drivers/net/wireless/ath/ath9k/ar9003_aic.c:434:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      It turns out that there are two large arrays on the stack here, but
      almost all the data in them is never used outside of the loop in
      which it gets written, so we can replace the array with a single
      instance.
      
      The .valid flag is used later, so I'm replacing the array of structures
      with an array of bools. An obvious follow-up optimization would be
      to replace it with a bitmask and set_bit()/find_first_bit()/
      find_last_bit()/... operations. However, I have not tested this patch,
      so I sticked to the simpler transformation that does the job of
      reducing the stack usage to a harmless level.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      e9a26010
    • Miaoqing Pan's avatar
      ath9k: make NF load complete quickly and reliably · 82def495
      Miaoqing Pan authored
      
      
      Make NF load complete quickly and reliably. NF load execution
      is delayed by HW to end of frame if frame Rx or Tx is ongoing.
      Increasing timeout to max frame duration. If NF cal is ongoing
      before NF load, stop it before load, and restart it afterwards.
      
      Signed-off-by: default avatarMiaoqing Pan <miaoqing@codeaurora.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      82def495