Hi Kamal, > -----Original Message----- > From: Kamal Heib <kamalheib1@xxxxxxxxx> > Sent: Monday, October 25, 2021 3:37 PM > To: Prabhakar Kushwaha <pkushwaha@xxxxxxxxxxx> > Cc: linux-rdma@xxxxxxxxxxxxxxx; Michal Kalderon <mkalderon@xxxxxxxxxxx>; > dledford@xxxxxxxxxx; jgg@xxxxxxxx; Ariel Elior <aelior@xxxxxxxxxxx>; Alok > Prasad <palok@xxxxxxxxxxx> > Subject: Re: [PATCH for-next] RDMA/qedr: Remove unsupported > qedr_resize_cq callback > > ---------------------------------------------------------------------- > On Mon, Oct 25, 2021 at 09:24:41AM +0000, Prabhakar Kushwaha wrote: > > Dear Kamal, > > > > Hi Prabhakar, > > > > -----Original Message----- > > > From: Kamal Heib <kamalheib1@xxxxxxxxx> > > > Sent: Monday, October 25, 2021 9:27 AM > > > To: linux-rdma@xxxxxxxxxxxxxxx > > > Cc: Michal Kalderon <mkalderon@xxxxxxxxxxx>; Ariel Elior > > > <aelior@xxxxxxxxxxx>; Doug Ledford <dledford@xxxxxxxxxx>; Jason > > > Gunthorpe <jgg@xxxxxxxx>; Kamal Heib <kamalheib1@xxxxxxxxx> > > > Subject: [PATCH for-next] RDMA/qedr: Remove unsupported > > > qedr_resize_cq callback > > > > > > ---------------------------------------------------------------------- > > > There is no need to return always zero for function which is not supported. > > > > > > Fixes: a7efd7773e31 ("qedr: Add support for PD,PKEY and CQ verbs") > > > Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx> > > > --- > > > drivers/infiniband/hw/qedr/main.c | 1 - > drivers/infiniband/hw/qedr/verbs.c | > > > 10 ---------- drivers/infiniband/hw/qedr/verbs.h | 1 - > > > 3 files changed, 12 deletions(-) > > > > Have you tested this patch? I afraid, there may be a crash because of this > > > > I do not think that we will face a crash, because the libqedr in the > rdma-core package dose not implement the resize_cq() callback. > > Furthermore, if there is a bug in the kernel rdma core this doesn't mean > that the qedr driver need to fake supporting resize_cq() to avoid a crash!. > a7efd7773e31 is quite old commit. Not sure about the reason behind such function definition. But a patch should consider the possible side-effects. > Anyway, To be in the safe side we I'll prepare another patch that checks > for NULL in the core and return -EOPNOTSUPP if resize_cq() is not set > by the driver. > Thanks!! --pk