All of lore.kernel.org
 help / color / mirror / Atom feed
* rdma-core new/old compatability
@ 2020-02-27 13:11 Michal Kalderon
  2020-02-27 13:55 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kalderon @ 2020-02-27 13:11 UTC (permalink / raw)
  To: linux-rdma, Leon Romanovsky, Jason Gunthorpe, Kamal Heib

Hi Kamal, Jason, 

Running a version of ibv_devinfo compiled against an old rdma-core (ibv_devinfo from libibverbs-utils-16.2-3-fc28.x86_64 )
failed to run with rdma-core release 28.0 for qedr.

The patch that caused this is commit c2841076
https://github.com/linux-rdma/rdma-core/commit/c28410765bdfe5cbed3cb2cdb1584eac3941469c#diff-8da8bc8b2790169de557d5dee83a278e
c28410765bdf 

libibverbs: Fix incorrect return code ...

The proper return code is EOPNOTSUPP when an operation is not supported.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>

The reason it failed is because qedr doesn't have a query_device_ex callback, so vctx->query_device_ex returns EOPNOTSUPP, and old libibverbs
Compares the return code to ENOSYS

I think applications compiled against old rdma-core should continue to run on new ones as well.
Can this commit be reverted? 

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rdma-core new/old compatability
  2020-02-27 13:11 rdma-core new/old compatability Michal Kalderon
@ 2020-02-27 13:55 ` Jason Gunthorpe
  2020-03-03 14:42   ` [EXT] " Michal Kalderon
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2020-02-27 13:55 UTC (permalink / raw)
  To: Michal Kalderon; +Cc: linux-rdma, Leon Romanovsky, Kamal Heib

On Thu, Feb 27, 2020 at 01:11:13PM +0000, Michal Kalderon wrote:
> Hi Kamal, Jason, 
> 
> Running a version of ibv_devinfo compiled against an old rdma-core (ibv_devinfo from libibverbs-utils-16.2-3-fc28.x86_64 )
> failed to run with rdma-core release 28.0 for qedr.
> 
> The patch that caused this is commit c2841076
> https://github.com/linux-rdma/rdma-core/commit/c28410765bdfe5cbed3cb2cdb1584eac3941469c#diff-8da8bc8b2790169de557d5dee83a278e
> c28410765bdf 
> 
> libibverbs: Fix incorrect return code ...
> 
> The proper return code is EOPNOTSUPP when an operation is not supported.
> 
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> 
> The reason it failed is because qedr doesn't have a query_device_ex
> callback, so vctx->query_device_ex returns EOPNOTSUPP, and old
> libibverbs Compares the return code to ENOSYS

This is surprising and unfortunate

> I think applications compiled against old rdma-core should continue
> to run on new ones as well.  Can this commit be reverted?

I would prefer to only revert the little bit that might be needed for
compatability.

Perhaps we should change the dummy function to implement
query_device_ex for all providers? Zeroing the extended data should be
sufficient I think.

Unfortunately we are changing return codes inadvertantly quite often,
and the providers tend to use different codes.

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [EXT] Re: rdma-core new/old compatability
  2020-02-27 13:55 ` Jason Gunthorpe
@ 2020-03-03 14:42   ` Michal Kalderon
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Kalderon @ 2020-03-03 14:42 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma, Leon Romanovsky, Kamal Heib

> From: Jason Gunthorpe <jgg@mellanox.com>
> Sent: Thursday, February 27, 2020 3:55 PM
> 
> ----------------------------------------------------------------------
> On Thu, Feb 27, 2020 at 01:11:13PM +0000, Michal Kalderon wrote:
> > Hi Kamal, Jason,
> >
> > Running a version of ibv_devinfo compiled against an old rdma-core
> > (ibv_devinfo from libibverbs-utils-16.2-3-fc28.x86_64 ) failed to run with
> rdma-core release 28.0 for qedr.
> >
> > The patch that caused this is commit c2841076
> > https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_linux-
> > 2Drdma_rdma-
> 2Dcore_commit_c28410765bdfe5cbed3cb2cdb1584eac3941469c-23d
> > iff-
> 2D8da8bc8b2790169de557d5dee83a278e&d=DwIBAg&c=nKjWec2b6R0mOyP
> az7xt
> > fQ&r=5_8rRZTDuAS-6X-cGRU9Fo4yjCnkS1t7T3-
> gjL4FQng&m=8roKblaWiyWNhzEkhi8
> > gJYJs1ZHqJ0lqf_0OMh3fHBM&s=x5-
> fhg21NUEcxJ2zxM135ujpopHtey138zz9waiflS8
> > &e=
> > c28410765bdf
> >
> > libibverbs: Fix incorrect return code ...
> >
> > The proper return code is EOPNOTSUPP when an operation is not
> supported.
> >
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> >
> > The reason it failed is because qedr doesn't have a query_device_ex
> > callback, so vctx->query_device_ex returns EOPNOTSUPP, and old
> > libibverbs Compares the return code to ENOSYS
> 
> This is surprising and unfortunate
> 
> > I think applications compiled against old rdma-core should continue to
> > run on new ones as well.  Can this commit be reverted?
> 
> I would prefer to only revert the little bit that might be needed for
> compatability.
> 
> Perhaps we should change the dummy function to implement
> query_device_ex for all providers? Zeroing the extended data should be
> sufficient I think.
I've submitted pull-request #713 that implements the dummy function.

Thanks,
Michal

> 
> Unfortunately we are changing return codes inadvertantly quite often, and
> the providers tend to use different codes.
> 
> Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-03 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 13:11 rdma-core new/old compatability Michal Kalderon
2020-02-27 13:55 ` Jason Gunthorpe
2020-03-03 14:42   ` [EXT] " Michal Kalderon

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.