diff mbox series

[for-next,v1,4/7] RDMA/siw: Remove the query_pkey callback

Message ID 20200714183414.61069-5-kamalheib1@gmail.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series RDMA: Remove query_pkey from iwarp providers | expand

Commit Message

Kamal Heib July 14, 2020, 6:34 p.m. UTC
Now that the query_pkey() isn't mandatory by the RDMA core for iwarp
providers, this callback can be removed.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/sw/siw/siw_main.c  | 1 -
 drivers/infiniband/sw/siw/siw_verbs.c | 9 ---------
 drivers/infiniband/sw/siw/siw_verbs.h | 1 -
 3 files changed, 11 deletions(-)

Comments

Bernard Metzler July 15, 2020, 7:29 a.m. UTC | #1
-----"Kamal Heib" <kamalheib1@gmail.com> wrote: -----

>To: linux-rdma@vger.kernel.org
>From: "Kamal Heib" <kamalheib1@gmail.com>
>Date: 07/14/2020 08:34PM
>Cc: "Doug Ledford" <dledford@redhat.com>, "Jason Gunthorpe"
><jgg@ziepe.ca>, "Michal Kalderon" <mkalderon@marvell.com>, "Potnuri
>Bharat Teja" <bharat@chelsio.com>, "Shiraz Saleem"
><shiraz.saleem@intel.com>, "Bernard Metzler" <bmt@zurich.ibm.com>,
>"Kamal Heib" <kamalheib1@gmail.com>
>Subject: [EXTERNAL] [PATCH for-next v1 4/7] RDMA/siw: Remove the
>query_pkey callback
>
>Now that the query_pkey() isn't mandatory by the RDMA core for iwarp
>providers, this callback can be removed.
>
>Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
>---
> drivers/infiniband/sw/siw/siw_main.c  | 1 -
> drivers/infiniband/sw/siw/siw_verbs.c | 9 ---------
> drivers/infiniband/sw/siw/siw_verbs.h | 1 -
> 3 files changed, 11 deletions(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_main.c
>b/drivers/infiniband/sw/siw/siw_main.c
>index a0b8cc643c5c..18c08259157f 100644
>--- a/drivers/infiniband/sw/siw/siw_main.c
>+++ b/drivers/infiniband/sw/siw/siw_main.c
>@@ -288,7 +288,6 @@ static const struct ib_device_ops siw_device_ops
>= {
> 	.post_srq_recv = siw_post_srq_recv,
> 	.query_device = siw_query_device,
> 	.query_gid = siw_query_gid,
>-	.query_pkey = siw_query_pkey,
> 	.query_port = siw_query_port,
> 	.query_qp = siw_query_qp,
> 	.query_srq = siw_query_srq,
>diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
>b/drivers/infiniband/sw/siw/siw_verbs.c
>index 0d509f7a10a6..adafa1b8bebe 100644
>--- a/drivers/infiniband/sw/siw/siw_verbs.c
>+++ b/drivers/infiniband/sw/siw/siw_verbs.c
>@@ -176,7 +176,6 @@ int siw_query_port(struct ib_device *base_dev, u8
>port,
> 	attr->active_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
> 	attr->phys_state = sdev->state == IB_PORT_ACTIVE ?
> 		IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
>-	attr->pkey_tbl_len = 1;
> 	attr->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_DEVICE_MGMT_SUP;
> 	attr->state = sdev->state;
> 	/*
>@@ -204,20 +203,12 @@ int siw_get_port_immutable(struct ib_device
>*base_dev, u8 port,
> 	if (rv)
> 		return rv;
> 
>-	port_immutable->pkey_tbl_len = attr.pkey_tbl_len;
> 	port_immutable->gid_tbl_len = attr.gid_tbl_len;
> 	port_immutable->core_cap_flags = RDMA_CORE_PORT_IWARP;
> 
> 	return 0;
> }
> 
>-int siw_query_pkey(struct ib_device *base_dev, u8 port, u16 idx, u16
>*pkey)
>-{
>-	/* Report the default pkey */
>-	*pkey = 0xffff;
>-	return 0;
>-}
>-
> int siw_query_gid(struct ib_device *base_dev, u8 port, int idx,
> 		  union ib_gid *gid)
> {
>diff --git a/drivers/infiniband/sw/siw/siw_verbs.h
>b/drivers/infiniband/sw/siw/siw_verbs.h
>index 9335c48c01de..d9572275a6b6 100644
>--- a/drivers/infiniband/sw/siw/siw_verbs.h
>+++ b/drivers/infiniband/sw/siw/siw_verbs.h
>@@ -46,7 +46,6 @@ int siw_create_cq(struct ib_cq *base_cq, const
>struct ib_cq_init_attr *attr,
> 		  struct ib_udata *udata);
> int siw_query_port(struct ib_device *base_dev, u8 port,
> 		   struct ib_port_attr *attr);
>-int siw_query_pkey(struct ib_device *base_dev, u8 port, u16 idx, u16
>*pkey);
> int siw_query_gid(struct ib_device *base_dev, u8 port, int idx,
> 		  union ib_gid *gid);
> int siw_alloc_pd(struct ib_pd *base_pd, struct ib_udata *udata);
>-- 
>2.25.4
>
>
Thanks, Kamal!

Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index a0b8cc643c5c..18c08259157f 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -288,7 +288,6 @@  static const struct ib_device_ops siw_device_ops = {
 	.post_srq_recv = siw_post_srq_recv,
 	.query_device = siw_query_device,
 	.query_gid = siw_query_gid,
-	.query_pkey = siw_query_pkey,
 	.query_port = siw_query_port,
 	.query_qp = siw_query_qp,
 	.query_srq = siw_query_srq,
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 0d509f7a10a6..adafa1b8bebe 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -176,7 +176,6 @@  int siw_query_port(struct ib_device *base_dev, u8 port,
 	attr->active_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
 	attr->phys_state = sdev->state == IB_PORT_ACTIVE ?
 		IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
-	attr->pkey_tbl_len = 1;
 	attr->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_DEVICE_MGMT_SUP;
 	attr->state = sdev->state;
 	/*
@@ -204,20 +203,12 @@  int siw_get_port_immutable(struct ib_device *base_dev, u8 port,
 	if (rv)
 		return rv;
 
-	port_immutable->pkey_tbl_len = attr.pkey_tbl_len;
 	port_immutable->gid_tbl_len = attr.gid_tbl_len;
 	port_immutable->core_cap_flags = RDMA_CORE_PORT_IWARP;
 
 	return 0;
 }
 
-int siw_query_pkey(struct ib_device *base_dev, u8 port, u16 idx, u16 *pkey)
-{
-	/* Report the default pkey */
-	*pkey = 0xffff;
-	return 0;
-}
-
 int siw_query_gid(struct ib_device *base_dev, u8 port, int idx,
 		  union ib_gid *gid)
 {
diff --git a/drivers/infiniband/sw/siw/siw_verbs.h b/drivers/infiniband/sw/siw/siw_verbs.h
index 9335c48c01de..d9572275a6b6 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.h
+++ b/drivers/infiniband/sw/siw/siw_verbs.h
@@ -46,7 +46,6 @@  int siw_create_cq(struct ib_cq *base_cq, const struct ib_cq_init_attr *attr,
 		  struct ib_udata *udata);
 int siw_query_port(struct ib_device *base_dev, u8 port,
 		   struct ib_port_attr *attr);
-int siw_query_pkey(struct ib_device *base_dev, u8 port, u16 idx, u16 *pkey);
 int siw_query_gid(struct ib_device *base_dev, u8 port, int idx,
 		  union ib_gid *gid);
 int siw_alloc_pd(struct ib_pd *base_pd, struct ib_udata *udata);