diff mbox series

[for-next,2/6] RDMA/bnxt_re: Add disassociate ucontext support

Message ID 1681125115-7127-3-git-send-email-selvin.xavier@broadcom.com (mailing list archive)
State Superseded
Headers show
Series RDMA/bnxt_re: driver update for supporting low latency push | expand

Commit Message

Selvin Xavier April 10, 2023, 11:11 a.m. UTC
Add empty stub for disassociate ucontext as done in other vendor
drivers.

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/main.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Leon Romanovsky April 10, 2023, 12:27 p.m. UTC | #1
On Mon, Apr 10, 2023 at 04:11:51AM -0700, Selvin Xavier wrote:
> Add empty stub for disassociate ucontext as done in other vendor
> drivers.

It will be great to mention in commit message that the reason to this
stub is because you use rdma_user_mmap_io().

Thanks

> 
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
>  drivers/infiniband/hw/bnxt_re/main.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
> index 1d361eb..a866951 100644
> --- a/drivers/infiniband/hw/bnxt_re/main.c
> +++ b/drivers/infiniband/hw/bnxt_re/main.c
> @@ -466,6 +466,10 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,
>  	return rc;
>  }
>  
> +static void bnxt_re_disassociate_ucontext(struct ib_ucontext *ibcontext)
> +{
> +}
> +
>  /* Device */
>  
>  static struct bnxt_re_dev *bnxt_re_from_netdev(struct net_device *netdev)
> @@ -532,6 +536,7 @@ static const struct ib_device_ops bnxt_re_dev_ops = {
>  	.destroy_qp = bnxt_re_destroy_qp,
>  	.destroy_srq = bnxt_re_destroy_srq,
>  	.device_group = &bnxt_re_dev_attr_group,
> +	.disassociate_ucontext = bnxt_re_disassociate_ucontext,
>  	.get_dev_fw_str = bnxt_re_query_fw_str,
>  	.get_dma_mr = bnxt_re_get_dma_mr,
>  	.get_hw_stats = bnxt_re_ib_get_hw_stats,
> -- 
> 2.5.5
>
Jason Gunthorpe April 11, 2023, 4:49 p.m. UTC | #2
On Mon, Apr 10, 2023 at 03:27:01PM +0300, Leon Romanovsky wrote:
> On Mon, Apr 10, 2023 at 04:11:51AM -0700, Selvin Xavier wrote:
> > Add empty stub for disassociate ucontext as done in other vendor
> > drivers.
> 
> It will be great to mention in commit message that the reason to this
> stub is because you use rdma_user_mmap_io().

That isn't the reason to do this stub..

It is some yet-to-be-cleaned-up way for the driver to indicate it
*fully* supports driver disassociation.

rdma_user_mmap_io() is part of that support, but the whole
functionality should be tested before setting this.

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 1d361eb..a866951 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -466,6 +466,10 @@  static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,
 	return rc;
 }
 
+static void bnxt_re_disassociate_ucontext(struct ib_ucontext *ibcontext)
+{
+}
+
 /* Device */
 
 static struct bnxt_re_dev *bnxt_re_from_netdev(struct net_device *netdev)
@@ -532,6 +536,7 @@  static const struct ib_device_ops bnxt_re_dev_ops = {
 	.destroy_qp = bnxt_re_destroy_qp,
 	.destroy_srq = bnxt_re_destroy_srq,
 	.device_group = &bnxt_re_dev_attr_group,
+	.disassociate_ucontext = bnxt_re_disassociate_ucontext,
 	.get_dev_fw_str = bnxt_re_query_fw_str,
 	.get_dma_mr = bnxt_re_get_dma_mr,
 	.get_hw_stats = bnxt_re_ib_get_hw_stats,