Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482177 > unrolled thread

Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock

Started byLeon Romanovsky <leon@kernel.org>
First post2016-09-13 09:00 +0200
Last post2016-09-15 06:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Leon Romanovsky <leon@kernel.org> - 2016-09-13 09:00 +0200
    RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Salil Mehta <salil.mehta@huawei.com> - 2016-09-14 04:20 +0200
      Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Leon Romanovsky <leon@kernel.org> - 2016-09-14 07:10 +0200
        RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Salil Mehta <salil.mehta@huawei.com> - 2016-09-15 06:00 +0200

#1482177 — Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock

FromLeon Romanovsky <leon@kernel.org>
Date2016-09-13 09:00 +0200
SubjectRe: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock
Message-ID<sgPRf-6Fc-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote:
> From: Lijun Ou <oulijun@huawei.com>
>
> This lock will be used in query port interface, and will be called
> while IB device was registered to OFED frame. So, the lock of iboe
> must be initiated before IB device was registered.

Sorry,
what did you mean by writing "OFED frame"?

>
> Signed-off-by: Lijun Ou <oulijun@huawei.com>
> Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
> Reviewed-by:  Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_main.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
> index 2704076..4721c0c 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_main.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_main.c
> @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
>  	struct device *dev = &hr_dev->pdev->dev;
>
>  	iboe = &hr_dev->iboe;
> +	spin_lock_init(&iboe->lock);
>
>  	ib_dev = &hr_dev->ib_dev;
>  	strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX);
> @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
>  		goto error_failed_setup_mtu_gids;
>  	}
>
> -	spin_lock_init(&iboe->lock);
> -
>  	iboe->nb.notifier_call = hns_roce_netdev_event;
>  	ret = register_netdevice_notifier(&iboe->nb);
>  	if (ret) {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [next] | [standalone]


#1482877

FromSalil Mehta <salil.mehta@huawei.com>
Date2016-09-14 04:20 +0200
Message-ID<sh7XP-2c8-5@gated-at.bofh.it>
In reply to#1482177

> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Leon Romanovsky
> Sent: Tuesday, September 13, 2016 7:50 AM
> To: Salil Mehta
> Cc: dledford@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen);
> xuwei (O); mehta.salil.lnk@gmail.com; linux-rdma@vger.kernel.org;
> linux-kernel@vger.kernel.org; Linuxarm; Huangdongdong (Donald)
> Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe
> lock
> 
> On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote:
> > From: Lijun Ou <oulijun@huawei.com>
> >
> > This lock will be used in query port interface, and will be called
> > while IB device was registered to OFED frame. So, the lock of iboe
> > must be initiated before IB device was registered.
> 
> Sorry,
> what did you mean by writing "OFED frame"?
It is a typo. It was OFED framework but I guess more appropriate word 
might have been 'IB core' layer of Infiniband. Will fix this. Thanks! 

Best regards
Salil
> 
> >
> > Signed-off-by: Lijun Ou <oulijun@huawei.com>
> > Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
> > Reviewed-by:  Wei Hu (Xavier) <xavier.huwei@huawei.com>
> > Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> > ---
> >  drivers/infiniband/hw/hns/hns_roce_main.c |    3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c
> b/drivers/infiniband/hw/hns/hns_roce_main.c
> > index 2704076..4721c0c 100644
> > --- a/drivers/infiniband/hw/hns/hns_roce_main.c
> > +++ b/drivers/infiniband/hw/hns/hns_roce_main.c
> > @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct
> hns_roce_dev *hr_dev)
> >  	struct device *dev = &hr_dev->pdev->dev;
> >
> >  	iboe = &hr_dev->iboe;
> > +	spin_lock_init(&iboe->lock);
> >
> >  	ib_dev = &hr_dev->ib_dev;
> >  	strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX);
> > @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct
> hns_roce_dev *hr_dev)
> >  		goto error_failed_setup_mtu_gids;
> >  	}
> >
> > -	spin_lock_init(&iboe->lock);
> > -
> >  	iboe->nb.notifier_call = hns_roce_netdev_event;
> >  	ret = register_netdevice_notifier(&iboe->nb);
> >  	if (ret) {
> > --
> > 1.7.9.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma"
> in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1482921

FromLeon Romanovsky <leon@kernel.org>
Date2016-09-14 07:10 +0200
Message-ID<shaCl-4tt-5@gated-at.bofh.it>
In reply to#1482877

[Multipart message — attachments visible in raw view] — view raw

On Wed, Sep 14, 2016 at 02:09:37AM +0000, Salil Mehta wrote:
>
>
> > -----Original Message-----
> > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > owner@vger.kernel.org] On Behalf Of Leon Romanovsky
> > Sent: Tuesday, September 13, 2016 7:50 AM
> > To: Salil Mehta
> > Cc: dledford@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen);
> > xuwei (O); mehta.salil.lnk@gmail.com; linux-rdma@vger.kernel.org;
> > linux-kernel@vger.kernel.org; Linuxarm; Huangdongdong (Donald)
> > Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe
> > lock
> >
> > On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote:
> > > From: Lijun Ou <oulijun@huawei.com>
> > >
> > > This lock will be used in query port interface, and will be called
> > > while IB device was registered to OFED frame. So, the lock of iboe
> > > must be initiated before IB device was registered.
> >
> > Sorry,
> > what did you mean by writing "OFED frame"?
> It is a typo. It was OFED framework but I guess more appropriate word
> might have been 'IB core' layer of Infiniband. Will fix this. Thanks!

As a general note, and I understand that these contributors are not
native English speakers, and I understand the desire to submit the right
code and code should speak by itself, but can you invest more time in
commit messages and write them in English?

Thanks

>
> Best regards
> Salil
> >
> > >
> > > Signed-off-by: Lijun Ou <oulijun@huawei.com>
> > > Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
> > > Reviewed-by:  Wei Hu (Xavier) <xavier.huwei@huawei.com>
> > > Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> > > ---
> > >  drivers/infiniband/hw/hns/hns_roce_main.c |    3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c
> > b/drivers/infiniband/hw/hns/hns_roce_main.c
> > > index 2704076..4721c0c 100644
> > > --- a/drivers/infiniband/hw/hns/hns_roce_main.c
> > > +++ b/drivers/infiniband/hw/hns/hns_roce_main.c
> > > @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct
> > hns_roce_dev *hr_dev)
> > >  	struct device *dev = &hr_dev->pdev->dev;
> > >
> > >  	iboe = &hr_dev->iboe;
> > > +	spin_lock_init(&iboe->lock);
> > >
> > >  	ib_dev = &hr_dev->ib_dev;
> > >  	strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX);
> > > @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct
> > hns_roce_dev *hr_dev)
> > >  		goto error_failed_setup_mtu_gids;
> > >  	}
> > >
> > > -	spin_lock_init(&iboe->lock);
> > > -
> > >  	iboe->nb.notifier_call = hns_roce_netdev_event;
> > >  	ret = register_netdevice_notifier(&iboe->nb);
> > >  	if (ret) {
> > > --
> > > 1.7.9.5
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-rdma"
> > in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1483842

FromSalil Mehta <salil.mehta@huawei.com>
Date2016-09-15 06:00 +0200
Message-ID<shw09-1Gg-3@gated-at.bofh.it>
In reply to#1482921

> -----Original Message-----
> From: Leon Romanovsky [mailto:leon@kernel.org]
> Sent: Wednesday, September 14, 2016 6:05 AM
> To: Salil Mehta
> Cc: dledford@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen);
> xuwei (O); mehta.salil.lnk@gmail.com; linux-rdma@vger.kernel.org;
> linux-kernel@vger.kernel.org; Linuxarm; Huangdongdong (Donald)
> Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe
> lock
> 
> On Wed, Sep 14, 2016 at 02:09:37AM +0000, Salil Mehta wrote:
> >
> >
> > > -----Original Message-----
> > > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> > > owner@vger.kernel.org] On Behalf Of Leon Romanovsky
> > > Sent: Tuesday, September 13, 2016 7:50 AM
> > > To: Salil Mehta
> > > Cc: dledford@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng
> (Yisen);
> > > xuwei (O); mehta.salil.lnk@gmail.com; linux-rdma@vger.kernel.org;
> > > linux-kernel@vger.kernel.org; Linuxarm; Huangdongdong (Donald)
> > > Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe
> > > lock
> > >
> > > On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote:
> > > > From: Lijun Ou <oulijun@huawei.com>
> > > >
> > > > This lock will be used in query port interface, and will be
> called
> > > > while IB device was registered to OFED frame. So, the lock of
> iboe
> > > > must be initiated before IB device was registered.
> > >
> > > Sorry,
> > > what did you mean by writing "OFED frame"?
> > It is a typo. It was OFED framework but I guess more appropriate word
> > might have been 'IB core' layer of Infiniband. Will fix this. Thanks!
> 
> As a general note, and I understand that these contributors are not
> native English speakers, and I understand the desire to submit the
> right
> code and code should speak by itself, but can you invest more time in
> commit messages and write them in English?
> 
> Thanks
Hi Leon,
Yes, will try to make them better.

Best regards
Salil
> >
> > Best regards
> > Salil
> > >
> > > >
> > > > Signed-off-by: Lijun Ou <oulijun@huawei.com>
> > > > Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
> > > > Reviewed-by:  Wei Hu (Xavier) <xavier.huwei@huawei.com>
> > > > Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> > > > ---
> > > >  drivers/infiniband/hw/hns/hns_roce_main.c |    3 +--
> > > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c
> > > b/drivers/infiniband/hw/hns/hns_roce_main.c
> > > > index 2704076..4721c0c 100644
> > > > --- a/drivers/infiniband/hw/hns/hns_roce_main.c
> > > > +++ b/drivers/infiniband/hw/hns/hns_roce_main.c
> > > > @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct
> > > hns_roce_dev *hr_dev)
> > > >  	struct device *dev = &hr_dev->pdev->dev;
> > > >
> > > >  	iboe = &hr_dev->iboe;
> > > > +	spin_lock_init(&iboe->lock);
> > > >
> > > >  	ib_dev = &hr_dev->ib_dev;
> > > >  	strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX);
> > > > @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct
> > > hns_roce_dev *hr_dev)
> > > >  		goto error_failed_setup_mtu_gids;
> > > >  	}
> > > >
> > > > -	spin_lock_init(&iboe->lock);
> > > > -
> > > >  	iboe->nb.notifier_call = hns_roce_netdev_event;
> > > >  	ret = register_netdevice_notifier(&iboe->nb);
> > > >  	if (ret) {
> > > > --
> > > > 1.7.9.5
> > > >
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-
> rdma"
> > > in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at  http://vger.kernel.org/majordomo-
> info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web