1. 17 11月, 2016 29 次提交
  2. 16 11月, 2016 11 次提交
    • D
      Merge branch 'alx-multiqueue-support' · 21b23dae
      David S. Miller 提交于
      Tobias Regnery says:
      
      ====================
      alx: add multi queue support
      
      This patchset lays the groundwork for multi queue support in the alx driver
      and enables multi queue support for the tx path by default. The hardware
      supports up to 4 tx queues.
      
      Benefits are better utilization of multi core cpus and the usage of the
      msi-x support by default which splits the handling of rx / tx and misc
      other interrupts.
      
      The rx path is a little bit harder because apparently (based on the limited
      information from the downstream driver) the hardware supports up to 8 rss
      queues but only has one hardware descriptor ring on the rx side. So the rx
      path will be part of another patchset.
      
      Tested on my AR8161 ethernet adapter with different tests:
      - there are no regressions observed during my daily usage
      - iperf tcp and udp tests shows no performance regressions
      - netperf TCP_RR and UDP_RR shows a slight performance increase of about
        1-2% with this patchset applied
      
      This work is based on the downstream driver at github.com/qca/alx
      
      Changes in V2:
      	- drop unneeded casts in alx_alloc_rx_ring (Patch 1)
      	- add additional information about testing and benefit to the
      	  changelog
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21b23dae
    • T
      alx: enable multiple tx queues · d768319c
      Tobias Regnery 提交于
      Enable multiple tx queues by default based on the number of online cpus. The
      hardware supports up to four tx queues.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d768319c
    • T
      alx: enable msi-x interrupts by default · f58e0f77
      Tobias Regnery 提交于
      Remove the module parameter to enable msi-x support and enable msi-x
      interrupts unconditionally by default. This is a preparatory step to enable
      multi queue support by default, because this is only working with msi-x
      interrupts.
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f58e0f77
    • T
      alx: prepare tx path for multi queue support · 2e06826b
      Tobias Regnery 提交于
      This patch prepares the tx path to send data on multiple tx queues. It
      introduces per queue register adresses and uses them in the alx_tx_queue
      structs.
      
      There are new helper functions for the queue mapping in the tx path.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e06826b
    • T
      alx: prepare resource allocation for multi queue support · a4076d34
      Tobias Regnery 提交于
      Allocate, initialise and free alx_tx_queue structs based on the number of
      alx_napi structures. Also increase the size of the descriptor memory based
      on the number of tx queues in use.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4076d34
    • T
      alx: prepare interrupt functions for multiple queues · e0eac254
      Tobias Regnery 提交于
      Extend the interrupt bringup code and the interrupt handler for msi-x
      interrupts in order to handle multiple queues.
      
      We must change the poll function because with multiple queues it is possible
      that an alx_napi structure has only a tx or only a rx queue pointer.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0eac254
    • T
      alx: switch to per queue data structures · 702e8418
      Tobias Regnery 提交于
      Remove the tx and rx queue structures from the alx_priv structure and switch
      everything over to the queue pointers in the alx_napi structure.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      702e8418
    • T
      alx: add ability to allocate and free alx_napi structures · b0999223
      Tobias Regnery 提交于
      Add new functions to allocate and free the alx_napi structures and use them
      in __alx_open and __alx_stop. We only allocate one of these structures for
      now, as the rest of the driver is not yet ready for multiple queues.
      
      We switch over the setup of the interrupt mask and the call to netif_napi_add
      to the new function because we must adjust these later on a per queue basis.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0999223
    • T
      alx: extend data structures for multi queue support · bccffcf7
      Tobias Regnery 提交于
      Extend the driver data structures to be able to handle multiple queues.
      
      Based on the downstream driver at github.com/qca/alx
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bccffcf7
    • T
      alx: refactor descriptor allocation · 8c2a4c8e
      Tobias Regnery 提交于
      Split the allocation of descriptor memory and the buffer allocation into a
      tx and rx function. This is in preparation for multiple queues where we
      need to iterate over the new functions.
      
      While at it drop the unneeded casting on the rx side.
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c2a4c8e
    • D
      Merge branch 'dpaa_eth-next' · 11b8ad33
      David S. Miller 提交于
      Madalin Bucur says:
      
      ====================
      dpaa_eth: Add the QorIQ DPAA Ethernet driver
      
      This patch series adds the Ethernet driver for the Freescale
      QorIQ Data Path Acceleration Architecture (DPAA).
      
      This version includes changes following the feedback received
      on previous versions from Eric Dumazet, Bob Cochran, Joe Perches,
      Paul Bolle, Joakim Tjernlund, Scott Wood, David Miller - thank you.
      
      Together with the driver a managed version of alloc_percpu
      is provided that simplifies the release of per-CPU memory.
      
      The Freescale DPAA architecture consists in a series of hardware
      blocks that support the Ethernet connectivity. The Ethernet driver
      depends upon the following drivers that are currently in the Linux
      kernel:
       - Peripheral Access Memory Unit (PAMU)
          drivers/iommu/fsl_*
       - Frame Manager (FMan) added in v4.4
          drivers/net/ethernet/freescale/fman
       - Queue Manager (QMan), Buffer Manager (BMan) added in v4.9-rc1
          drivers/soc/fsl/qbman
      
      dpaa_eth interfaces mapping to FMan MACs:
      
        dpaa_eth       /eth0\     ...       /ethN\
        driver        |      |             |      |
        -------------   ----   -----------   ----   -------------
             -Ports  / Tx  Rx \    ...    / Tx  Rx \
        FMan        |          |         |          |
             -MACs  |   MAC0   |         |   MACN   |
                   /   dtsec0   \  ...  /   dtsecN   \ (or tgec)
                  /              \     /              \(or memac)
        ---------  --------------  ---  --------------  ---------
            FMan, FMan Port, FMan SP, FMan MURAM drivers
        ---------------------------------------------------------
            FMan HW blocks: MURAM, MACs, Ports, SP
        ---------------------------------------------------------
      
      dpaa_eth relation to QMan, FMan:
                    ________________________________
        dpaa_eth   /            eth0                \
        driver    /                                  \
        ---------   -^-   -^-   -^-   ---    ---------
        QMan driver / \   / \   / \  \   /  | BMan    |
                   |Rx | |Rx | |Tx | |Tx |  | driver  |
        ---------  |Dfl| |Err| |Cnf| |FQs|  |         |
        QMan HW    |FQ | |FQ | |FQ | |   |  |         |
                   /   \ /   \ /   \  \ /   |         |
        ---------   ---   ---   ---   -v-    ---------
                  |        FMan QMI         |         |
                  | FMan HW       FMan BMI  | BMan HW |
                    -----------------------   --------
      
      where the acronyms used above (and in the code) are:
      DPAA = Data Path Acceleration Architecture
      FMan = DPAA Frame Manager
      QMan = DPAA Queue Manager
      BMan = DPAA Buffers Manager
      QMI = QMan interface in FMan
      BMI = BMan interface in FMan
      FMan SP = FMan Storage Profiles
      MURAM = Multi-user RAM in FMan
      FQ = QMan Frame Queue
      Rx Dfl FQ = default reception FQ
      Rx Err FQ = Rx error frames FQ
      Tx Cnf FQ = Tx confirmation FQ
      Tx FQs = transmission frame queues
      dtsec = datapath three speed Ethernet controller (10/100/1000 Mbps)
      tgec = ten gigabit Ethernet controller (10 Gbps)
      memac = multirate Ethernet MAC (10/100/1000/10000)
      
      Changes from v7:
       - remove the debug option to use a common buffer pool for all the
         interfaces
      
      Changed from v6:
       - fixed an issue on an error path in dpaa_set_mac_address()
       - removed NDO operation definitions that were not needed
       - sorted the local variable declarations
       - cleaned up a few checkpatch checks
       - removed friendly network interface naming code
      
      Changes from v5:
       - adapt to the latest Q/BMan drivers API
       - use build_skb() on Rx path instead of buffer pool refill path
       - proper support for multiple buffer pools
       - align function, variable names, code cleanup
       - driver file structure cleanup
      
      Changes from v4:
       - addressed feedback from Scott Wood and Joe Perches
       - fixed spelling
       - fixed leak of uninitialized stack to userspace
       - fix prints
       - replace raw_cpu_ptr() with this_cpu_ptr()
       - remove _s from the end of structure names
       - remove underscores at start of functions, goto labels
       - remove likely in error paths
       - use container_of() instead of open casts
       - remove priv from the driver name
       - move return type on same line with function name
       - drop DPA_READ_SKB_PTR/DPA_WRITE_SKB_PTR
      
      Changes from v3:
       - removed bogus delay and comment in .ndo_stop implementation
       - addressed minor issues reported by David Miller
      
      Changes from v2:
       - removed debugfs, moved exports to ethtool statistics
       - removed congestion groups Kconfig params
      
      Changes from v1:
       - bpool level Kconfig options removed
       - print format using pr_fmt, cleaned up prints
       - __hot/__cold removed
       - gratuitous unlikely() removed
       - code style aligned, consistent spacing for declarations
       - comment formatting
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11b8ad33