Re: [PATCH v10 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-27 Thread Leon Romanovsky
On Sat, Jun 25, 2016 at 06:29:31PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/24 19:48, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:11PM +0800, Lijun Ou wrote: > >>This patch mainly added the initial bare main driver. It > >>could get the relative

Re: [PATCH v10 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-27 Thread Leon Romanovsky
On Sat, Jun 25, 2016 at 06:29:31PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/24 19:48, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:11PM +0800, Lijun Ou wrote: > >>This patch mainly added the initial bare main driver. It > >>could get the relative

Re: [PATCH v10 00/22] Add HiSilicon RoCE driver

2016-06-24 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:08PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH v10 00/22] Add HiSilicon RoCE driver

2016-06-24 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:08PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH v10 09/22] IB/hns: Add hca support

2016-06-24 Thread Leon Romanovsky
5. init qp table > > Signed-off-by: Wei Hu <xavier.hu...@huawei.com> > Signed-off-by: Nenglong Zhao <zhaonengl...@hisilicon.com> > Signed-off-by: Lijun Ou <ouli...@huawei.com> > --- > PATCH v9: > This fixes the comments given by Leon Romanovsky over the PATCH v8

Re: [PATCH v10 09/22] IB/hns: Add hca support

2016-06-24 Thread Leon Romanovsky
5. init qp table > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > --- > PATCH v9: > This fixes the comments given by Leon Romanovsky over the PATCH v8 > Link: https://lkml.org/lkml/2016/6/9/67 > > PATCH v8/v7/v6: > - No change

Re: [PATCH v10 07/22] IB/hns: Add event queue support

2016-06-24 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:15PM +0800, Lijun Ou wrote: > This patch added event queue support for RoCE driver. It is used > for RoCE interrupt. RoCE includes 32 synchronous event irqs, 1 > asynchronous event irq and 1 common overflow irq. > > Signed-off-by: Wei Hu >

Re: [PATCH v10 07/22] IB/hns: Add event queue support

2016-06-24 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:15PM +0800, Lijun Ou wrote: > This patch added event queue support for RoCE driver. It is used > for RoCE interrupt. RoCE includes 32 synchronous event irqs, 1 > asynchronous event irq and 1 common overflow irq. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong

Re: [PATCH v10 05/22] IB/hns: Add initial profile resource

2016-06-24 Thread Leon Romanovsky
@hisilicon.com> > Signed-off-by: Lijun Ou <ouli...@huawei.com> > --- > PATCH v9: > This fixes the comments given by Leon Romanovsky over the PATCH v8: > Link: https://lkml.org/lkml/2016/6/9/65 > > PATCH v8/v7/v6: > - No change over the PATCH v5 >

Re: [PATCH v10 05/22] IB/hns: Add initial profile resource

2016-06-24 Thread Leon Romanovsky
; PATCH v9: > This fixes the comments given by Leon Romanovsky over the PATCH v8: > Link: https://lkml.org/lkml/2016/6/9/65 > > PATCH v8/v7/v6: > - No change over the PATCH v5 > > PATCH v5: > - The initial patch which was redesigned based on the second patch > i

Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function

2016-06-24 Thread Leon Romanovsky
@hisilicon.com> > Signed-off-by: Lijun Ou <ouli...@huawei.com> > --- > PATCH v9/v8: > - No change over the PATCH v7 > > PATCH v7: > This fixes the comments given by Leon Romanovsky over the PATCH v6: > Link: https://lkml.org/lkml/2016/5/3/733 > > PATCH v6:

Re: [PATCH v10 04/22] IB/hns: Add RoCE engine reset function

2016-06-24 Thread Leon Romanovsky
TCH v9/v8: > - No change over the PATCH v7 > > PATCH v7: > This fixes the comments given by Leon Romanovsky over the PATCH v6: > Link: https://lkml.org/lkml/2016/5/3/733 > > PATCH v6: > - No change over the PATCH v5 > > PATCH v5: > - The initial patch which

Re: [PATCH v10 01/22] net: hns: Add reset function support for RoCE driver

2016-06-24 Thread Leon Romanovsky
> --- > PATCH v9/v8/v7: > - No change over PATCH v6 > > PATCH v6: > This fixes the comments given by Leon Romanovsky over the PATCH v5: > Link: https://lkml.org/lkml/2016/5/3/733 > > PATCH v5/v4/v3: > - No change over PATCH v2 > > PATCH v2: > This fixes the comment

Re: [PATCH v10 01/22] net: hns: Add reset function support for RoCE driver

2016-06-24 Thread Leon Romanovsky
ule, we only call it in RoCE driver when needed. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > Signed-off-by: Sheng Li > --- > PATCH v9/v8/v7: > - No change over PATCH v6 > > PATCH v6: > This fixes the comments given by Leon

Re: [PATCH v10 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-24 Thread Leon Romanovsky
@hisilicon.com> > Signed-off-by: Lijun Ou <ouli...@huawei.com> > --- > PATCH v9: > This fixes comments given by Leon Romanovsky over the PATCH v8: > Link: https://lkml.org/lkml/2016/6/9/56 > > PATCH v8/v7/v6: > - No change over the PATCH v5 > > PATCH v5:

Re: [PATCH v10 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-24 Thread Leon Romanovsky
; PATCH v9: > This fixes comments given by Leon Romanovsky over the PATCH v8: > Link: https://lkml.org/lkml/2016/6/9/56 > > PATCH v8/v7/v6: > - No change over the PATCH v5 > > PATCH v5: > - The initial patch which was redesigned based on the second patch > i

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
On Thu, Jun 23, 2016 at 08:27:01AM +0300, Leon Romanovsky wrote: > On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > > The logging macros create a bit of duplicated code/text. > > > > Use specialized functions to reduce the duplication. > > > > (def

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
On Thu, Jun 23, 2016 at 08:27:01AM +0300, Leon Romanovsky wrote: > On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > > The logging macros create a bit of duplicated code/text. > > > > Use specialized functions to reduce the duplication. > > > > (def

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
ges now do not include line #, > but do include the function offset. > > Signed-off-by: Joe Perches <j...@perches.com> As far as I see all these functions are used in error paths, so no implication on performance is expected. And I'm fine with function offsets. Saeed, What do you thi

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
ges now do not include line #, > but do include the function offset. > > Signed-off-by: Joe Perches As far as I see all these functions are used in error paths, so no implication on performance is expected. And I'm fine with function offsets. Saeed, What do you think? Reviewed-by: Leon

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 09:01:57PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/21 19:28, Leon Romanovsky wrote: > >On Tue, Jun 21, 2016 at 06:50:51PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 21:33, Leon Romanovsky wrote: > >>>On Thu, Jun

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 09:01:57PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/21 19:28, Leon Romanovsky wrote: > >On Tue, Jun 21, 2016 at 06:50:51PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 21:33, Leon Romanovsky wrote: > >>>On Thu, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 12:37:39PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 21:04, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 05:48:15PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 17:27, Leon Romanovsky wrote: > >>>On Mon, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 12:37:39PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 21:04, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 05:48:15PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 17:27, Leon Romanovsky wrote: > >>>On Mon, Jun

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 06:50:51PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 21:33, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:14PM +0800, Lijun Ou wrote: > >>This patch added the operation for cmd, and added some functions > >>for initializin

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-21 Thread Leon Romanovsky
On Tue, Jun 21, 2016 at 06:50:51PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 21:33, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:14PM +0800, Lijun Ou wrote: > >>This patch added the operation for cmd, and added some functions > >>for initializin

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-20 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:14PM +0800, Lijun Ou wrote: > This patch added the operation for cmd, and added some functions > for initializing eq table and selecting cmd mode. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao >

Re: [PATCH v10 06/22] IB/hns: Add initial cmd operation

2016-06-20 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:14PM +0800, Lijun Ou wrote: > This patch added the operation for cmd, and added some functions > for initializing eq table and selecting cmd mode. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > --- > PATCH v9/v8/v7/v6: > - No

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 05:48:15PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 17:27, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 03:49:24PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 14:06, Leon Romanovsky wrote: > >>>On Mon, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 05:48:15PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 17:27, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 03:49:24PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/20 14:06, Leon Romanovsky wrote: > >>>On Mon, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 03:49:24PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 14:06, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 12:37:40PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/17 17:58, Leon Romanovsky wrote: > >>>On Thu, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 03:49:24PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/20 14:06, Leon Romanovsky wrote: > >On Mon, Jun 20, 2016 at 12:37:40PM +0800, Wei Hu (Xavier) wrote: > >> > >>On 2016/6/17 17:58, Leon Romanovsky wrote: > >>>On Thu, Jun

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 12:37:40PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/17 17:58, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:16PM +0800, Lijun Ou wrote: > >>This patch mainly added icm support for RoCE. It initializes icm > >>which ma

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-20 Thread Leon Romanovsky
On Mon, Jun 20, 2016 at 12:37:40PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/17 17:58, Leon Romanovsky wrote: > >On Thu, Jun 16, 2016 at 10:35:16PM +0800, Lijun Ou wrote: > >>This patch mainly added icm support for RoCE. It initializes icm > >>which ma

Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available

2016-06-17 Thread Leon Romanovsky
On Fri, Jun 17, 2016 at 05:02:33PM +0200, Arnd Bergmann wrote: > On Friday, June 17, 2016 5:50:14 PM CEST Saeed Mahameed wrote: > > On Wed, Jun 15, 2016 at 11:50 PM, Arnd Bergmann wrote: > > > On Wednesday, June 15, 2016 7:04:54 PM CEST Saeed Mahameed wrote: > > > Ok, I see. It

Re: [PATCH 1/2] mlx5: only register devlink when ethernet is available

2016-06-17 Thread Leon Romanovsky
On Fri, Jun 17, 2016 at 05:02:33PM +0200, Arnd Bergmann wrote: > On Friday, June 17, 2016 5:50:14 PM CEST Saeed Mahameed wrote: > > On Wed, Jun 15, 2016 at 11:50 PM, Arnd Bergmann wrote: > > > On Wednesday, June 15, 2016 7:04:54 PM CEST Saeed Mahameed wrote: > > > Ok, I see. It would be nice if

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-17 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:16PM +0800, Lijun Ou wrote: > This patch mainly added icm support for RoCE. It initializes icm > which managers the relative memory blocks for RoCE. The data > structures of RoCE will be located in it. For example, CQ table, > QP table and MTPT table so on. > >

Re: [PATCH v10 08/22] IB/hns: Add icm support

2016-06-17 Thread Leon Romanovsky
On Thu, Jun 16, 2016 at 10:35:16PM +0800, Lijun Ou wrote: > This patch mainly added icm support for RoCE. It initializes icm > which managers the relative memory blocks for RoCE. The data > structures of RoCE will be located in it. For example, CQ table, > QP table and MTPT table so on. > >

Re: [patch] IB/rxe: fix error code in rxe_srq_from_init()

2016-06-13 Thread Leon Romanovsky
On Mon, Jun 13, 2016 at 09:53:41AM +0300, Dan Carpenter wrote: > If copy_to_user() fails then it returns the number of bytes not copied. > It would be between 1-4 here. Later the callers dereference it leading > to an Oops. > > It was sort of hard to fix this without making the code confusing so

Re: [patch] IB/rxe: fix error code in rxe_srq_from_init()

2016-06-13 Thread Leon Romanovsky
On Mon, Jun 13, 2016 at 09:53:41AM +0300, Dan Carpenter wrote: > If copy_to_user() fails then it returns the number of bytes not copied. > It would be between 1-4 here. Later the callers dereference it leading > to an Oops. > > It was sort of hard to fix this without making the code confusing so

Re: [PATCH 1/3] infiniband: rxe: avoid 64-bit division

2016-06-13 Thread Leon Romanovsky
On Mon, Jun 13, 2016 at 02:54:53PM +0200, Arnd Bergmann wrote: > The rxe driver fails to build on 32-bit because of a 64-bit division: > > In function `rxe_qp_from_attr': > :(.text+0x53158): undefined reference to `__aeabi_uldivmod' > > We can easily avoid this division by converting the

Re: [PATCH 1/3] infiniband: rxe: avoid 64-bit division

2016-06-13 Thread Leon Romanovsky
On Mon, Jun 13, 2016 at 02:54:53PM +0200, Arnd Bergmann wrote: > The rxe driver fails to build on 32-bit because of a 64-bit division: > > In function `rxe_qp_from_attr': > :(.text+0x53158): undefined reference to `__aeabi_uldivmod' > > We can easily avoid this division by converting the

Re: [PATCH v9 11/22] IB/hns: Add IB device registration

2016-06-13 Thread Leon Romanovsky
On Sun, Jun 12, 2016 at 05:41:06PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/9 14:26, Leon Romanovsky wrote: > >On Wed, Jun 01, 2016 at 11:37:53PM +0800, Lijun Ou wrote: > >>This patch registered IB device when loaded, and unregistered > >>IB device when rem

Re: [PATCH v9 11/22] IB/hns: Add IB device registration

2016-06-13 Thread Leon Romanovsky
On Sun, Jun 12, 2016 at 05:41:06PM +0800, Wei Hu (Xavier) wrote: > > > On 2016/6/9 14:26, Leon Romanovsky wrote: > >On Wed, Jun 01, 2016 at 11:37:53PM +0800, Lijun Ou wrote: > >>This patch registered IB device when loaded, and unregistered > >>IB device when rem

Re: [PATCH v9 09/22] IB/hns: Add hca support

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:51PM +0800, Lijun Ou wrote: > This patch mainly setup hca for RoCE. It will do a series of > initial works, as follows: > 1. init uar table, allocate uar resource > 2. init pd table > 3. init cq table > 4. init mr table > 5. init qp table > >

Re: [PATCH v9 09/22] IB/hns: Add hca support

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:51PM +0800, Lijun Ou wrote: > This patch mainly setup hca for RoCE. It will do a series of > initial works, as follows: > 1. init uar table, allocate uar resource > 2. init pd table > 3. init cq table > 4. init mr table > 5. init qp table > >

Re: [PATCH v9 05/22] IB/hns: Add initial profile resource

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:47PM +0800, Lijun Ou wrote: > This patch mainly configured some profile resoure. For example, > vendor_id, hardware version, and some data structure sizes so on. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao

Re: [PATCH v9 05/22] IB/hns: Add initial profile resource

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:47PM +0800, Lijun Ou wrote: > This patch mainly configured some profile resoure. For example, > vendor_id, hardware version, and some data structure sizes so on. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > --- <...> >

Re: [PATCH v9 08/22] IB/hns: Add icm support

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:50PM +0800, Lijun Ou wrote: > This patch mainly added icm support for RoCE. It initializes icm > which managers the relative memory blocks for RoCE. The data > structures of RoCE will be located in it. For example, CQ table, > QP table and MTPT table so on. I wonder

Re: [PATCH v9 08/22] IB/hns: Add icm support

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:50PM +0800, Lijun Ou wrote: > This patch mainly added icm support for RoCE. It initializes icm > which managers the relative memory blocks for RoCE. The data > structures of RoCE will be located in it. For example, CQ table, > QP table and MTPT table so on. I wonder

Re: [PATCH v9 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:45PM +0800, Lijun Ou wrote: > This patch mainly added the initial bare main driver. It > could get the relative configure information of net node. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao >

Re: [PATCH v9 03/22] IB/hns: Add initial main frame driver and get cfg info

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:45PM +0800, Lijun Ou wrote: > This patch mainly added the initial bare main driver. It > could get the relative configure information of net node. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > --- >

Re: [PATCH v9 11/22] IB/hns: Add IB device registration

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:53PM +0800, Lijun Ou wrote: > This patch registered IB device when loaded, and unregistered > IB device when removed. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou

Re: [PATCH v9 11/22] IB/hns: Add IB device registration

2016-06-09 Thread Leon Romanovsky
On Wed, Jun 01, 2016 at 11:37:53PM +0800, Lijun Ou wrote: > This patch registered IB device when loaded, and unregistered > IB device when removed. > > Signed-off-by: Wei Hu > Signed-off-by: Nenglong Zhao > Signed-off-by: Lijun Ou > --- > drivers/infiniband/hw/hns/hns_roce_main.c | 46 >

Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Leon Romanovsky
On Mon, Jun 06, 2016 at 10:15:06PM +0100, Sudip Mukherjee wrote: > prot_sg_cnt has been assigned with the value of ret which we have > already checked to be non-zero so prot_sg_cnt can never be zero at this > point of the code and hence the else part can never execute. > And since we know

Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Leon Romanovsky
On Mon, Jun 06, 2016 at 10:15:06PM +0100, Sudip Mukherjee wrote: > prot_sg_cnt has been assigned with the value of ret which we have > already checked to be non-zero so prot_sg_cnt can never be zero at this > point of the code and hence the else part can never execute. > And since we know

Re: [PATCH 2/2] IB/sysfs: fix memory leak

2016-06-06 Thread Leon Romanovsky
On Mon, Jun 06, 2016 at 09:34:54AM +0300, Leon Romanovsky wrote: > On Sun, Jun 05, 2016 at 09:13:56PM +0100, Sudip Mukherjee wrote: > > If the allocation of hsag fails we were just returning but stats was > > not released. > > > > Signed-off-by: Sudip Mukherjee <s

Re: [PATCH 2/2] IB/sysfs: fix memory leak

2016-06-06 Thread Leon Romanovsky
On Mon, Jun 06, 2016 at 09:34:54AM +0300, Leon Romanovsky wrote: > On Sun, Jun 05, 2016 at 09:13:56PM +0100, Sudip Mukherjee wrote: > > If the allocation of hsag fails we were just returning but stats was > > not released. > > > > Signed-off-by: Sudip Mukherjee >

Re: [PATCH] IB/core: remove dead code

2016-06-06 Thread Leon Romanovsky
On Sun, Jun 05, 2016 at 09:45:52PM +0100, Sudip Mukherjee wrote: > prot_sg_cnt has been assigned with the value of ret which we have > already checked to be non-zero so prot_sg_cnt can never be zero at this > point of the code and hence the else part can never execute. > > Signed-off-by: Sudip

Re: [PATCH] IB/core: remove dead code

2016-06-06 Thread Leon Romanovsky
On Sun, Jun 05, 2016 at 09:45:52PM +0100, Sudip Mukherjee wrote: > prot_sg_cnt has been assigned with the value of ret which we have > already checked to be non-zero so prot_sg_cnt can never be zero at this > point of the code and hence the else part can never execute. > > Signed-off-by: Sudip

Re: [PATCH 2/2] IB/sysfs: fix memory leak

2016-06-06 Thread Leon Romanovsky
On Sun, Jun 05, 2016 at 09:13:56PM +0100, Sudip Mukherjee wrote: > If the allocation of hsag fails we were just returning but stats was > not released. > > Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> Thanks, Reviewed-by: Leon Romanovsky &l

Re: [PATCH 2/2] IB/sysfs: fix memory leak

2016-06-06 Thread Leon Romanovsky
On Sun, Jun 05, 2016 at 09:13:56PM +0100, Sudip Mukherjee wrote: > If the allocation of hsag fails we were just returning but stats was > not released. > > Signed-off-by: Sudip Mukherjee Thanks, Reviewed-by: Leon Romanovsky > --- > drivers/infiniband/core/sysfs.c | 2 +- &g

Re: [PATCH 1/2] IB/sysfs: fix NULL dereference

2016-06-06 Thread Leon Romanovsky
ll execute > once trying to free hsag->attrs[0]. But hsag is NULL still now leading > to a NULL pointer dereference. > > Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> > --- > drivers/infi

Re: [PATCH 1/2] IB/sysfs: fix NULL dereference

2016-06-06 Thread Leon Romanovsky
ll execute > once trying to free hsag->attrs[0]. But hsag is NULL still now leading > to a NULL pointer dereference. > > Signed-off-by: Sudip Mukherjee Thanks, Reviewed-by: Leon Romanovsky > --- > drivers/infiniband/core/sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v8 10/22] IB/hns: Add process flow to init RoCE engine

2016-05-25 Thread Leon Romanovsky
On Wed, May 25, 2016 at 11:05:13PM +0800, Lijun Ou wrote: > This patch mainly initialized the RoCE engine. It is absolutely > necessary to run RoCE. It mainly includes that configure DMAE > user, initialize doorbell and raq operations, enable port. > > Signed-off-by: Wei Hu

Re: [PATCH v8 10/22] IB/hns: Add process flow to init RoCE engine

2016-05-25 Thread Leon Romanovsky
On Wed, May 25, 2016 at 11:05:13PM +0800, Lijun Ou wrote: > This patch mainly initialized the RoCE engine. It is absolutely > necessary to run RoCE. It mainly includes that configure DMAE > user, initialize doorbell and raq operations, enable port. > > Signed-off-by: Wei Hu > Signed-off-by:

Re: [PATCH] RDMA/cxgb3: device driver frees DMA memory with different size

2016-05-23 Thread Leon Romanovsky
iniband/hw/cxgb3/cxio_hal.c > @@ -327,7 +327,7 @@ int cxio_destroy_cq(struct cxio_rdev *rdev_p, struct > t3_cq *cq) > kfree(cq->sw_queue); > dma_free_coherent(&(rdev_p->rnic_info.pdev->dev), > (1UL << (cq->size_log2)) >

Re: [PATCH] RDMA/cxgb3: device driver frees DMA memory with different size

2016-05-23 Thread Leon Romanovsky
t; @@ -327,7 +327,7 @@ int cxio_destroy_cq(struct cxio_rdev *rdev_p, struct > t3_cq *cq) > kfree(cq->sw_queue); > dma_free_coherent(&(rdev_p->rnic_info.pdev->dev), > (1UL << (cq->size_log2)) > - * sizeof(struct t3_cqe),

Re: [PATCH v6 00/21] Add HiSilicon RoCE driver

2016-05-03 Thread Leon Romanovsky
On Thu, Apr 28, 2016 at 08:09:35PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH v6 00/21] Add HiSilicon RoCE driver

2016-05-03 Thread Leon Romanovsky
On Thu, Apr 28, 2016 at 08:09:35PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH] i40e: constify i40e_client_ops structure

2016-05-02 Thread Leon Romanovsky
On Sun, May 01, 2016 at 02:07:23PM +0200, Julia Lawall wrote: > The i40e_client_ops structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall <julia.law...@lip6.fr> > Thanks Julia, Reviewed-

Re: [PATCH] i40e: constify i40e_client_ops structure

2016-05-02 Thread Leon Romanovsky
On Sun, May 01, 2016 at 02:07:23PM +0200, Julia Lawall wrote: > The i40e_client_ops structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > Thanks Julia, Reviewed-by: Leon Romanovsky signature.asc De

Re: [PATCH] staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing.

2016-05-01 Thread Leon Romanovsky
; I'm fine with your commit message and don't need to resend, however the statements like "smaller code" need to be supported by ./scripts/bloat-o-meter and "faster code" by performance analysis. Reviewed-by: Leon Romanovsky <leo...@mellanox.com> > --- > drivers

Re: [PATCH] staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing.

2016-05-01 Thread Leon Romanovsky
commit message and don't need to resend, however the statements like "smaller code" need to be supported by ./scripts/bloat-o-meter and "faster code" by performance analysis. Reviewed-by: Leon Romanovsky > --- > drivers/staging/rdma/hfi1/init.c | 2 +- > 1 file changed, 1

Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure

2016-05-01 Thread Leon Romanovsky
On Sun, May 01, 2016 at 02:22:21PM +0200, Julia Lawall wrote: > The i40iw_vf_cqp_ops structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall <julia.law...@lip6.fr> > Thanks Julia, Reviewed-

Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure

2016-05-01 Thread Leon Romanovsky
On Sun, May 01, 2016 at 02:22:21PM +0200, Julia Lawall wrote: > The i40iw_vf_cqp_ops structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > Thanks Julia, Reviewed-by: Leon Romanovsky signature.asc De

Re: [PATCH v5 09/21] IB/hns: Add hca support

2016-04-26 Thread Leon Romanovsky
On Tue, Apr 26, 2016 at 02:34:44PM +0800, oulijun wrote: > On 2016/4/24 15:54, Leon Romanovsky wrote: > > On Sat, Apr 23, 2016 at 06:26:47PM +0800, Lijun Ou wrote: > >> This patch mainly setup hca for RoCE. it will do a series of > >> initial works as follows: &

Re: [PATCH v5 09/21] IB/hns: Add hca support

2016-04-26 Thread Leon Romanovsky
On Tue, Apr 26, 2016 at 02:34:44PM +0800, oulijun wrote: > On 2016/4/24 15:54, Leon Romanovsky wrote: > > On Sat, Apr 23, 2016 at 06:26:47PM +0800, Lijun Ou wrote: > >> This patch mainly setup hca for RoCE. it will do a series of > >> initial works as follows: &

Re: [PATCH v5 09/21] IB/hns: Add hca support

2016-04-24 Thread Leon Romanovsky
On Sat, Apr 23, 2016 at 06:26:47PM +0800, Lijun Ou wrote: > This patch mainly setup hca for RoCE. it will do a series of > initial works as follows: > 1. init uar table, allocate uar resource > 2. init pd table > 3. init cq table > 4. init mr table > 5. init qp table

Re: [PATCH v5 00/21] Add HiSilicon RoCE driver

2016-04-24 Thread Leon Romanovsky
On Sat, Apr 23, 2016 at 06:26:38PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH v5 09/21] IB/hns: Add hca support

2016-04-24 Thread Leon Romanovsky
On Sat, Apr 23, 2016 at 06:26:47PM +0800, Lijun Ou wrote: > This patch mainly setup hca for RoCE. it will do a series of > initial works as follows: > 1. init uar table, allocate uar resource > 2. init pd table > 3. init cq table > 4. init mr table > 5. init qp table

Re: [PATCH v5 00/21] Add HiSilicon RoCE driver

2016-04-24 Thread Leon Romanovsky
On Sat, Apr 23, 2016 at 06:26:38PM +0800, Lijun Ou wrote: > The HiSilicon Network Substem is a long term evolution IP which is > supposed to be used in HiSilicon ICT SoCs. HNS (HiSilicon Network > Sybsystem) also has a hardware support of performing RDMA with > RoCEE. > The driver for HiSilicon

Re: [PATCH] IB/ipoib: Add readout of statistics using ethtool

2016-04-19 Thread Leon Romanovsky
On Tue, Apr 19, 2016 at 05:50:23PM +0300, Erez Shitrit wrote: > On Fri, Apr 15, 2016 at 1:17 PM, Hans Westgaard Ry > wrote: > > IPoIB collects statistics of traffic including number of packets > > sent/received, number of bytes transferred, and certain errors. This >

Re: [PATCH] IB/ipoib: Add readout of statistics using ethtool

2016-04-19 Thread Leon Romanovsky
On Tue, Apr 19, 2016 at 05:50:23PM +0300, Erez Shitrit wrote: > On Fri, Apr 15, 2016 at 1:17 PM, Hans Westgaard Ry > wrote: > > IPoIB collects statistics of traffic including number of packets > > sent/received, number of bytes transferred, and certain errors. This > > patch makes these

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-16 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 05:37:32PM -0600, Jason Gunthorpe wrote: > On Sat, Apr 16, 2016 at 12:23:28AM +0300, Leon Romanovsky wrote: > > > Intel as usual decided to do it in their way and the result is presented > > on this mailing list. > > Dennis was pretty cl

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-16 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 07:28:01PM -0400, Ira Weiny wrote: > On Sat, Apr 16, 2016 at 12:23:28AM +0300, Leon Romanovsky wrote: > Do you have a technical reason that this patch series does not fix the > write/writev issue brought up by Al? Sure, I truly believe that we can do common API in

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-16 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 05:37:32PM -0600, Jason Gunthorpe wrote: > On Sat, Apr 16, 2016 at 12:23:28AM +0300, Leon Romanovsky wrote: > > > Intel as usual decided to do it in their way and the result is presented > > on this mailing list. > > Dennis was pretty cl

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-16 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 07:28:01PM -0400, Ira Weiny wrote: > On Sat, Apr 16, 2016 at 12:23:28AM +0300, Leon Romanovsky wrote: > Do you have a technical reason that this patch series does not fix the > write/writev issue brought up by Al? Sure, I truly believe that we can do common API in

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 10:34:01AM -0700, Christoph Hellwig wrote: > On Fri, Apr 15, 2016 at 08:30:35PM +0300, Leon Romanovsky wrote: > > Great, did you show it to other RDMA stakeholders except Intel? > > I saw nothing posted on ML or proposed for initial discussion, which &

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 05:44:48PM +, Woodruff, Robert J wrote: > > I fear it's kfabrics, which is an entirely crackpot idea and a total > > non-starter, but for some reason Intel and their buddies keep wasting time > > on it. > > What is being discussed her is not kfabrics. That is a

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 10:34:01AM -0700, Christoph Hellwig wrote: > On Fri, Apr 15, 2016 at 08:30:35PM +0300, Leon Romanovsky wrote: > > Great, did you show it to other RDMA stakeholders except Intel? > > I saw nothing posted on ML or proposed for initial discussion, which &

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 05:44:48PM +, Woodruff, Robert J wrote: > > I fear it's kfabrics, which is an entirely crackpot idea and a total > > non-starter, but for some reason Intel and their buddies keep wasting time > > on it. > > What is being discussed her is not kfabrics. That is a

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 12:17:55PM -0400, Ira Weiny wrote: > On Fri, Apr 15, 2016 at 07:01:26AM +0300, Leon Romanovsky wrote: > > On Thu, Apr 14, 2016 at 01:48:31PM -0400, Ira Weiny wrote: > > > On Thu, Apr 14, 2016 at 10:45:50AM -0600, Jason Gunthorpe wrote: > > > >

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-15 Thread Leon Romanovsky
On Fri, Apr 15, 2016 at 12:17:55PM -0400, Ira Weiny wrote: > On Fri, Apr 15, 2016 at 07:01:26AM +0300, Leon Romanovsky wrote: > > On Thu, Apr 14, 2016 at 01:48:31PM -0400, Ira Weiny wrote: > > > On Thu, Apr 14, 2016 at 10:45:50AM -0600, Jason Gunthorpe wrote: > > > >

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-14 Thread Leon Romanovsky
On Thu, Apr 14, 2016 at 01:48:31PM -0400, Ira Weiny wrote: > On Thu, Apr 14, 2016 at 10:45:50AM -0600, Jason Gunthorpe wrote: > > On Thu, Apr 14, 2016 at 08:41:35AM -0700, Dennis Dalessandro wrote: > > > This patch series removes the write() interface for user access in favor > > > of an > > >

Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access

2016-04-14 Thread Leon Romanovsky
On Thu, Apr 14, 2016 at 01:48:31PM -0400, Ira Weiny wrote: > On Thu, Apr 14, 2016 at 10:45:50AM -0600, Jason Gunthorpe wrote: > > On Thu, Apr 14, 2016 at 08:41:35AM -0700, Dennis Dalessandro wrote: > > > This patch series removes the write() interface for user access in favor > > > of an > > >

Re: [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline nes_free_qp_mem, save 1072 bytes

2016-04-10 Thread Leon Romanovsky
And after that feel free to add my RB tag. Reviewed-By: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: Digital signature

Re: [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline nes_free_qp_mem, save 1072 bytes

2016-04-10 Thread Leon Romanovsky
And after that feel free to add my RB tag. Reviewed-By: Leon Romanovsky signature.asc Description: Digital signature

Re: [PATCHv10 1/3] rdmacg: Added rdma cgroup controller

2016-04-05 Thread Leon Romanovsky
On Tue, Apr 05, 2016 at 05:55:26AM -0700, Parav Pandit wrote: > Hi Christoph, > > On Tue, Apr 5, 2016 at 5:42 AM, Christoph Hellwig wrote: > > On Tue, Apr 05, 2016 at 05:39:21AM -0700, Parav Pandit wrote: > >> I am not really trying to address OFED issues here. I am sure you

Re: [PATCHv10 1/3] rdmacg: Added rdma cgroup controller

2016-04-05 Thread Leon Romanovsky
On Tue, Apr 05, 2016 at 05:55:26AM -0700, Parav Pandit wrote: > Hi Christoph, > > On Tue, Apr 5, 2016 at 5:42 AM, Christoph Hellwig wrote: > > On Tue, Apr 05, 2016 at 05:39:21AM -0700, Parav Pandit wrote: > >> I am not really trying to address OFED issues here. I am sure you > >> understand that

<    9   10   11   12   13   14   15   16   >