Skip to content
  1. Jul 29, 2020
  2. Jul 28, 2020
    • Julia Lawall's avatar
      net/mlx5: drop unnecessary list_empty · 22f9d2f4
      Julia Lawall authored
      
      
      list_for_each_entry is able to handle an empty list.
      The only effect of avoiding the loop is not initializing the
      index variable.
      Drop list_empty tests in cases where these variables are not
      used.
      
      Note that list_for_each_entry is defined in terms of list_first_entry,
      which indicates that it should not be used on an empty list.  But in
      list_for_each_entry, the element obtained by list_first_entry is not
      really accessed, only the address of its list_head field is compared
      to the address of the list head, so the list_first_entry is safe.
      
      The semantic patch that makes this change is as follows (with another
      variant for the no brace case): (http://coccinelle.lip6.fr/)
      
      <smpl>
      @@
      expression x,e;
      iterator name list_for_each_entry;
      statement S;
      identifier i;
      @@
      
      -if (!(list_empty(x))) {
         list_for_each_entry(i,x,...) S
      - }
       ... when != i
      ? i = e
      </smpl>
      
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      22f9d2f4
    • Gustavo A. R. Silva's avatar
      net/mlx5: Use fallthrough pseudo-keyword · c8b838d1
      Gustavo A. R. Silva authored
      
      
      Replace the existing /* fall through */ comments and its variants with
      the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
      fall-through markings when it is the case.
      
      [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
      
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c8b838d1
    • Alex Vesker's avatar
      net/mlx5: DR, Reduce print level for matcher print · ffdc8ec0
      Alex Vesker authored
      
      
      There is no need to print on each unsuccessful matcher
      ip_version combination since it probably will happen when
      trying to create all the possible combinations.
      On a real failure we have a print in the calling function.
      
      Signed-off-by: default avatarAlex Vesker <valex@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      ffdc8ec0
    • Aya Levin's avatar
      net/mlx5e: Add support for PCI relaxed ordering · 17347d54
      Aya Levin authored
      
      
      The concept of Relaxed Ordering in the PCI Express environment allows
      switches in the path between the Requester and Completer to reorder some
      transactions just received before others that were previously enqueued.
      
      In ETH driver, there is no question of write integrity since each memory
      segment is written only once per cycle. In addition, the driver doesn't
      access the memory shared with the hardware until the corresponding CQE
      arrives indicating all PCI transactions are done.
      
      Running TCP single stream over ConnectX-4 LX, ARM CPU on remote-numa has
      300% improvement in the bandwidth.
      
      With relaxed ordering turned off: BW:10 [GB/s]
      With relaxed ordering turned on: BW:40 [GB/s]
      
      The driver turns relaxed ordering with respect to the firmware
      capabilities and the return value from pcie_relaxed_ordering_enabled().
      
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      17347d54
    • Tariq Toukan's avatar
      net/mlx5e: Use indirect call wrappers for RX post WQEs functions · 5d0b8476
      Tariq Toukan authored
      
      
      Use the indirect call wrapper API macros for declaration and scope
      of the RX post WQEs functions.
      
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: default avatarMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      5d0b8476