1. 10 Jul, 2019 4 commits
    • Gerd Rausch's avatar
      Revert "RDS: IB: split the mr registration and invalidation path" · a5520788
      Gerd Rausch authored
      This reverts commit 56012459.
      
      RDS kept spinning inside function "rds_ib_post_reg_frmr", waiting for
      "i_fastreg_wrs" to become incremented:
               while (atomic_dec_return(&ibmr->ic->i_fastreg_wrs) <= 0) {
                       atomic_inc(&ibmr->ic->i_fastreg_wrs);
                       cpu_relax();
               }
      
      Looking at the original commit:
      
      commit 56012459 ("RDS: IB: split the mr registration and
      invalidation path")
      
      In there, the "rds_ib_mr_cqe_handler" was changed in the following
      way:
      
       void rds_ib_mr_cqe_handler(struct
       rds_ib_connection *ic,
       struct ib_wc *wc)
              if (frmr->fr_inv) {
                        frmr->fr_state = FRMR_IS_FREE;
                        frmr->fr_inv = false;
                      atomic_inc(&ic->i_fastreg_wrs);
              } else {
                      atomic_inc(&ic->i_fastunreg_wrs);
              }
      
      It looks like it's got it exactly backwards:
      
      Function "rds_ib_post_reg_frmr" keeps track of the outstanding
      requests via "i_fastreg_wrs".
      
      Function "rds_ib_post_inv" keeps track of the outstanding requests
      via "i_fastunreg_wrs" (post original commit). It also sets:
               frmr->fr_inv = true;
      
      However the completion handler "rds_ib_mr_cqe_handler" adjusts
      "i_fastreg_wrs" when "fr_inv" had been true, and adjusts
      "i_fastunreg_wrs" otherwise.
      
      The original commit was done in the name of performance:
      to remove the performance bottleneck
      
      No performance benefit could be observed with a fixed-up version
      of the original commit measured between two Oracle X7 servers,
      both equipped with Mellanox Connect-X5 HCAs.
      
      The prudent course of action is to revert this commit.
      Signed-off-by: default avatarGerd Rausch <gerd.rausch@oracle.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      a5520788
    • Santosh Shilimkar's avatar
      rds: fix reordering with composite message notification · 616d37a0
      Santosh Shilimkar authored
      RDS composite message(rdma + control) user notification needs to be
      triggered once the full message is delivered and such a fix was
      added as part of commit 941f8d55 ("RDS: RDMA: Fix the composite
      message user notification"). But rds_send_remove_from_sock is missing
      data part notify check and hence at times the user don't get
      notification which isn't desirable.
      
      One way is to fix the rds_send_remove_from_sock to check of that case
      but considering the ordering complexity with completion handler and
      rdma + control messages are always dispatched back to back in same send
      context, just delaying the signaled completion on rmda work request also
      gets the desired behaviour. i.e Notifying application only after
      RDMA + control message send completes. So patch updates the earlier
      fix with this approach. The delay signaling completions of rdma op
      till the control message send completes fix was done by Venkat
      Venkatsubra in downstream kernel.
      Reviewed-and-tested-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Reviewed-by: default avatarGerd Rausch <gerd.rausch@oracle.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      616d37a0
    • Nathan Chancellor's avatar
      net/mlx5e: Return in default case statement in tx_post_resync_params · 1ff2f0fa
      Nathan Chancellor authored
      clang warns:
      
      drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:251:2:
      warning: variable 'rec_seq_sz' is used uninitialized whenever switch
      default is taken [-Wsometimes-uninitialized]
              default:
              ^~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:255:46: note:
      uninitialized use occurs here
              skip_static_post = !memcmp(rec_seq, &rn_be, rec_seq_sz);
                                                          ^~~~~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:239:16: note:
      initialize the variable 'rec_seq_sz' to silence this warning
              u16 rec_seq_sz;
                            ^
                             = 0
      1 warning generated.
      
      This case statement was clearly designed to be one that should not be
      hit during runtime because of the WARN_ON statement so just return early
      to prevent copying uninitialized memory up into rn_be.
      
      Fixes: d2ead1f3 ("net/mlx5e: Add kTLS TX HW offload support")
      Link: https://github.com/ClangBuiltLinux/linux/issues/590Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ff2f0fa
    • David S. Miller's avatar
      mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync(). · cacf32e9
      David S. Miller authored
      Return value was changes to 'int' from void but this return statement
      was not updated, or it slipped in via a merge.
      
      Fixes: b5d9a834 ("net/tls: don't clear TX resync flag on error")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cacf32e9
  2. 09 Jul, 2019 36 commits