Re: [PATCH 25/27] IB/hfi1: Add rvt_rnr_tbl_to_usec function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 08, 2017 at 05:28:19AM -0800, Dennis Dalessandro wrote:
> From: Don Hiatt <don.hiatt@xxxxxxxxx>
>
> Return usec from an index into ib_rvt_rnr_table.
>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
> Signed-off-by: Don Hiatt <don.hiatt@xxxxxxxxx>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
> ---
>  drivers/infiniband/sw/rdmavt/qp.c |   11 +++++++++++
>  include/rdma/rdmavt_qp.h          |    1 +
>  2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
> index db4315f..0b97598 100644
> --- a/drivers/infiniband/sw/rdmavt/qp.c
> +++ b/drivers/infiniband/sw/rdmavt/qp.c
> @@ -1954,6 +1954,17 @@ void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err)
>  }
>  EXPORT_SYMBOL(rvt_rc_error);
>
> +/*
> + *  rvt_rnr_tbl_to_usec - return index into ib_rvt_rnr_table
> + *  @index - the index
> + *  return usec from an index into ib_rvt_rnr_table
> + */
> +unsigned long rvt_rnr_tbl_to_usec(u32 index)
> +{
> +	return ib_rvt_rnr_table[(index & RVT_AETH_CREDIT_MASK)];
> +}
> +EXPORT_SYMBOL(rvt_rnr_tbl_to_usec);
> +

Do we have a usage of this new exported function?

>  static inline unsigned long rvt_aeth_to_usec(u32 aeth)
>  {
>  	return ib_rvt_rnr_table[(aeth >> RVT_AETH_CREDIT_SHIFT) &
> diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
> index 2f91fae..9767549 100644
> --- a/include/rdma/rdmavt_qp.h
> +++ b/include/rdma/rdmavt_qp.h
> @@ -653,6 +653,7 @@ static inline u32 rvt_div_mtu(struct rvt_qp *qp, u32 len)
>  void rvt_comm_est(struct rvt_qp *qp);
>  int rvt_error_qp(struct rvt_qp *qp, enum ib_wc_status err);
>  void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err);
> +unsigned long rvt_rnr_tbl_to_usec(u32 index);
>  enum hrtimer_restart rvt_rc_rnr_retry(struct hrtimer *t);
>  void rvt_add_rnr_timer(struct rvt_qp *qp, u32 aeth);
>  void rvt_del_timers_sync(struct rvt_qp *qp);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux