1. 26 6月, 2013 1 次提交
  2. 20 6月, 2013 2 次提交
  3. 05 6月, 2013 1 次提交
    • E
      net/mlx4: use one page fragment per incoming frame · e6309cff
      Eric Dumazet 提交于
      mlx4 driver has a suboptimal memory allocation strategy for regular
      MTU=1500 frames, as it uses two page fragments :
      
      One of 512 bytes and one of 1024 bytes.
      
      This makes GRO less effective, as each GSO packet contains 8 MSS instead
      of 16 MSS.
      
      Performance of a single TCP flow gains 25 % increase with the following
      patch.
      
      Before patch :
      
      A:~# netperf -H 192.168.0.2 -Cc
      MIGRATED TCP STREAM TEST ...
      Recv   Send    Send                          Utilization       Service Demand
      Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
      Size   Size    Size     Time     Throughput  local    remote   local   remote
      bytes  bytes   bytes    secs.    10^6bits/s  % S      % S      us/KB   us/KB
      
       87380  16384  16384    10.00      13798.47   3.06     4.20     0.436   0.598
      
      After patch :
      
      A:~# netperf -H 192.68.0.2 -Cc
      MIGRATED TCP STREAM TEST ...
      Recv   Send    Send                          Utilization       Service Demand
      Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
      Size   Size    Size     Time     Throughput  local    remote   local   remote
      bytes  bytes   bytes    secs.    10^6bits/s  % S      % S      us/KB   us/KB
      
       87380  16384  16384    10.00      17273.80   3.44     4.19     0.391   0.477
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Amir Vadai <amirv@mellanox.com>
      Acked-By: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6309cff
  4. 25 4月, 2013 2 次提交
  5. 08 4月, 2013 1 次提交
  6. 08 3月, 2013 1 次提交
  7. 08 2月, 2013 6 次提交
  8. 01 2月, 2013 2 次提交
  9. 03 12月, 2012 1 次提交
  10. 27 11月, 2012 1 次提交
    • O
      mlx4: 64-byte CQE/EQE support · 08ff3235
      Or Gerlitz 提交于
      ConnectX-3 devices can use either 64- or 32-byte completion queue
      entries (CQEs) and event queue entries (EQEs).  Using 64-byte
      EQEs/CQEs performs better because each entry is aligned to a complete
      cacheline.  This patch queries the HCA's capabilities, and if it
      supports 64-byte CQEs and EQES the driver will configure the HW to
      work in 64-byte mode.
      
      The 32-byte vs 64-byte mode is global per HCA and not per CQ or EQ.
      
      Since this mode is global, userspace (libmlx4) must be updated to work
      with the configured CQE size, and guests using SR-IOV virtual
      functions need to know both EQE and CQE size.
      
      In case one of the 64-byte CQE/EQE capabilities is activated, the
      patch makes sure that older guest drivers that use the QUERY_DEV_FUNC
      command (e.g as done in mlx4_core of Linux 3.3..3.6) will notice that
      they need an update to be able to work with the PPF. This is done by
      changing the returned pf_context_behaviour not to be zero any more. In
      case none of these capabilities is activated that value remains zero
      and older guest drivers can run OK.
      
      The SRIOV related flow is as follows
      
      1. the PPF does the detection of the new capabilities using
         QUERY_DEV_CAP command.
      
      2. the PPF activates the new capabilities using INIT_HCA.
      
      3. the VF detects if the PPF activated the capabilities using
         QUERY_HCA, and if this is the case activates them for itself too.
      
      Note that the VF detects that it must be aware to the new PF behaviour
      using QUERY_FUNC_CAP.  Steps 1 and 2 apply also for native mode.
      
      User space notification is done through a new field introduced in
      struct mlx4_ib_ucontext which holds device capabilities for which user
      space must take action. This changes the binary interface so the ABI
      towards libmlx4 exposed through uverbs is bumped from 3 to 4 but only
      when **needed** i.e. only when the driver does use 64-byte CQEs or
      future device capabilities which must be in sync by user space. This
      practice allows to work with unmodified libmlx4 on older devices (e.g
      A0, B0) which don't support 64-byte CQEs.
      
      In order to keep existing systems functional when they update to a
      newer kernel that contains these changes in VF and userspace ABI, a
      module parameter enable_64b_cqe_eqe must be set to enable 64-byte
      mode; the default is currently false.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      08ff3235
  11. 20 11月, 2012 1 次提交
  12. 08 11月, 2012 1 次提交
  13. 04 8月, 2012 1 次提交
  14. 20 7月, 2012 1 次提交
    • T
      mlx4_en: map entire pages to increase throughput · 4cce66cd
      Thadeu Lima de Souza Cascardo 提交于
      In its receive path, mlx4_en driver maps each page chunk that it pushes
      to the hardware and unmaps it when pushing it up the stack. This limits
      throughput to about 3Gbps on a Power7 8-core machine.
      
      One solution is to map the entire allocated page at once. However, this
      requires that we keep track of every page fragment we give to a
      descriptor. We also need to work with the discipline that all fragments will
      be released (in the sense that it will not be reused by the driver
      anymore) in the order they are allocated to the driver.
      
      This requires that we don't reuse any fragments, every single one of
      them must be reallocated. We do that by releasing all the fragments that
      are processed and only after finished processing the descriptors, we
      start the refill.
      
      We also must somehow guarantee that we either refill all fragments in a
      descriptor or none at all, without resorting to giving up a page
      fragment that we would have already given. Otherwise, we would break the
      discipline of only releasing the fragments in the order they were
      allocated.
      
      This has passed page allocation fault injections (restricted to the
      driver by using required-start and required-end) and device hotplug
      while 16 TCP streams were able to deliver more than 9Gbps.
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cce66cd
  15. 19 7月, 2012 1 次提交
    • A
      net/mlx4_en: Add accelerated RFS support · 1eb8c695
      Amir Vadai 提交于
      Use RFS infrastructure and flow steering in HW to keep CPU
      affinity of rx interrupts and application per TCP stream.
      
      A flow steering filter is added to the HW whenever the RFS
      ndo callback is invoked by core networking code.
      
      Because the invocation takes place in interrupt context, the
      actual setup of HW is done using workqueue. Whenever new filter
      is added, the driver checks for expiry of existing filters.
      
      Since there's window in time between the point where the core
      RFS code invoked the ndo callback, to the point where the HW
      is configured from the workqueue context, the 2nd, 3rd etc
      packets from that stream will cause the net core to invoke
      the callback again and again.
      
      To prevent inefficient/double configuration of the HW, the filters
      are kept in a database which is indexed using hash function to enable
      fast access.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1eb8c695
  16. 08 7月, 2012 4 次提交
  17. 26 6月, 2012 1 次提交
  18. 18 5月, 2012 1 次提交
    • A
      net/mlx4_en: num cores tx rings for every UP · bc6a4744
      Amir Vadai 提交于
      Change the TX ring scheme such that the number of rings for untagged packets
      and for tagged packets (per each of the vlan priorities) is the same, unlike
      the current situation where for tagged traffic there's one ring per priority
      and for untagged rings as the number of core.
      
      Queue selection is done as follows:
      
      If the mqprio qdisc is operates on the interface, such that the core networking
      code invoked the device setup_tc ndo callback, a mapping of skb->priority =>
      queue set is forced - for both, tagged and untagged traffic.
      
      Else, the egress map skb->priority =>  User priority is used for tagged traffic, and
      all untagged traffic is sent through tx rings of UP 0.
      
      The patch follows the convergence of discussing that issue with John Fastabend
      over this thread http://comments.gmane.org/gmane.linux.network/229877
      
      Cc: John Fastabend <john.r.fastabend@intel.com>
      Cc: Liran Liss <liranl@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc6a4744
  19. 24 4月, 2012 2 次提交
  20. 05 4月, 2012 4 次提交
    • A
      net/mlx4_en: Set max rate-limit for a TC · 109d2446
      Amir Vadai 提交于
      This patch is using the DCB netlink to set rate limit per ETS TC
      Values are accepted in Kbps and rounded up to the nearest multiply of 100Mbps.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      109d2446
    • A
      net/mlx4_en: DCB QoS support · 564c274c
      Amir Vadai 提交于
      Set TSA, promised BW and PFC using IEEE 802.1qaz netlink commands.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      564c274c
    • A
      net/mlx4_en: Force user priority by QP attribute · 0e98b523
      Amir Vadai 提交于
      Instead of relying on HW to change schedule queue by UP, schedule
      queue is fixed for a tx_ring, and UP in WQE is ignored in this aspect.  This
      resolves two issues with untagged traffic:
      1. untagged traffic has no UP in packet which is needed for QoS. The change
         above allows setting the schedule queue (and by that the UP) of such a stream.
      2. BlueFlame uses the same field used by vlan tag. So forcing UP from QPC
         allows using BF for untagged but prioritized traffic.
      
      In old firmware that force UP is not supported, untagged traffic will not subject to
      QoS.
      
      Because UP is set by QP, need to always have a tx ring per UP, even if pfcrx
      module paramter is false.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e98b523
    • T
      mlx4: allocate just enough pages instead of always 4 pages · 117980c4
      Thadeu Lima de Souza Cascardo 提交于
      The driver uses a 2-order allocation, which is too much on architectures
      like ppc64, which has a 64KiB page. This particular allocation is used
      for large packet fragments that may have a size of 512, 1024, 4096 or
      fill the whole allocation. So, a minimum size of 16384 is good enough
      and will be the same size that is used in architectures of 4KiB sized
      pages.
      
      This will avoid allocation failures that we see when the system is under
      stress, but still has plenty of memory, like the one below.
      
      This will also allow us to set the interface MTU to higher values like
      9000, which was not possible on ppc64 without this patch.
      
      Node 1 DMA: 737*64kB 37*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB = 51904kB
      83137 total pagecache pages
      0 pages in swap cache
      Swap cache stats: add 0, delete 0, find 0/0
      Free swap  = 10420096kB
      Total swap = 10420096kB
      107776 pages RAM
      1184 pages reserved
      147343 pages shared
      28152 pages non-shared
      netstat: page allocation failure. order:2, mode:0x4020
      Call Trace:
      [c0000001a4fa3770] [c000000000012f04] .show_stack+0x74/0x1c0 (unreliable)
      [c0000001a4fa3820] [c00000000016af38] .__alloc_pages_nodemask+0x618/0x930
      [c0000001a4fa39a0] [c0000000001a71a0] .alloc_pages_current+0xb0/0x170
      [c0000001a4fa3a40] [d00000000dcc3e00] .mlx4_en_alloc_frag+0x200/0x240 [mlx4_en]
      [c0000001a4fa3b10] [d00000000dcc3f8c] .mlx4_en_complete_rx_desc+0x14c/0x250 [mlx4_en]
      [c0000001a4fa3be0] [d00000000dcc4eec] .mlx4_en_process_rx_cq+0x62c/0x850 [mlx4_en]
      [c0000001a4fa3d20] [d00000000dcc5150] .mlx4_en_poll_rx_cq+0x40/0x90 [mlx4_en]
      [c0000001a4fa3dc0] [c0000000004e2bb8] .net_rx_action+0x178/0x450
      [c0000001a4fa3eb0] [c00000000009c9b8] .__do_softirq+0x118/0x290
      [c0000001a4fa3f90] [c000000000031df8] .call_do_softirq+0x14/0x24
      [c000000184c3b520] [c00000000000e700] .do_softirq+0xf0/0x110
      [c000000184c3b5c0] [c00000000009c6d4] .irq_exit+0xb4/0xc0
      [c000000184c3b640] [c00000000000e964] .do_IRQ+0x144/0x230
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: NKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
      Tested-by: NKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      117980c4
  21. 07 3月, 2012 3 次提交
  22. 07 2月, 2012 1 次提交
  23. 23 1月, 2012 1 次提交