1. 22 Jun, 2017 5 commits
    • Or Gerlitz's avatar
      net/mlx5e: Offload TC matching on ip ttl · a8ade55f
      Or Gerlitz authored
      Enable offloading of TC matching on ip ttl / hop-limit
      
      As matching on ttl is supported only by newer HW brands (ConnectX-5),
      we should do capability check before attempting to offload that.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: default avatarPaul Blakey <paulb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      a8ade55f
    • Or Gerlitz's avatar
      net/mlx5e: Relocate the TC match on ip tos offload code section · 1f97a526
      Or Gerlitz authored
      The code section for offloading matches on ip tos (L3) should come
      before and not after the one that deals with tcp/udp (L4) matches.
      
      Otherwise, we might come up with wrong min-inline requirement, when
      one attempts to match on both L3 and L4.
      
      Fixes: fd7da28b ('net/mlx5e: Offload TC matching on ip tos / traffic-class')
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: default avatarPaul Blakey <paulb@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      1f97a526
    • Tariq Toukan's avatar
      net/mlx5e: Introduce RX Page-Reuse · accd5883
      Tariq Toukan authored
      Introduce a Page-Reuse mechanism in non-Striding RQ RX datapath.
      
      A WQE (RX descriptor) buffer is a page, that in most cases was fully
      wasted on a packet that is much smaller, requiring a new page for
      the next round.
      
      In this patch, we implement a page-reuse mechanism, that resembles a
      `SW Striding RQ`.
      We allow the WQE to reuse its allocated page as much as it could,
      until the page is fully consumed.  In each round, the WQE is capable
      of receiving packet of maximal size (MTU). Yet, upon the reception of
      a packet, the WQE knows the actual packet size, and consumes the exact
      amount of memory needed to build a linear SKB. Then, it updates the
      buffer pointer within the page accordingly, for the next round.
      
      Feature is mutually exclusive with XDP (packet-per-page)
      and LRO (session size is a power of two, needs unused page).
      
      Performance tests:
      iperf tcp tests show huge gain:
      
      --------------------------------------------
      num streams | BW before | BW after | ratio |
                1 |      22.2 |     30.9 | 1.39x |
                8 |      64.2 |     93.6 | 1.46x |
               64 |      56.7 |     91.4 | 1.61x |
      --------------------------------------------
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      accd5883
    • Tariq Toukan's avatar
      net/mlx5e: Enhance RX SKB headroom logic · bce2b2bf
      Tariq Toukan authored
      In the RX memory scheme of non Striding RQ, we use linear SKBs.
      Keeping NET_IP_ALIGN in headroom can improve performance on some archs.
      In addition, take this headroom into account when calculating the
      LRO WQE size.
      
      These are not needed in Striding RQ as they're done implicitly
      within the non-linear SKB allocation.
      
      Fixes: 1bfecfca ("net/mlx5e: Build RX SKB on demand")
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      bce2b2bf
    • Tariq Toukan's avatar
      net/mlx5e: Build SKB with exact frag_size · 78aedd32
      Tariq Toukan authored
      Build the SKB over the receive packet instead of the
      whole page. Getting the SKB's linear data and shared_info
      closer improves locality.
      In addition, this opens up the possibility to make use of
      other parts of the page in the downstream page-reuse patch.
      
      Fixes: 1bfecfca ("net/mlx5e: Build RX SKB on demand")
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      78aedd32
  2. 21 Jun, 2017 35 commits