From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Allison Henderson <allison.henderson@oracle.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
rds-devel@oss.oracle.com
Subject: Re: [PATCH net-next] rds: rely on IB/core to determine if device is ODP capable
Date: Tue, 8 Apr 2025 22:11:38 +0300 [thread overview]
Message-ID: <20250408191138.GF199604@unreal> (raw)
In-Reply-To: <20250408123814.GC1778492@nvidia.com>
On Tue, Apr 08, 2025 at 09:38:14AM -0300, Jason Gunthorpe wrote:
> On Tue, Apr 08, 2025 at 03:34:13PM +0300, Leon Romanovsky wrote:
> > On Tue, Apr 08, 2025 at 09:23:38AM -0300, Jason Gunthorpe wrote:
> > > On Tue, Apr 08, 2025 at 02:04:55PM +0300, Leon Romanovsky wrote:
> > > > diff --git a/net/rds/ib.c b/net/rds/ib.c
> > > > index 9826fe7f9d00..c62aa2ff4963 100644
> > > > --- a/net/rds/ib.c
> > > > +++ b/net/rds/ib.c
> > > > @@ -153,14 +153,6 @@ static int rds_ib_add_one(struct ib_device *device)
> > > > rds_ibdev->max_wrs = device->attrs.max_qp_wr;
> > > > rds_ibdev->max_sge = min(device->attrs.max_send_sge, RDS_IB_MAX_SGE);
> > > >
> > > > - rds_ibdev->odp_capable =
> > > > - !!(device->attrs.kernel_cap_flags &
> > > > - IBK_ON_DEMAND_PAGING) &&
> > > > - !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps &
> > > > - IB_ODP_SUPPORT_WRITE) &&
> > > > - !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps &
> > > > - IB_ODP_SUPPORT_READ);
> > >
> > > This patch seems to drop the check for WRITE and READ support on the
> > > ODP.
> >
> > Right, and they are part of IBK_ON_DEMAND_PAGING support. All ODP
> > providers support both IB_ODP_SUPPORT_WRITE and IB_ODP_SUPPORT_READ.
>
> Where? mlx5 reads this from FW and I don't see anything blocking
> IBK_ON_DEMAND_PAGING if the FW is weird.
As the one who added it, I can assure you that we added these checks not
because of weird FW, but because these caps existed.
RDS calls to ib_reg_user_mr() with the following access_flags.
564 int access_flags =
565 (IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ |
566 IB_ACCESS_REMOTE_WRITE | IB_ACCESS_REMOTE_ATOMIC |
567 IB_ACCESS_ON_DEMAND);
<...>
575
576 ib_mr = ib_reg_user_mr(rds_ibdev->pd, start, length, virt_addr,
577 access_flags);
If for some reason ODP doesn't support WRITE and/or READ, ib_reg_user_mr() will return an error from FW,
Thanks
>
> Jason
next prev parent reply other threads:[~2025-04-08 19:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 11:04 [PATCH net-next] rds: rely on IB/core to determine if device is ODP capable Leon Romanovsky
2025-04-08 12:23 ` Jason Gunthorpe
2025-04-08 12:34 ` Leon Romanovsky
2025-04-08 12:38 ` Jason Gunthorpe
2025-04-08 19:11 ` Leon Romanovsky [this message]
2025-04-09 0:54 ` Allison Henderson
2025-04-10 11:35 ` Leon Romanovsky
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=20250408191138.GF199604@unreal \
--to=leon@kernel.org \
--cc=allison.henderson@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.