diff mbox series

[rdma-next,v3,2/2] IB/usnic: Remove stub functions

Message ID 1546951333-8109-3-git-send-email-galpress@amazon.com (mailing list archive)
State Superseded
Headers show
Series IB device in-kernel API support indication | expand

Commit Message

Gal Pressman Jan. 8, 2019, 12:42 p.m. UTC
Lack of mandatory verbs no longer fail device registration, the device
will be marked as a non-kverbs provider.

Cc: Christian Benvenuti <benve@cisco.com>
Cc: Nelson Escobar <neescoba@cisco.com>
Cc: Parvi Kaustubhi <pkaustub@cisco.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/hw/usnic/usnic_ib_main.c  |  7 ----
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 53 ----------------------------
 drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 15 --------
 3 files changed, 75 deletions(-)

Comments

Parvi Kaustubhi (pkaustub) Jan. 9, 2019, 7:23 p.m. UTC | #1
Thanks, we have tested this. 

Tested-by: Parvi Kaustubhi <pkaustub@cisco.com>

> On Jan 8, 2019, at 4:42 AM, Gal Pressman <galpress@amazon.com> wrote:
> 
> Lack of mandatory verbs no longer fail device registration, the device
> will be marked as a non-kverbs provider.
> 
> Cc: Christian Benvenuti <benve@cisco.com>
> Cc: Nelson Escobar <neescoba@cisco.com>
> Cc: Parvi Kaustubhi <pkaustub@cisco.com>
> Signed-off-by: Gal Pressman <galpress@amazon.com>
> ---
> drivers/infiniband/hw/usnic/usnic_ib_main.c  |  7 ----
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 53 ----------------------------
> drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 15 --------
> 3 files changed, 75 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c
> index b2323a52a0dd..cc68f3d757eb 100644
> --- a/drivers/infiniband/hw/usnic/usnic_ib_main.c
> +++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c
> @@ -333,32 +333,25 @@ static void usnic_get_dev_fw_str(struct ib_device *device, char *str)
> static const struct ib_device_ops usnic_dev_ops = {
> 	.alloc_pd = usnic_ib_alloc_pd,
> 	.alloc_ucontext = usnic_ib_alloc_ucontext,
> -	.create_ah = usnic_ib_create_ah,
> 	.create_cq = usnic_ib_create_cq,
> 	.create_qp = usnic_ib_create_qp,
> 	.dealloc_pd = usnic_ib_dealloc_pd,
> 	.dealloc_ucontext = usnic_ib_dealloc_ucontext,
> 	.dereg_mr = usnic_ib_dereg_mr,
> -	.destroy_ah = usnic_ib_destroy_ah,
> 	.destroy_cq = usnic_ib_destroy_cq,
> 	.destroy_qp = usnic_ib_destroy_qp,
> 	.get_dev_fw_str = usnic_get_dev_fw_str,
> -	.get_dma_mr = usnic_ib_get_dma_mr,
> 	.get_link_layer = usnic_ib_port_link_layer,
> 	.get_netdev = usnic_get_netdev,
> 	.get_port_immutable = usnic_port_immutable,
> 	.mmap = usnic_ib_mmap,
> 	.modify_qp = usnic_ib_modify_qp,
> -	.poll_cq = usnic_ib_poll_cq,
> -	.post_recv = usnic_ib_post_recv,
> -	.post_send = usnic_ib_post_send,
> 	.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,
> -	.req_notify_cq = usnic_ib_req_notify_cq,
> };
> 
> /* Start of PF discovery section */
> diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> index 1d4abef17e38..53c9e9b8b5c9 100644
> --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> @@ -760,57 +760,4 @@ int usnic_ib_mmap(struct ib_ucontext *context,
> 	return -EINVAL;
> }
> 
> -/* In ib callbacks section -  Start of stub funcs */
> -struct ib_ah *usnic_ib_create_ah(struct ib_pd *pd,
> -				 struct rdma_ah_attr *ah_attr,
> -				 u32 flags,
> -				 struct ib_udata *udata)
> -
> -{
> -	usnic_dbg("\n");
> -	return ERR_PTR(-EPERM);
> -}
> -
> -int usnic_ib_destroy_ah(struct ib_ah *ah, u32 flags)
> -{
> -	usnic_dbg("\n");
> -	return -EINVAL;
> -}
> -
> -int usnic_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
> -		       const struct ib_send_wr **bad_wr)
> -{
> -	usnic_dbg("\n");
> -	return -EINVAL;
> -}
> -
> -int usnic_ib_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
> -		       const struct ib_recv_wr **bad_wr)
> -{
> -	usnic_dbg("\n");
> -	return -EINVAL;
> -}
> -
> -int usnic_ib_poll_cq(struct ib_cq *ibcq, int num_entries,
> -				struct ib_wc *wc)
> -{
> -	usnic_dbg("\n");
> -	return -EINVAL;
> -}
> -
> -int usnic_ib_req_notify_cq(struct ib_cq *cq,
> -					enum ib_cq_notify_flags flags)
> -{
> -	usnic_dbg("\n");
> -	return -EINVAL;
> -}
> -
> -struct ib_mr *usnic_ib_get_dma_mr(struct ib_pd *pd, int acc)
> -{
> -	usnic_dbg("\n");
> -	return ERR_PTR(-ENOMEM);
> -}
> -
> -
> -/* In ib callbacks section - End of stub funcs */
> /* End of ib callbacks section */
> diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.h b/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
> index e33144261b9a..99a6d81c2bcd 100644
> --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
> +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
> @@ -75,19 +75,4 @@ struct ib_ucontext *usnic_ib_alloc_ucontext(struct ib_device *ibdev,
> int usnic_ib_dealloc_ucontext(struct ib_ucontext *ibcontext);
> int usnic_ib_mmap(struct ib_ucontext *context,
> 			struct vm_area_struct *vma);
> -struct ib_ah *usnic_ib_create_ah(struct ib_pd *pd,
> -				 struct rdma_ah_attr *ah_attr,
> -				 u32 flags,
> -				 struct ib_udata *udata);
> -
> -int usnic_ib_destroy_ah(struct ib_ah *ah, u32 flags);
> -int usnic_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
> -			const struct ib_send_wr **bad_wr);
> -int usnic_ib_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
> -		       const struct ib_recv_wr **bad_wr);
> -int usnic_ib_poll_cq(struct ib_cq *ibcq, int num_entries,
> -			struct ib_wc *wc);
> -int usnic_ib_req_notify_cq(struct ib_cq *cq,
> -				enum ib_cq_notify_flags flags);
> -struct ib_mr *usnic_ib_get_dma_mr(struct ib_pd *pd, int acc);
> #endif /* !USNIC_IB_VERBS_H */
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c
index b2323a52a0dd..cc68f3d757eb 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_main.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c
@@ -333,32 +333,25 @@  static void usnic_get_dev_fw_str(struct ib_device *device, char *str)
 static const struct ib_device_ops usnic_dev_ops = {
 	.alloc_pd = usnic_ib_alloc_pd,
 	.alloc_ucontext = usnic_ib_alloc_ucontext,
-	.create_ah = usnic_ib_create_ah,
 	.create_cq = usnic_ib_create_cq,
 	.create_qp = usnic_ib_create_qp,
 	.dealloc_pd = usnic_ib_dealloc_pd,
 	.dealloc_ucontext = usnic_ib_dealloc_ucontext,
 	.dereg_mr = usnic_ib_dereg_mr,
-	.destroy_ah = usnic_ib_destroy_ah,
 	.destroy_cq = usnic_ib_destroy_cq,
 	.destroy_qp = usnic_ib_destroy_qp,
 	.get_dev_fw_str = usnic_get_dev_fw_str,
-	.get_dma_mr = usnic_ib_get_dma_mr,
 	.get_link_layer = usnic_ib_port_link_layer,
 	.get_netdev = usnic_get_netdev,
 	.get_port_immutable = usnic_port_immutable,
 	.mmap = usnic_ib_mmap,
 	.modify_qp = usnic_ib_modify_qp,
-	.poll_cq = usnic_ib_poll_cq,
-	.post_recv = usnic_ib_post_recv,
-	.post_send = usnic_ib_post_send,
 	.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,
-	.req_notify_cq = usnic_ib_req_notify_cq,
 };
 
 /* Start of PF discovery section */
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index 1d4abef17e38..53c9e9b8b5c9 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -760,57 +760,4 @@  int usnic_ib_mmap(struct ib_ucontext *context,
 	return -EINVAL;
 }
 
-/* In ib callbacks section -  Start of stub funcs */
-struct ib_ah *usnic_ib_create_ah(struct ib_pd *pd,
-				 struct rdma_ah_attr *ah_attr,
-				 u32 flags,
-				 struct ib_udata *udata)
-
-{
-	usnic_dbg("\n");
-	return ERR_PTR(-EPERM);
-}
-
-int usnic_ib_destroy_ah(struct ib_ah *ah, u32 flags)
-{
-	usnic_dbg("\n");
-	return -EINVAL;
-}
-
-int usnic_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
-		       const struct ib_send_wr **bad_wr)
-{
-	usnic_dbg("\n");
-	return -EINVAL;
-}
-
-int usnic_ib_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
-		       const struct ib_recv_wr **bad_wr)
-{
-	usnic_dbg("\n");
-	return -EINVAL;
-}
-
-int usnic_ib_poll_cq(struct ib_cq *ibcq, int num_entries,
-				struct ib_wc *wc)
-{
-	usnic_dbg("\n");
-	return -EINVAL;
-}
-
-int usnic_ib_req_notify_cq(struct ib_cq *cq,
-					enum ib_cq_notify_flags flags)
-{
-	usnic_dbg("\n");
-	return -EINVAL;
-}
-
-struct ib_mr *usnic_ib_get_dma_mr(struct ib_pd *pd, int acc)
-{
-	usnic_dbg("\n");
-	return ERR_PTR(-ENOMEM);
-}
-
-
-/* In ib callbacks section - End of stub funcs */
 /* End of ib callbacks section */
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.h b/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
index e33144261b9a..99a6d81c2bcd 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.h
@@ -75,19 +75,4 @@  struct ib_ucontext *usnic_ib_alloc_ucontext(struct ib_device *ibdev,
 int usnic_ib_dealloc_ucontext(struct ib_ucontext *ibcontext);
 int usnic_ib_mmap(struct ib_ucontext *context,
 			struct vm_area_struct *vma);
-struct ib_ah *usnic_ib_create_ah(struct ib_pd *pd,
-				 struct rdma_ah_attr *ah_attr,
-				 u32 flags,
-				 struct ib_udata *udata);
-
-int usnic_ib_destroy_ah(struct ib_ah *ah, u32 flags);
-int usnic_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
-			const struct ib_send_wr **bad_wr);
-int usnic_ib_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
-		       const struct ib_recv_wr **bad_wr);
-int usnic_ib_poll_cq(struct ib_cq *ibcq, int num_entries,
-			struct ib_wc *wc);
-int usnic_ib_req_notify_cq(struct ib_cq *cq,
-				enum ib_cq_notify_flags flags);
-struct ib_mr *usnic_ib_get_dma_mr(struct ib_pd *pd, int acc);
 #endif /* !USNIC_IB_VERBS_H */