Message ID | 20200805210051.800859-1-kamalheib1@gmail.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | [for-rc] RDMA/usnic: Fix reported max_pkeys attribute | expand |
On Thu, Aug 06, 2020 at 12:00:51AM +0300, Kamal Heib wrote: > Make sure to report the right max_pkeys attribute value to indicate the > maximum number of partitions supported by the usnic device. Why does usnic support pkeys? This needs more explanation Jason
On Wed, Aug 05, 2020 at 07:17:42PM -0300, Jason Gunthorpe wrote: > On Thu, Aug 06, 2020 at 12:00:51AM +0300, Kamal Heib wrote: > > Make sure to report the right max_pkeys attribute value to indicate the > > maximum number of partitions supported by the usnic device. > > Why does usnic support pkeys? This needs more explanation > > Jason Looks like the usnic provider is acting like the RoCE providers by returning the default pkey when calling the query_pkey() callback, Do you think that this needs to removed like what was done for iWarp providers? int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey) { if (index > 0) return -EINVAL; *pkey = 0xffff; return 0; } Thanks, Kamal
On Mon, Aug 10, 2020 at 11:19:18PM +0300, Kamal Heib wrote: > On Wed, Aug 05, 2020 at 07:17:42PM -0300, Jason Gunthorpe wrote: > > On Thu, Aug 06, 2020 at 12:00:51AM +0300, Kamal Heib wrote: > > > Make sure to report the right max_pkeys attribute value to indicate the > > > maximum number of partitions supported by the usnic device. > > > > Why does usnic support pkeys? This needs more explanation > > > > Jason > > Looks like the usnic provider is acting like the RoCE providers by returning > the default pkey when calling the query_pkey() callback, Do you think that > this needs to removed like what was done for iWarp providers? > > int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index, > u16 *pkey) > { > if (index > 0) > return -EINVAL; > > *pkey = 0xffff; > return 0; > } You'd have to check the libfabric provider to see if it cares or not Jason
On Fri, Aug 14, 2020 at 01:54:08PM -0300, Jason Gunthorpe wrote: > On Mon, Aug 10, 2020 at 11:19:18PM +0300, Kamal Heib wrote: > > On Wed, Aug 05, 2020 at 07:17:42PM -0300, Jason Gunthorpe wrote: > > > On Thu, Aug 06, 2020 at 12:00:51AM +0300, Kamal Heib wrote: > > > > Make sure to report the right max_pkeys attribute value to indicate the > > > > maximum number of partitions supported by the usnic device. > > > > > > Why does usnic support pkeys? This needs more explanation > > > > > > Jason > > > > Looks like the usnic provider is acting like the RoCE providers by returning > > the default pkey when calling the query_pkey() callback, Do you think that > > this needs to removed like what was done for iWarp providers? > > > > int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index, > > u16 *pkey) > > { > > if (index > 0) > > return -EINVAL; > > > > *pkey = 0xffff; > > return 0; > > } > > You'd have to check the libfabric provider to see if it cares or not > > Jason Looks like the usnic provider under libfabric doesn't care about pkey/query_pkey, I'll prepare a patch that will remove the query_pkey() callback. kheib master ~ git upstream libfabric git grep -n query_pkey prov/usnic/ kheib master ~ git upstream libfabric git grep -n pkey prov/usnic/ kheib master ~ git upstream libfabric Thanks, Kamal
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c index b8a77ce11590..0cb2a73d46ee 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c @@ -309,7 +309,7 @@ int usnic_ib_query_device(struct ib_device *ibdev, props->max_pd = USNIC_UIOM_MAX_PD_CNT; props->max_mr = USNIC_UIOM_MAX_MR_CNT; props->local_ca_ack_delay = 0; - props->max_pkeys = 0; + props->max_pkeys = 1; props->atomic_cap = IB_ATOMIC_NONE; props->masked_atomic_cap = props->atomic_cap; props->max_qp_rd_atom = 0;
Make sure to report the right max_pkeys attribute value to indicate the maximum number of partitions supported by the usnic device. Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver") Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Cc: Christian Benvenuti <benve@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)