From: Leon Romanovsky <leon@kernel.org>
To: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
mkalderon@marvell.com, zyjzyj2000@gmail.com, sagi@grimberg.me,
mgurtovoy@nvidia.com, haris.iqbal@ionos.com,
jinpu.wang@ionos.com, bvanassche@acm.org, kbusch@kernel.org,
Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
kch@nvidia.com, smfrench@gmail.com, linkinjeon@kernel.org,
metze@samba.org, tom@talpey.com, cel@kernel.org,
jlayton@kernel.org, neil@brown.name, okorniev@redhat.com,
Dai.Ngo@oracle.com, trondmy@kernel.org, anna@kernel.org,
achender@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
kees@kernel.org, andriy.shevchenko@linux.intel.com, clm@meta.com,
ebadger@purestorage.com, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, target-devel@vger.kernel.org,
linux-nvme@lists.infradead.org, linux-cifs@vger.kernel.org,
samba-technical@lists.samba.org, linux-nfs@vger.kernel.org,
netdev@vger.kernel.org, rds-devel@oss.oracle.com,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH rdma-next v9] RDMA: Change capability fields in ib_device_attr from int to u32
Date: Tue, 7 Jul 2026 13:25:46 +0300 [thread overview]
Message-ID: <20260707102546.GM15188@unreal> (raw)
In-Reply-To: <akzS9EdxScQsx9n8@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
On Tue, Jul 07, 2026 at 03:20:36AM -0700, Erni Sri Satya Vennela wrote:
> On Mon, Jul 06, 2026 at 11:49:50AM +0300, Leon Romanovsky wrote:
> > > ---
> > > drivers/infiniband/core/cq.c | 3 +-
> > > drivers/infiniband/hw/qedr/verbs.c | 2 +-
> > > drivers/infiniband/sw/rxe/rxe_qp.c | 22 +++++-----
> > > drivers/infiniband/sw/rxe/rxe_srq.c | 16 +++----
> > > drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 ++---
> > > drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 +-
> > > drivers/infiniband/ulp/iser/iser_verbs.c | 5 +--
> > > drivers/infiniband/ulp/isert/ib_isert.c | 7 ++-
> > > drivers/infiniband/ulp/rtrs/rtrs-clt.c | 11 ++---
> > > drivers/infiniband/ulp/rtrs/rtrs-srv.c | 11 ++---
> > > drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
> > > drivers/infiniband/ulp/srpt/ib_srpt.c | 21 +++++----
> > > drivers/nvme/host/rdma.c | 8 ++--
> > > drivers/nvme/target/rdma.c | 22 ++++++----
> > > fs/smb/smbdirect/accept.c | 5 ++-
> > > fs/smb/smbdirect/connect.c | 5 ++-
> > > fs/smb/smbdirect/connection.c | 8 ++--
> > > include/linux/sunrpc/svc_rdma.h | 4 +-
> > > include/rdma/ib_verbs.h | 50 +++++++++++-----------
> > > net/rds/ib.c | 10 ++---
> > > net/rds/ib_cm.c | 10 ++---
> > > net/sunrpc/xprtrdma/frwr_ops.c | 7 +--
> > > net/sunrpc/xprtrdma/svc_rdma_transport.c | 5 +--
> > > net/sunrpc/xprtrdma/verbs.c | 2 +-
> > > 24 files changed, 122 insertions(+), 127 deletions(-)
> >
> > The following code is still missing.
>
> I'll make this change in the next version.
>
> >Also, what about mxa_srq?
> > Why wasn't it converted as well?
>
> I originally left max_srq as int because its only consumer pairs it with
> num_comp_vectors (a signed int) in nvmet_rdma, so keeping it int let
> that site stay a plain min() instead of a min_t().
>
> num_comp_vectors is the completion-vector count, legitimately int and
> never anywhere near INT_MAX, so I'd prefer to leave it signed rather
> than convert it everywhere. Does that work for you, or would you rather
> num_comp_vectors be converted too?
In this patch no, but it is worth to write this in commit message.
Thanks
>
> If it needs converting, I'll do it as a separate patch, since it lives
> in a different struct (ib_device) and touches many call sites.
> Otherwise, using min_t() for just this one call is fine too.
>
> Thanks,
> Vennela
>
> >
> > diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
> > index f599c24b34e8..aae4f3f6bcba 100644
> > --- a/drivers/infiniband/core/nldev.c
> > +++ b/drivers/infiniband/core/nldev.c
> > @@ -454,7 +454,8 @@ static int fill_res_info(struct sk_buff *msg, struct ib_device *device,
> > };
> >
> > struct nlattr *table_attr;
> > - int ret, i, curr, max;
> > + u64 curr, max;
> > + int ret, i;
> >
> > if (fill_nldev_handle(msg, device))
> > return -EMSGSIZE;
> > diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c
> > index cfee2071586c..1b2f9df49e28 100644
> > --- a/drivers/infiniband/core/restrack.c
> > +++ b/drivers/infiniband/core/restrack.c
> > @@ -61,7 +61,7 @@ void rdma_restrack_clean(struct ib_device *dev)
> > * @type: actual type of object to operate
> > * @show_details: count driver specific objects
> > */
> > -int rdma_restrack_count(struct ib_device *dev, enum rdma_restrack_type type,
> > +u32 rdma_restrack_count(struct ib_device *dev, enum rdma_restrack_type type,
> > bool show_details)
> > {
> > struct rdma_restrack_root *rt = &dev->res[type];
> > diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h
> > index 451f99e3717d..c081384740ce 100644
> > --- a/include/rdma/restrack.h
> > +++ b/include/rdma/restrack.h
> > @@ -123,7 +123,7 @@ struct rdma_restrack_entry {
> > u32 id;
> > };
> >
> > -int rdma_restrack_count(struct ib_device *dev, enum rdma_restrack_type type,
> > +u32 rdma_restrack_count(struct ib_device *dev, enum rdma_restrack_type type,
> > bool show_details);
> > /**
> > * rdma_is_kernel_res() - check the owner of resource
prev parent reply other threads:[~2026-07-07 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 6:02 [PATCH rdma-next v9] RDMA: Change capability fields in ib_device_attr from int to u32 Erni Sri Satya Vennela
2026-07-06 8:49 ` Leon Romanovsky
2026-07-07 10:20 ` Erni Sri Satya Vennela
2026-07-07 10:25 ` Leon Romanovsky [this message]
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=20260707102546.GM15188@unreal \
--to=leon@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=achender@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anna@kernel.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=cel@kernel.org \
--cc=clm@meta.com \
--cc=davem@davemloft.net \
--cc=ebadger@purestorage.com \
--cc=edumazet@google.com \
--cc=ernis@linux.microsoft.com \
--cc=haris.iqbal@ionos.com \
--cc=hch@lst.de \
--cc=horms@kernel.org \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=jinpu.wang@ionos.com \
--cc=jlayton@kernel.org \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=metze@samba.org \
--cc=mgurtovoy@nvidia.com \
--cc=mkalderon@marvell.com \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.com \
--cc=sagi@grimberg.me \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@gmail.com \
--cc=target-devel@vger.kernel.org \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
--cc=zyjzyj2000@gmail.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