RDMA/usnic: Remove the query_pkey callback
Subsystems (2)
PATCH 1/1 RDMA/usnic: Remove the query_pkey callback
Now that the query_pkey() isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.
--- drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 -- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 11 ----------- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 2 -- 3 files changed, 15 deletions(-)
drivers/infiniband/hw/usnic/usnic_ib_main.c +0 -2
@@ -315,7 +315,6 @@ static int usnic_port_immutable(struct ib_device *ibdev, u8 port_num,if (err)return err; - immutable->pkey_tbl_len = attr.pkey_tbl_len; immutable->gid_tbl_len = attr.gid_tbl_len;return 0 ;
@@ -355,7 +354,6 @@ static const struct ib_device_ops usnic_dev_ops = { .modify_qp = usnic_ib_modify_qp, .query_device = usnic_ib_query_device, .query_gid = usnic_ib_query_gid, - .query_pkey = usnic_ib_query_pkey, .query_port = usnic_ib_query_port, .query_qp = usnic_ib_query_qp, .reg_user_mr = usnic_ib_reg_mr,
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +0 -11
@@ -367,7 +367,6 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port, props->port_cap_flags =0 ; props->gid_tbl_len =1 ; - props->pkey_tbl_len =1 ; props->bad_pkey_cntr =0 ; props->qkey_viol_cntr =0 ; props->max_mtu =IB_MTU_4096 ;
@@ -437,16 +436,6 @@ int usnic_ib_query_gid(struct ib_device *ibdev, u8 port, int index,return 0 ; } -int usnic_ib_query_pkey (struct ib_device *ibdev,u8 port,u16 index, -u16 *pkey) -{ -if (index >0 ) -return -EINVAL ; - - *pkey =0xffff ; -return 0 ; -} -int usnic_ib_alloc_pd (struct ib_pd *ibpd,struct ib_udata *udata) {struct usnic_ib_pd *pd =to_upd (ibpd);
drivers/infiniband/hw/usnic/usnic_ib_verbs.h +0 -2
@@ -48,8 +48,6 @@ int usnic_ib_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr, struct ib_qp_init_attr *qp_init_attr);int usnic_ib_query_gid (struct ib_device *ibdev,u8 port,int index,union ib_gid *gid); -int usnic_ib_query_pkey (struct ib_device *ibdev,u8 port,u16 index, -u16 *pkey);int usnic_ib_alloc_pd (struct ib_pd *ibpd,struct ib_udata *udata);void usnic_ib_dealloc_pd (struct ib_pd *pd,struct ib_udata *udata); struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,
Signature · 1 line
2.26.2
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.
Not directly related to this patch, but pyverbs has a test which verifies that max_pkeys > 0, maybe this check should be removed.
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.
Or changed to work only for node_type == e.IBV_NODE_CA?
Thanks,
Kamal
Quoted 5 lines · Kamal Heib
Quoted 4 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.
Quoted 7 lines
Quoted 2 lines
Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
Kamal
BTW, do the efa care about pkey?
Thanks,
Kamal
Quoted 9 lines · Kamal Heib
Quoted 8 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.
Quoted 6 lines
Quoted 4 lines
Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
KamalBTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Quoted 12 lines · Gal Pressman
Quoted 11 lines · Kamal Heib
Quoted 10 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
KamalBTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Does the pkey appear on the wire, or is it just some cruft for API sake?
Jason
Quoted 20 lines · Jason Gunthorpe
Quoted 15 lines · Gal Pressman
Quoted 14 lines · Kamal Heib
Quoted 12 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
Kamal
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
BTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Does the pkey appear on the wire, or is it just some cruft for API sake?
On the wire. Included in the BTH (Base Transfer Header).
Håkon
Quoted 2 lines
Jason
Quoted 19 lines · Håkon Bugge
Quoted 19 lines · Jason Gunthorpe
Quoted 17 lines · Gal Pressman
Quoted 15 lines · Kamal Heib
Quoted 5 lines · Kamal Heib
Quoted 4 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Quoted 7 lines
Quoted 2 lines
Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
KamalBTW, do the efa care about pkey?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Does the pkey appear on the wire, or is it just some cruft for API sake?
On the wire. Included in the BTH (Base Transfer Header).
He was probably asking specifically about EFA.
I can't share any details about the wire protocol, does it matter?
Quoted 24 lines · Gal Pressman
Quoted 23 lines · Håkon Bugge
Quoted 23 lines · Jason Gunthorpe
Quoted 20 lines · Gal Pressman
Quoted 9 lines · Kamal Heib
Quoted 8 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Quoted 6 lines
Quoted 4 lines
Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
KamalBTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Does the pkey appear on the wire, or is it just some cruft for API sake?
On the wire. Included in the BTH (Base Transfer Header).
He was probably asking specifically about EFA.
I can't share any details about the wire protocol, does it matter?
If it isn't actually used for anything then the driver shouldn't expose PKEY at all, if you do use it then leave it.
Jason
Quoted 27 lines · Jason Gunthorpe
Quoted 26 lines · Gal Pressman
Quoted 25 lines · Håkon Bugge
Quoted 24 lines · Jason Gunthorpe
Quoted 12 lines · Gal Pressman
Quoted 11 lines · Kamal Heib
Quoted 10 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
KamalBTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Does the pkey appear on the wire, or is it just some cruft for API sake?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
On the wire. Included in the BTH (Base Transfer Header).
He was probably asking specifically about EFA.
I can't share any details about the wire protocol, does it matter?If it isn't actually used for anything then the driver shouldn't expose PKEY at all, if you do use it then leave it.
How would that work? How can you not expose pkeys and still have ibv_ud_pingpong work?
You mean remove query_pkey, but still support IBV_QP_PKEY_INDEX in modify_qp?
Quoted 33 lines · Gal Pressman
Quoted 32 lines · Jason Gunthorpe
Quoted 30 lines · Gal Pressman
Quoted 19 lines · Håkon Bugge
Quoted 19 lines · Jason Gunthorpe
Quoted 17 lines · Gal Pressman
Quoted 15 lines · Kamal Heib
Quoted 5 lines · Kamal Heib
Quoted 4 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Quoted 7 lines
Quoted 2 lines
Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
KamalBTW, do the efa care about pkey?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Does the pkey appear on the wire, or is it just some cruft for API sake?
On the wire. Included in the BTH (Base Transfer Header).
He was probably asking specifically about EFA.
I can't share any details about the wire protocol, does it matter?
Quoted 6 lines
Quoted 2 lines
If it isn't actually used for anything then the driver shouldn't expose PKEY at all, if you do use it then leave it.
How would that work? How can you not expose pkeys and still have
ibv_ud_pingpongwork?
You mean removequery_pkey, but still supportIBV_QP_PKEY_INDEXinmodify_qp?
iWarp doesn't use PKEY at all, so you'd have to follow their model. Some of the userspace that assumes IB would probably need fixing (eg ud pingpong does not support iwarp)
Jason
Quoted 37 lines · Jason Gunthorpe
Quoted 36 lines · Gal Pressman
Quoted 34 lines · Jason Gunthorpe
Quoted 24 lines · Gal Pressman
Quoted 23 lines · Håkon Bugge
Quoted 23 lines · Jason Gunthorpe
Quoted 20 lines · Gal Pressman
Quoted 9 lines · Kamal Heib
Quoted 8 lines · Kamal Heib
Quoted 6 lines · Gal Pressman
Quoted 2 lines · Kamal Heib
Now that the
query_pkey()isn't mandatory by the RDMA core, this callback can be removed from the usnic provider.Not directly related to this patch, but pyverbs has a test which verifies that
max_pkeys> 0, maybe this check should be removed.Quoted 6 lines
Quoted 4 lines
Or changed to work only for
node_type== e.IBV_NODE_CA?Thanks,
KamalBTW, do the efa care about pkey?
Depends.. We only support the default pkey so it doesn't do much in terms of functionality, but we still need to support it as part of the QP state machine for modify QP.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Does the pkey appear on the wire, or is it just some cruft for API sake?
On the wire. Included in the BTH (Base Transfer Header).
He was probably asking specifically about EFA.
I can't share any details about the wire protocol, does it matter?If it isn't actually used for anything then the driver shouldn't expose PKEY at all, if you do use it then leave it.
Quoted 7 lines
Quoted 3 lines
How would that work? How can you not expose pkeys and still have
ibv_ud_pingpongwork?
You mean removequery_pkey, but still supportIBV_QP_PKEY_INDEXinmodify_qp?iWarp doesn't use PKEY at all, so you'd have to follow their model. Some of the userspace that assumes IB would probably need fixing (eg ud pingpong does not support iwarp)
Thanks, I'd rather keep supporting the default pkey only.