Re: [PATCH rdma-core 4/8] mlx4: Add inline functions to read completion's attributes

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

 



On Wed, Jan 25, 2017 at 04:49:47PM +0200, Yishai Hadas wrote:
> From: Ariel Levkovich <lariel@xxxxxxxxxxxx>
> 
> Add inline functions in order to read various completion's
> attributes. These functions will be assigned in the ibv_cq_ex
> structure in order to allow the user to read the completion's
> attributes.
> 
> Signed-off-by: Ariel Levkovich <lariel@xxxxxxxxxxxx>
> Acked-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
>  providers/mlx4/cq.c   | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  providers/mlx4/mlx4.h |  13 +++--
>  2 files changed, 157 insertions(+), 3 deletions(-)
> 
> diff --git a/providers/mlx4/cq.c b/providers/mlx4/cq.c
> index 6c4b3c4..a80b2fb 100644
> +++ b/providers/mlx4/cq.c
> @@ -416,6 +416,153 @@ int mlx4_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc)
>  	return err == CQ_POLL_ERR ? err : npolled;
>  }
>  
> +static inline enum ibv_wc_opcode mlx4_cq_read_wc_opcode(struct ibv_cq_ex *ibcq)
> +{

Why are these inline?

At the end of the series the only user of this function is here:

+	cq->ibv_cq.read_opcode = mlx4_cq_read_wc_opcode;

Which is using it as a function pointer, so it cannot be inlined.

Drop all the unncessary 'static inline', they are confusing.

Jason
--
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



[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