1. 31 May, 2015 34 commits
    • 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
    • Amir Vadai's avatar
      net/mlx5: Ethernet Datapath files · e586b3b0
      Amir Vadai authored
      en_[rt]x.c contains the data path related code specific to tx or rx.
      en_txrx.c contains data path code which is common for both the rx and
      tx, this is mainly napi related code.
      
      Below are the objects that are being used by the hardware and the driver
      in the data path:
      
      Channel - one channel per IRQ. Every channel object contains:
        RQ  - describes the rx queue
        TIR - One TIR (Transport Interface Receive) object per flow type. TIR
              contains attributes for a type of rx flow (e.g IPv4, IPv6 etc).
              A flow is defined in the Flow Table.
              Currently TIR describes the RSS hash parameters if exists and LRO
              attributes.
        SQ  - describes the a tx queue. There is one SQ (Send Queue) per
              TC (traffic class).
        TIS - There is one TIS (Transport Interface Send) per TC.  It
              describes the TC and may later be extended to describe more
      	transport properties.
      
      Both RQ and SQ inherit from the object WQ (work queue). This common code
      to describe the layout of CQE's WQE's in memory is in the files wq.[cj]
      
      For every channel there is one NAPI context that is used for RX and
      for TX.
      
      Driver is using netdev_alloc_skb() to allocate skb's.
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e586b3b0
    • Saeed Mahameed's avatar
      net/mlx5_core: Set/Query port MTU commands · e725440e
      Saeed Mahameed authored
      Introduce set/Query low level functions to access MTU in hardware. To be
      used by the netdev.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e725440e
    • Rana Shahout's avatar
      net/mlx5_core: Modify CQ moderation parameters · 90b3e38d
      Rana Shahout authored
      Introduce mlx5_core_modify_cq_moderation() to be used by the netdev, to
      set hardware coalescing.
      Signed-off-by: default avatarRana Shahout <ranas@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90b3e38d
    • Rana Shahout's avatar
      net/mlx5_core: Implement get/set port status · 4c916a79
      Rana Shahout authored
      Implemet get/set port status low level functions to be exposed by the
      netdev.
      Signed-off-by: default avatarRana Shahout <ranas@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c916a79
    • Saeed Mahameed's avatar
      net/mlx5_core: Implement access functions of ptys register fields · adb0c954
      Saeed Mahameed authored
      Those registers will be used by the ethtool to set/get settings.
      Signed-off-by: default avatarRana Shahout <ranas@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adb0c954
    • Saeed Mahameed's avatar
      net/mlx5_core: New device capabilities handling · 938fe83c
      Saeed Mahameed authored
      - Query all supported types of dev caps on driver load.
      - Store the Cap data outbox per cap type into driver private data.
      - Introduce new Macros to access/dump stored caps (using the auto
        generated data types).
      - Obsolete SW representation of dev caps (no need for SW copy for each
        cap).
      - Modify IB driver to use new macros for checking caps.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      938fe83c
    • Saeed Mahameed's avatar
      net/mlx5_core: HW data structs/types definitions cleanup · e281682b
      Saeed Mahameed authored
      mlx5_ifc.h was heavily modified here since it is now generated by a
      script from the device specification (PRM rev 0.25). This specification
      is backward compatible to existing hardware.
      
      Some structures/fields were added here in order to enable the Ethernet
      functionality of the driver.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e281682b
    • Saeed Mahameed's avatar
      net/mlx5_core: Set irq affinity hints · db058a18
      Saeed Mahameed authored
      Preparation for upcoming ethernet driver.
      - Move msix array from eq_table struct to priv since its not related to
        eq_table
      - Intorduce irq_info struct to hold all irq information
      - Move name from mlx5_eq to irq_info struct since it is irq property.
      - Set IRQ affinity hints
      Signed-off-by: default avatarAchiad Shochat <achiad@mellanox.com>
      Signed-off-by: default avatarRana Shahout <ranas@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db058a18
    • Amir Vadai's avatar
      net/mlx5_core,mlx5_ib: Do not use vmap() on coherent memory · 64ffaa21
      Amir Vadai authored
      As David Daney pointed in mlx4_core driver [1], mlx5_core is also
      misusing the DMA-API.
      
      This patch is removing the code that vmap() memory allocated by
      dma_alloc_coherent().
      
      After this patch, users of this drivers might fail allocating resources
      on memory fragmeneted systems.  This will be fixed later on.
      
      [1] - https://patchwork.ozlabs.org/patch/458531/
      
      CC: David Daney <david.daney@cavium.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64ffaa21
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 8ed9b5e1
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-05-28
      
      This series contains updates to ethtool, ixgbe, i40e and i40evf.
      
      John adds helper routines for ethtool to pass VF to rx_flow_spec.  Since
      the ring_cookie is 64 bits wide which is much larger than what could be
      used for actual queue index values, provide helper routines to pack a VF
      index into the cookie.  Then John provides a ixgbe patch to allow flow
      director to use the entire queue space.
      
      Neerav provides a i40e patch to collect XOFF Rx stats, where it was not
      being collected before.
      
      Anjali provides ATR support for tunneled packets, as well as stats to
      count tunnel ATR hits.  Cleaned up PF struct members which are
      unnecessary, since we can use the stat index macro directly.  Cleaned
      up flow director ATR/SB messages to a higher debug level since they
      are not useful unless silicon validation is happening.
      
      Greg provides a patch to disable offline diagnostics if VFs are enabled
      since ethtool offline diagnostic tests are not designed (out of scope)
      to disable VF functions for testing and re-enable afterward.  Also cleans
      up TODO comment that is no longer needed.
      
      Vasu provides a fix an FCoE EOF case where i40e_fcoe_ctxt_eof() maybe
      called before i40e_fcoe_eof_is_supported() is called.
      
      Jesse adds skb->xmit_more support for i40evf.  Then provides a performance
      enhancement for i40evf by inlining some functions which provides a 15%
      gain in small packet performance.  Also cleans up the use of time_stamp
      since it is no longer used to determine if there is a tx_hang and was
      a part of a previous tx_hang design which is no longer used.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ed9b5e1
    • Ying Xue's avatar
      tipc: unconditionally put sock refcnt when sock timer to be deleted is pending · 1ea23a21
      Ying Xue authored
      As sock refcnt is taken when sock timer is started in
      sk_reset_timer(), the sock refcnt should be put when sock timer
      to be deleted is in pending state no matter what "probing_state"
      value of tipc sock is.
      Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ea23a21
    • Vivien Didelot's avatar
      if_vlan: fix vlaue -> value typo · f4fb874c
      Vivien Didelot authored
      Fixes "vlaue" for "value" in include/linux/if_vlan.h.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4fb874c
    • Alexei Starovoitov's avatar
      bpf: allow BPF programs access skb->skb_iif and skb->dev->ifindex fields · 37e82c2f
      Alexei Starovoitov authored
      classic BPF already exposes skb->dev->ifindex via SKF_AD_IFINDEX extension.
      Allow eBPF program to access it as well. Note that classic aborts execution
      of the program if 'skb->dev == NULL' (which is inconvenient for program
      writers), whereas eBPF returns zero in such case.
      Also expose the 'skb_iif' field, since programs triggered by redirected
      packet need to known the original interface index.
      Summary:
      __skb->ifindex         -> skb->dev->ifindex
      __skb->ingress_ifindex -> skb->skb_iif
      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>
      37e82c2f
    • KY Srinivasan's avatar
      hv_netvsc: Properly size the vrss queues · e01ec219
      KY Srinivasan authored
      The current algorithm for deciding on the number of VRSS channels is
      not optimal since we open up the min of number of CPUs online and the
      number of VRSS channels the host is offering. So on a 32 VCPU guest
      we could potentially open 32 VRSS subchannels. Experimentation has
      shown that it is best to limit the number of VRSS channels to the number
      of CPUs within a NUMA node.
      
      Here is the new algorithm for deciding on the number of sub-channels we
      would open up:
              1) Pick the minimum of what the host is offering and what the driver
                 in the guest is specifying as the default value.
              2) Pick the minimum of (1) and the numbers of CPUs in the NUMA
                 node the primary channel is bound to.
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e01ec219
    • Sorin Dumitru's avatar
      net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN · 8133534c
      Sorin Dumitru authored
      This is similar to b1cb59cf(net: sysctl_net_core: check SNDBUF
      and RCVBUF for min length). I don't think too small values can cause
      crashes in the case of udp and tcp, but I've seen this set to too
      small values which triggered awful performance. It also makes the
      setting consistent across all the wmem/rmem sysctls.
      Signed-off-by: default avatarSorin Dumitru <sdumitru@ixiacom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8133534c
    • David S. Miller's avatar
      Merge branch 'stmmac-IPQ806x' · 5befa5e8
      David S. Miller authored
      Mathieu Olivari says:
      
      ====================
      Add support for QCA IPQ806x Ethernet GMAC controller
      
      This patch set adds support for the integrated Ethernet GMAC controller
      on QCA IPQ806x SoC. This controller is based on a Gigabit Synopsys
      DesignWare IP, already supported in the stmmac driver located in
      drivers/net/ethernet/stmicro/stmmac.
      
      This change is done as a follow-up to the following thread:
      *http://www.spinics.net/lists/netdev/msg311265.html
      While previous attempt was creating a new driver to drive this controller,
      this new post leverages the existing stmmac driver by implementing the
      SoC specific glue to it.
      
      Aside from the pure stmmac glue layer, we have a couple of related
      patches:
      *IPQ806x NSS clock addition is cherry-picked and refreshed from the
       following thread: https://lkml.org/lkml/2014/8/6/390
      *phy-handle and fixed-link support are also added in this change set so the
       driver can be fully functional on platforms using device-trees as well as
       ethernet switches.
      
      V2:
       *Fix MODULE_LICENSE to "Dual BSD/GPL" as the dwmac-ipq806x.c is using
        ISC license.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5befa5e8
    • Mathieu Olivari's avatar
      net: stmmac: ipq806x: document device tree bindings · 95e130af
      Mathieu Olivari authored
      Add the device tree bindings documentation for the QCA IPQ806x
      variant of the Synopsys DesignWare MAC.
      Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      95e130af
    • Mathieu Olivari's avatar
      stmmac: add ipq806x glue layer · b1c17215
      Mathieu Olivari authored
      The ethernet controller available in IPQ806x is a Synopsys DesignWare
      Gigabit MAC IP core, already supported by the stmmac driver.
      
      This glue layer implements some platform specific settings required to
      get the controller working on an IPQ806x based platform.
      Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1c17215
    • Mathieu Olivari's avatar
      stmmac: add fixed-link device-tree support · 27732381
      Mathieu Olivari authored
      In case DT is used, this change adds the ability to the stmmac driver to
      detect a fixed-link PHY, instanciate it, and use it during
      phy_connect().
      
      Fixed link PHYs DT usage is described in:
      Documentation/devicetree/bindings/net/fixed-link.txt
      Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27732381
    • Mathieu Olivari's avatar
      stmmac: add phy-handle support to the platform layer · 5790cf3c
      Mathieu Olivari authored
      On stmmac driver, PHY specification in device-tree was done using the
      non-standard property "snps,phy-addr". Specifying a PHY on a different
      MDIO bus that the one within the stmmac controller doesn't seem to be
      possible when device-tree is used.
      
      This change adds support for the phy-handle property, as specified in
      Documentation/devicetree/bindings/net/ethernet.txt.
      Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5790cf3c
    • Stephen Boyd's avatar
      clk: qcom: Add support for NSS/GMAC clocks and resets · f7b81d67
      Stephen Boyd authored
      Add the NSS/GMAC clocks and the TCM clock and NSS resets.
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7b81d67
  2. 29 May, 2015 2 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next · a74eab63
      David S. Miller authored
      Steffen Klassert says:
      
      ====================
      pull request (net-next): ipsec-next 2015-05-28
      
      1) Remove xfrm_queue_purge as this is the same as skb_queue_purge.
      
      2) Optimize policy and state walk.
      
      3) Use a sane return code if afinfo registration fails.
      
      4) Only check fori a acquire state if the state is not valid.
      
      5) Remove a unnecessary NULL check before xfrm_pol_hold
         as it checks the input for NULL.
      
      6) Return directly if the xfrm hold queue is empty, avoid
         to take a lock as it is nothing to do in this case.
      
      7) Optimize the inexact policy search and allow for matching
         of policies with priority ~0U.
      
      All from Li RongQing.
      
      Please pull or let me know if there are problems.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a74eab63
    • Vladimir Zapolskiy's avatar
      net: qlcnic: clean up sysfs error codes · d7a32b6e
      Vladimir Zapolskiy authored
      Replace confusing QL_STATUS_INVALID_PARAM == -1 == -EPERM with -EINVAL
      and QLC_STATUS_UNSUPPORTED_CMD == -2 == -ENOENT with -EOPNOTSUPP, the
      latter error code is arguable, but it is already used in the driver,
      so let it be here as well.
      
      Also remove always false (!buf) check on read(), the driver should
      not care if userspace gets its EFAULT or not.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Acked-by: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7a32b6e
  3. 28 May, 2015 4 commits