From: Leon Romanovsky <leon@kernel.org>
To: Cheng Xu <chengyou@linux.alibaba.com>
Cc: jgg@ziepe.ca, dledford@redhat.com, linux-rdma@vger.kernel.org,
KaiShen@linux.alibaba.com, tonylu@linux.alibaba.com
Subject: Re: [PATCH rdma-next 06/11] RDMA/erdma: Add verbs header file
Date: Tue, 21 Dec 2021 15:28:12 +0200 [thread overview]
Message-ID: <YcHWbNusWdT9mMet@unreal> (raw)
In-Reply-To: <20211221024858.25938-7-chengyou@linux.alibaba.com>
On Tue, Dec 21, 2021 at 10:48:53AM +0800, Cheng Xu wrote:
> This header file defines the main structrues and functions used for RDMA
> Verbs, including qp, cq, mr ucontext, etc,.
>
> Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
> ---
> drivers/infiniband/hw/erdma/erdma_verbs.h | 366 ++++++++++++++++++++++
> 1 file changed, 366 insertions(+)
> create mode 100644 drivers/infiniband/hw/erdma/erdma_verbs.h
>
> diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.h b/drivers/infiniband/hw/erdma/erdma_verbs.h
> new file mode 100644
> index 000000000000..6eda8843d0d5
> --- /dev/null
> +++ b/drivers/infiniband/hw/erdma/erdma_verbs.h
> @@ -0,0 +1,366 @@
> +/* SPDX-License-Identifier: GPL-2.0
> + *
> + * Authors: Cheng Xu <chengyou@linux.alibaba.com>
> + * Kai Shen <kaishen@linux.alibaba.com>
> + * Copyright (c) 2020-2021, Alibaba Group.
> + */
> +
> +#ifndef __ERDMA_VERBS_H__
> +#define __ERDMA_VERBS_H__
<...>
> +extern int erdma_query_port(struct ib_device *dev, u32 port, struct ib_port_attr *attr);
> +extern int erdma_query_pkey(struct ib_device *dev, u32 port, u16 idx, u16 *pkey);
> +extern int erdma_query_gid(struct ib_device *dev, u32 port, int idx, union ib_gid *gid);
> +extern int erdma_alloc_pd(struct ib_pd *pd, struct ib_udata *data);
> +extern int erdma_dealloc_pd(struct ib_pd *ibpd, struct ib_udata *udata);
> +extern int erdma_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
> + struct ib_udata *data);
> +extern int erdma_query_qp(struct ib_qp *qp, struct ib_qp_attr *attr, int mask,
> + struct ib_qp_init_attr *init_attr);
> +extern int erdma_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr, int mask,
> + struct ib_udata *data);
> +extern int erdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata);
> +extern int erdma_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
> +extern int erdma_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags);
> +extern struct ib_mr *erdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len,
> + u64 virt, int access, struct ib_udata *udata);
> +extern struct ib_mr *erdma_get_dma_mr(struct ib_pd *ibpd, int rights);
> +extern int erdma_dereg_mr(struct ib_mr *mr, struct ib_udata *data);
> +extern int erdma_mmap(struct ib_ucontext *ctx, struct vm_area_struct *vma);
> +extern void erdma_qp_get_ref(struct ib_qp *qp);
> +extern void erdma_qp_put_ref(struct ib_qp *qp);
> +extern struct ib_qp *erdma_get_ibqp(struct ib_device *dev, int id);
> +extern int erdma_post_send(struct ib_qp *qp, const struct ib_send_wr *send_wr,
> + const struct ib_send_wr **bad_send_wr);
> +extern int erdma_post_recv(struct ib_qp *qp, const struct ib_recv_wr *recv_wr,
> + const struct ib_recv_wr **bad_recv_wr);
> +extern int erdma_poll_cq(struct ib_cq *cq, int num_entries, struct ib_wc *wc);
> +extern struct ib_mr *erdma_ib_alloc_mr(struct ib_pd *ibpd, enum ib_mr_type mr_type,
> + u32 max_num_sg);
> +extern int erdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg,
> + int sg_nents, unsigned int *sg_offset);
> +extern struct net_device *erdma_get_netdev(struct ib_device *device, u32 port_num);
> +extern void erdma_disassociate_ucontext(struct ib_ucontext *ibcontext);
> +extern void erdma_port_event(struct erdma_dev *dev, enum ib_event_type reason);
Why do you add "extern" to function declarations?
Thanks
> +
> +#endif
> --
> 2.27.0
>
next prev parent reply other threads:[~2021-12-21 13:28 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 2:48 [PATCH rdma-next 00/11] Elastic RDMA Adapter (ERDMA) driver Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 01/11] RDMA: Add ERDMA to rdma_driver_id definition Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 02/11] RDMA/erdma: Add the hardware related definitions Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 03/11] RDMA/erdma: Add main include file Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 04/11] RDMA/erdma: Add cmdq implementation Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 05/11] RDMA/erdma: Add event queue implementation Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 06/11] RDMA/erdma: Add verbs header file Cheng Xu
2021-12-21 13:28 ` Leon Romanovsky [this message]
2021-12-22 2:36 ` Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 07/11] RDMA/erdma: Add verbs implementation Cheng Xu
2021-12-21 13:32 ` Leon Romanovsky
2021-12-21 15:20 ` Bernard Metzler
2021-12-22 3:11 ` Cheng Xu
2021-12-22 4:18 ` Cheng Xu
2021-12-22 12:46 ` Bernard Metzler
2021-12-23 8:38 ` Cheng Xu
2021-12-22 2:50 ` Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 08/11] RDMA/erdma: Add connection management (CM) support Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 09/11] RDMA/erdma: Add the erdma module Cheng Xu
2021-12-21 13:26 ` Leon Romanovsky
2021-12-22 2:33 ` Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 10/11] RDMA/erdma: Add the ABI definitions Cheng Xu
2021-12-21 11:57 ` kernel test robot
2021-12-22 16:14 ` kernel test robot
2021-12-23 15:46 ` Yanjun Zhu
2021-12-23 18:45 ` Leon Romanovsky
2021-12-23 22:55 ` Yanjun Zhu
2021-12-24 6:04 ` Leon Romanovsky
2021-12-24 7:54 ` Yanjun Zhu
2021-12-24 18:11 ` Leon Romanovsky
2021-12-24 7:12 ` Cheng Xu
2021-12-24 8:02 ` Yanjun Zhu
2021-12-24 18:19 ` Leon Romanovsky
2021-12-25 0:03 ` Yanjun Zhu
2021-12-25 3:36 ` Cheng Xu
2021-12-21 2:48 ` [PATCH rdma-next 11/11] RDMA/erdma: Add driver to kernel build environment Cheng Xu
2021-12-22 0:58 ` kernel test robot
2021-12-21 13:09 ` [PATCH rdma-next 00/11] Elastic RDMA Adapter (ERDMA) driver Leon Romanovsky
2021-12-22 3:35 ` Cheng Xu
2021-12-23 10:23 ` Leon Romanovsky
2021-12-23 12:59 ` Cheng Xu
2021-12-23 13:44 ` Leon Romanovsky
2021-12-24 7:07 ` Cheng Xu
2021-12-24 18:26 ` Leon Romanovsky
2021-12-25 2:54 ` Cheng Xu
2021-12-25 2:57 ` Cheng Xu
2021-12-25 3:03 ` [Please ignore the two former responses]Re: " Cheng Xu
2022-01-07 14:24 ` Jason Gunthorpe
2022-01-10 10:07 ` Cheng Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YcHWbNusWdT9mMet@unreal \
--to=leon@kernel.org \
--cc=KaiShen@linux.alibaba.com \
--cc=chengyou@linux.alibaba.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=tonylu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).