lkml.org 
[lkml]   [2022]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [EXTERNAL] Re: [Patch v4 12/12] RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter
Date


> -----Original Message-----
> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Wednesday, July 20, 2022 6:49 PM
> To: Long Li <longli@microsoft.com>
> Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Wei Liu <wei.liu@kernel.org>; Dexuan Cui
> <decui@microsoft.com>; David S. Miller <davem@davemloft.net>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Leon
> Romanovsky <leon@kernel.org>; edumazet@google.com;
> shiraz.saleem@intel.com; Ajay Sharma <sharmaajay@microsoft.com>; linux-
> hyperv@vger.kernel.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-rdma@vger.kernel.org
> Subject: [EXTERNAL] Re: [Patch v4 12/12] RDMA/mana_ib: Add a driver for
> Microsoft Azure Network Adapter
>
> On Wed, Jun 15, 2022 at 07:07:20PM -0700, longli@linuxonhyperv.com
> wrote:
>
> > +static int mana_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata
> > +*udata) {
> > + struct mana_ib_pd *pd = container_of(ibpd, struct mana_ib_pd, ibpd);
> > + struct ib_device *ibdev = ibpd->device;
> > + enum gdma_pd_flags flags = 0;
> > + struct mana_ib_dev *dev;
> > + int ret;
> > +
> > + dev = container_of(ibdev, struct mana_ib_dev, ib_dev);
> > +
> > + /* Set flags if this is a kernel request */
> > + if (!ibpd->uobject)
> > + flags = GDMA_PD_FLAG_ALLOW_GPA_MR |
> GDMA_PD_FLAG_ALLOW_FMR_MR;
>
> I'm confused, this driver doesn't seem to support kverbs:
>
> > +static const struct ib_device_ops mana_ib_dev_ops = {
> > + .owner = THIS_MODULE,
> > + .driver_id = RDMA_DRIVER_MANA,
> > + .uverbs_abi_ver = MANA_IB_UVERBS_ABI_VERSION,
> > +
> > + .alloc_pd = mana_ib_alloc_pd,
> > + .alloc_ucontext = mana_ib_alloc_ucontext,
> > + .create_cq = mana_ib_create_cq,
> > + .create_qp = mana_ib_create_qp,
> > + .create_rwq_ind_table = mana_ib_create_rwq_ind_table,
> > + .create_wq = mana_ib_create_wq,
> > + .dealloc_pd = mana_ib_dealloc_pd,
> > + .dealloc_ucontext = mana_ib_dealloc_ucontext,
> > + .dereg_mr = mana_ib_dereg_mr,
> > + .destroy_cq = mana_ib_destroy_cq,
> > + .destroy_qp = mana_ib_destroy_qp,
> > + .destroy_rwq_ind_table = mana_ib_destroy_rwq_ind_table,
> > + .destroy_wq = mana_ib_destroy_wq,
> > + .disassociate_ucontext = mana_ib_disassociate_ucontext,
> > + .get_port_immutable = mana_ib_get_port_immutable,
> > + .mmap = mana_ib_mmap,
> > + .modify_qp = mana_ib_modify_qp,
> > + .modify_wq = mana_ib_modify_wq,
> > + .query_device = mana_ib_query_device,
> > + .query_gid = mana_ib_query_gid,
> > + .query_port = mana_ib_query_port,
> > + .reg_user_mr = mana_ib_reg_user_mr,
>
> eg there is no way to create a kernel MR..
>
> So, why do I see so many kverbs like things - and why are things like FMR in
> this driver that can never be used?
>
> Jason

The idea was to introduce kernel support in future. I will remove it from the code and upload the patch.

\
 
 \ /
  Last update: 2022-07-21 21:25    [W:0.132 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site