1. 01 Jun, 2015 18 commits
  2. 31 May, 2015 22 commits
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · a9ab2184
      David S. Miller authored
      Antonio Quartulli says:
      
      ====================
      Included changes:
      - checkpatch fixes
      - code cleanup
      - debugfs component is now compiled only if DEBUG_FS is selected
      - update copyright years
      - disable by default not-so-user-safe features
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9ab2184
    • Alexei Starovoitov's avatar
      bpf: add missing rcu protection when releasing programs from prog_array · abf2e7d6
      Alexei Starovoitov authored
      Normally the program attachment place (like sockets, qdiscs) takes
      care of rcu protection and calls bpf_prog_put() after a grace period.
      The programs stored inside prog_array may not be attached anywhere,
      so prog_array needs to take care of preserving rcu protection.
      Otherwise bpf_tail_call() will race with bpf_prog_put().
      To solve that introduce bpf_prog_put_rcu() helper function and use
      it in 3 places where unattached program can decrement refcnt:
      closing program fd, deleting/replacing program in prog_array.
      
      Fixes: 04fd61ab ("bpf: allow bpf programs to tail-call other bpf programs")
      Reported-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      abf2e7d6
    • David S. Miller's avatar
      Merge branch 'hv_netvsc-next' · d1f5f2bb
      David S. Miller authored
      K. Y. Srinivasan says:
      
      ====================
      hv_netvsc: Implement NUMA aware memory allocation
      
      Allocate both receive buffer and send buffer from the NUMA node assigned to the
      primary channel.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1f5f2bb
    • K. Y. Srinivasan's avatar
      hv_netvsc: Allocate the sendbuf in a NUMA aware way · 5defde59
      K. Y. Srinivasan authored
      Allocate the send buffer in a NUMA aware way.
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5defde59
    • K. Y. Srinivasan's avatar
      hv_netvsc: Allocate the receive buffer from the correct NUMA node · 0a726c2b
      K. Y. Srinivasan authored
      Allocate the receive bufer from the NUMA node assigned to the primary
      channel.
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a726c2b
    • Wang Long's avatar
      netevent: remove automatic variable in register_netevent_notifier() · 282c320d
      Wang Long authored
      Remove automatic variable 'err' in register_netevent_notifier() and
      return the result of atomic_notifier_chain_register() directly.
      Signed-off-by: default avatarWang Long <long.wanglong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      282c320d
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 583d3f5a
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next, they are:
      
      1) default CONFIG_NETFILTER_INGRESS to y for easier compile-testing of all
         options.
      
      2) Allow to bind a table to net_device. This introduces the internal
         NFT_AF_NEEDS_DEV flag to perform a mandatory check for this binding.
         This is required by the next patch.
      
      3) Add the 'netdev' table family, this new table allows you to create ingress
         filter basechains. This provides access to the existing nf_tables features
         from ingress.
      
      4) Kill unused argument from compat_find_calc_{match,target} in ip_tables
         and ip6_tables, from Florian Westphal.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      583d3f5a
    • David S. Miller's avatar
      Merge branch 'systemport-next' · 5289e4a0
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: systemport: misc improvements
      
      These patches are highly inspired by changes from Petri on bcmgenet, last patch
      is a misc fix that I had pending for a while, but is not a candidate for 'net'
      at this point.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5289e4a0
    • Florian Fainelli's avatar
      net: systemport: Add a check for oversized packets · 25977ac7
      Florian Fainelli authored
      Occasionnaly we may get oversized packets from the hardware which exceed
      the nomimal 2KiB buffer size we allocate SKBs with. Add an early check
      which drops the packet to avoid invoking skb_over_panic() and move on to
      processing the next packet.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25977ac7
    • Florian Fainelli's avatar
      net: systemport: rewrite bcm_sysport_rx_refill · c73b0183
      Florian Fainelli authored
      Currently, bcm_sysport_desc_rx() calls bcm_sysport_rx_refill() at the end of Rx
      packet processing loop, after the current Rx packet has already been passed to
      napi_gro_receive(). However, bcm_sysport_rx_refill() might fail to allocate a new
      Rx skb, thus leaving a hole on the Rx queue where no valid Rx buffer exists.
      
      To eliminate this situation:
      
      1. Rewrite bcm_sysport_rx_refill() to retain the current Rx skb on the
      Rx queue if a new replacement Rx skb can't be allocated and DMA-mapped.
      In this case, the data on the current Rx skb is effectively dropped.
      
      2. Modify bcm_sysport_desc_rx() to call bcm_sysport_rx_refill() at the
      top of Rx packet processing loop, so that the new replacement Rx skb is
      already in place before the current Rx skb is processed.
      
      This is loosely inspired from d6707bec ("net: bcmgenet: rewrite
      bcmgenet_rx_refill()")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c73b0183
    • Florian Fainelli's avatar
      net: systemport: Pre-calculate and utilize cb->bd_addr · baf387a8
      Florian Fainelli authored
      There is a 1:1 mapping between the software maintained control block in
      priv->rx_cbs and the buffer address in priv->rx_bds, such that there is
      no need to keep computing the buffer address when refiling a control
      block.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      baf387a8
    • Julia Lawall's avatar
      ipv6: drop unneeded goto · 3d2f6d41
      Julia Lawall authored
      Delete jump to a label on the next line, when that label is not
      used elsewhere.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier l;
      @@
      
      -if (...) goto l;
      -l:
      // </smpl>
      
      Also remove the unnecessary ret variable.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d2f6d41
    • Arnd Bergmann's avatar
      net: thunderx: add 64-bit dependency · 5e9615bf
      Arnd Bergmann authored
      The thunderx ethernet driver fails to build on architectures
      that do not have an atomic readq() and writeq() function for
      64-bit PCI bus access:
      
      drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_reg_read':
      include/asm-generic/io.h:195:23: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]
      
      It seems impossible to get this driver to work on most 32-bit
      hardware, so it's better to add an explicit dependency, in
      order to let us keep building 'allmodconfig' kernels on
      all architectures.
      
      As the driver is meant for the internal hardware on an arm64 SoC, this
      is not a problem for usability. Allowing the build on all 64-bit
      architectures rather than just CONFIG_ARM64 on the other hand means that
      we get the benefit of build testing on x86.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e9615bf
    • David S. Miller's avatar
      Merge branch 'mlx4-next' · d9dca9cb
      David S. Miller authored
      Or Gerlitz says:
      
      ====================
      mlx4 driver update, May 28, 2015
      
      The 1st patch fixes an issue with a function running DPDK overriding
      broadcast steering rules set by other functions. Please add this one
      to your -stable queue.
      
      The rest of the series from Matan and Ido deals with scaling the number
      of IRQs that serve RoCE applications to be in par with the Ethernet driver.
      
      changes from V0:
       - addressed feedback from Sergei, removed extra blank line in patch #4
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9dca9cb
    • Matan Barak's avatar
      net/mlx4_core: Make sure there are no pending async events when freeing CQ · 6d90aa5c
      Matan Barak authored
      When freeing a CQ, we need to make sure there are no
      asynchronous events (on the ASYNC EQ) that could
      relate to this CQ before freeing it.
      
      This is done by introducing synchronize_irq.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarIdo Shamay <idos@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d90aa5c
    • Ido Shamay's avatar
      net/mlx4_core: Move affinity hints to mlx4_core ownership · de161803
      Ido Shamay authored
      Now that EQs management is in the sole responsibility of mlx4_core,
      the IRQ affinity hints configuration should be in its hands as well.
      request_irq is called only once by the first consumer (maybe mlx4_ib),
      so mlx4_en passes the affinity mask too late. We also need to request
      vectors according to the cores we want to run on.
      
      mlx4_core distribution of IRQs to cores is straight forward,
      EQ(i)->IRQ will set affinity hint to core i.
      Consumers need to request EQ vectors, according to their cores
      considerations (NUMA).
      Signed-off-by: default avatarIdo Shamay <idos@mellanox.com>
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de161803
    • Matan Barak's avatar
      net/mlx4: Add EQ pool · c66fa19c
      Matan Barak authored
      Previously, mlx4_en allocated EQs and used them exclusively.
      This affected RoCE performance, as applications which are
      events sensitive were limited to use only the legacy EQs.
      
      Change that by introducing an EQ pool. This pool is managed
      by mlx4_core. EQs are assigned to ports (when there are limited
      number of EQs, multiple ports could be assigned to the same EQs).
      
      An exception to this rule is the ASYNC EQ which handles various events.
      
      Legacy EQs are completely removed as all EQs could be shared.
      
      When a consumer (mlx4_ib/mlx4_en) requests an EQ, it asks for
      EQ serving on a specific port. The core driver calculates which
      EQ should be assigned to that request.
      
      Because IRQs are shared between IB and Ethernet modules, their
      names only include the PCI device BDF address.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarIdo Shamay <idos@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c66fa19c
    • Matan Barak's avatar
      net/mlx4_core: Demote simple multicast and broadcast flow steering rules · 48564135
      Matan Barak authored
      In SRIOV, when simple (i.e - Ethernet L2 only) flow steering rules are
      created, always create them at MLX4_DOMAIN_NIC priority (instead of
      the real priority the function created them at). This is done in order
      to let multiple functions add broadcast/multicast rules without
      affecting other functions, which is necessary for DPDK in SRIOV.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48564135
    • David S. Miller's avatar
      Merge branch 'for-upstream' of... · 9d52bf0a
      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 2015-05-28
      
      Here's a set of patches intended for 4.2. The majority of the changes
      are on the 802.15.4 side of things rather than Bluetooth related:
      
       - All sorts of cleanups & fixes to ieee802154 and related drivers
       - Rework of tx power support in ieee802154 and its drivers
       - Support for setting ieee802154 tx power through nl802154
       - New IDs for the btusb driver
       - Various cleanups & smaller fixes to btusb
       - New btrtl driver for Realtec devices
       - Fix suspend/resume for Realtek devices
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d52bf0a
    • David S. Miller's avatar
      Merge branch 'mlx5-next' · 1dcf3ac4
      David S. Miller authored
      Amir Vadai says:
      
      ====================
      net/mlx5: ConnectX-4 100G Ethernet driver
      
      This patchset extends the mlx5_core driver to support Ethernet
      functionality. The Ethernet functionality in the mlx5 driver is
      integrated into the core driver and not as separated driver. The
      IB functionality remains in the mlx5_ib driver as before.
      
      This functionality will enable the Ethernet capability of Mellanox's new
      famility of cards - ConnectX-4. Due to the fact that backword
      compatability is being kept, existing Connect-IB cards that are using
      this driver are fully working with the modified driver, and no issues
      with current deployments should be seen.
      
      Like the ConnectX-3 cards, ConnectX-4 is a VPI (Virtual Port Interface -
      every port can be configured as Infiniband or Ethernet) card.
      Unlike previous generations, the ConnectX-4 has a separate PCI function
      per port.
      
      The current code has a limitation that Infiniband and Ethernet port types
      are mutually exclusive. When the driver is compiled with Ethernet
      support, the Infiniband functionality is disabled and vice versa. To
      control that we added the CONFIG_MLX5_CORE_EN config directive
      which is 'n' by default, but can be changed by the user.
      
      This limitation is short-lived and would be addressed soon.
      
      As part of this patchset, mlx5_ifc.h was heavily modified [1]. This file
      is now generated automatically from the device specification document.
      Since this patch is too big for the mail server, it might be missing in
      the mailing list, but could be pulled from an external git repository [2].
      
      irq name selection is done at driver initialization and doesn't contain the
      interface name as part of the irq name.
      irq_balancer will still work thanks to an improvement introduced by Neil Horman
      [3] to use sysfs instead of /proc/interrupts.
      
      Patchset was applied on top of commit ed2dfd90 ("tcp/dccp: warn user for
      preferred ip_local_port_range")
      
      [1] - Patch 4/11 ("net/mlx5_core: HW data structs/types definitions preparation for mlx5 ehternet driver")
      [2] - http://git.openfabrics.org/?p=~amirv/linux.git;a=shortlog;h=refs/heads/mlx5e_v1
      [3] - kernel: da8d1c8b PCI/sysfs: add per pci device msi[x] irq listing (v5)
            irq_balancer: 32a7757 Complete rework of how we detect and classify irqs
      
      Thanks to Achiad, Saeed, Yevheny, Or and the whole team for making this happen,
      Amir
      
      Changes from V4:
      - Removed Patch 3/12: net/mlx5_core: Add EQ renaming mechanism
      - Patch 12/12: net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality
        - irq name is created on driver initialization, therefore it won't contain
          the network interface name in it. This won't effect irq_balancer thanks to
          patches introduced by Neil Horman to use sysfs instead of /proc/interrupts.
      
      Changes from V3:
      - PATCH 8/11: net/mlx5_core: Set/Query port MTU commands
        - Return value directly - no need for err.
      
      Changes from V2:
      - Improved changelogs and cover-letter
      - Added CONFIG_MLX5_EN to disable/enable the Ethernet functionality
      - Moved en.h and wq.[ch] into the patch with data-path related code
      
      Changes from V1:
      - Added patch 1/12 ("net/mlx5_core,mlx5_ib: Do not use vmap() on coherent
        memory")
      
      Changes from V0:
      - Removed V0 Patch 1/11 ("net/mlx5_core: Virtually extend work/completion queue
        buffers by one page") due to misuse of DMA API. Thanks Dave.
      - Patch 1/11 ("net/mlx5_core: Set irq affinity hints"):
        - Use kcalloc instead of kzalloc
        - Fix build error when CONFIG_CPUMASK_OFFSTACK=n. Driver loading will fail
          now if cpumask allocation is failing.
        - Using dev_to_node helper. Thanks, Ido.
      - Patch 3/11 ("net/mlx5_core: HW data structs/types definitions preparation for
        mlx5 ehternet driver")
        - Removed Mellanox internal comment at the head of the file. Thanks Joe
      - Patch 6/11 ("net/mlx5_core: Implement get/set port status")
        - Use direct return of function's result. Thanks Sergei.
      - Added Patch 8/11 ("net/mlx5_core: Set/Query port MTU commands")
      - Patch 9/11 ("net/mlx5: Ethernet Datapath files")
        - Use rq->wqe_sz instead of skb_end_offset. Thanks Ido.
        - Use dma_wmb() when possible instead of wmb(). Thanks Alex.
        - Fix checkpatch issues
      - Patch 10/11 ("net/mlx5: ethernet resources handling")
        - checkpatch issues
        - Added missing include
      - Patch 11/11 ("net/mlx5: Ethernet driver")
        - checkpatch issues
        - fixed typo
        - Modified use of affinity hint
        - Using dev_to_node helper. Thanks, Ido.
        - Use new hardware commands from Patch 8/11 ("net/mlx5_core: Set/Query port
          MTU commands") to get/set port MTU in hardware.
        - Removed NETIF_F_SG since hardware ring wraparound is not supported
        - Use dma_wmb() when possible instead of wmb(). Thanks Alex.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1dcf3ac4
    • Amir Vadai's avatar
      net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality · f62b8bb8
      Amir Vadai authored
      This is the Ethernet part of the driver for the Mellanox ConnectX(R)-4
      Single/Dual-Port Adapter supporting 100Gb/s with VPI.  The driver
      extends the existing mlx5 driver with Ethernet functionality.
      
      This patch contains the driver entry points but does not include
      transmit and receive (see the previous patch in the series) routines.
      
      It also adds the option MLX5_CORE_EN to Kconfig to enable/disable the
      Ethernet functionality. Currently, Kconfig is programmed to make
      Ethernet and Infiniband functionality mutally exclusive.
      Also changed MLX5_INFINIBAND to be depandant on MLX5_CORE instead of
      selecting it, since MLX5_CORE could be selected without MLX5_INFINIBAND
      being selected.
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f62b8bb8
    • Amir Vadai's avatar
      net/mlx5: Ethernet resource handling files · afb736e9
      Amir Vadai authored
      This patch contains the resource handling files:
      - flow_table.c: This file contains the code to handle the low level API
      		to configure hardware flow table. It is separated from
      		the flow_table_en.c, because it will be used in the
      		future by Raw Ethernet QP in mlx5_ib too.
      - en_flow_table.[ch]: Ethernet flow steering handling. The flow table
      		object contain a mapping between flow specs and TIRs.
      		This mechanism will be used also to configure e-switch
      		in the future, when SR-IOV support will be added.
      - transobj.[ch] - Low level functions to create/modify/destroy the
                        transport objects: RQ/SQ/TIR/TIS
      - vport.[ch] - Handle attributes of a virtual port (vPort) in the
        embedded switch. Currently this switch is a passthrough, until SR-IOV
        support will be added.
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afb736e9