Message ID | 20210620201503.67055-1-kamalheib1@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | [for-next] RDMA/irdma: Use the queried port attributes | expand |
> -----Original Message----- > From: Kamal Heib <kamalheib1@gmail.com> > Sent: Sunday, June 20, 2021 3:15 PM > To: linux-rdma@vger.kernel.org > Cc: Ismail, Mustafa <mustafa.ismail@intel.com>; Saleem, Shiraz > <shiraz.saleem@intel.com>; Doug Ledford <dledford@redhat.com>; Jason > Gunthorpe <jgg@ziepe.ca>; Kamal Heib <kamalheib1@gmail.com> > Subject: [PATCH for-next] RDMA/irdma: Use the queried port attributes > > Instead of hard code the gid_table_len value, use the value from the > ib_query_port() attributes. > > Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb > APIs") > Signed-off-by: Kamal Heib <kamalheib1@gmail.com> > --- > drivers/infiniband/hw/irdma/verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/irdma/verbs.c > b/drivers/infiniband/hw/irdma/verbs.c > index e8b170f0d997..5ae5dbcbc3a5 100644 > --- a/drivers/infiniband/hw/irdma/verbs.c > +++ b/drivers/infiniband/hw/irdma/verbs.c > @@ -3627,7 +3627,7 @@ static int irdma_iw_port_immutable(struct > ib_device *ibdev, u32 port_num, > err = ib_query_port(ibdev, port_num, &attr); > if (err) > return err; > - immutable->gid_tbl_len = 1; > + immutable->gid_tbl_len = attr.gid_tbl_len; > > return 0; > } > -- > 2.31.1 Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
On Sun, Jun 20, 2021 at 11:15:03PM +0300, Kamal Heib wrote: > Instead of hard code the gid_table_len value, use the value from the > ib_query_port() attributes. > > Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") > Signed-off-by: Kamal Heib <kamalheib1@gmail.com> > Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> > --- > drivers/infiniband/hw/irdma/verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to for-next, thanks Jason
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index e8b170f0d997..5ae5dbcbc3a5 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3627,7 +3627,7 @@ static int irdma_iw_port_immutable(struct ib_device *ibdev, u32 port_num, err = ib_query_port(ibdev, port_num, &attr); if (err) return err; - immutable->gid_tbl_len = 1; + immutable->gid_tbl_len = attr.gid_tbl_len; return 0; }
Instead of hard code the gid_table_len value, use the value from the ib_query_port() attributes. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Kamal Heib <kamalheib1@gmail.com> --- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)