Re: [PATCH v3] RDMA/umem: minor bug fix in error handling path

2019-03-05 Thread Yuval Shaia
> Cc: Andrew Morton > > Cc: Doug Ledford > > Cc: linux-r...@vger.kernel.org > > Cc: linux...@kvack.org > > Signed-off-by: John Hubbard > > I meant... > > Reviewed-by: Ira Weiny > > just a bit too quick on the keyboard before lunch... ;-) > >

Re: [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'

2018-05-10 Thread Yuval Shaia
On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote: > If an error occurs, 'mlx4_en_destroy_netdev()' is called. > It then calls 'mlx4_en_free_resources()' which does the needed resources > cleanup. > > So, doing some explicit kfree in the error handling path would lead to > some

Re: [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'

2018-05-10 Thread Yuval Shaia
On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote: > If an error occurs, 'mlx4_en_destroy_netdev()' is called. > It then calls 'mlx4_en_free_resources()' which does the needed resources > cleanup. > > So, doing some explicit kfree in the error handling path would lead to > some

Re: [PATCH] net: ks8851: fix ks_start_xmit()'s return type

2018-04-24 Thread Yuval Shaia
this driver too. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > --- > drivers/net/ethernet/micrel/ks8851_mll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drive

Re: [PATCH] net: ks8851: fix ks_start_xmit()'s return type

2018-04-24 Thread Yuval Shaia
this driver too. > > Signed-off-by: Luc Van Oostenryck Reviewed-by: Yuval Shaia > --- > drivers/net/ethernet/micrel/ks8851_mll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c > b/drivers/net/etherne

Re: [PATCH] IB/ipoib: fix ipoib_start_xmit()'s return type

2018-04-24 Thread Yuval Shaia
this driver too. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/driver

Re: [PATCH] IB/ipoib: fix ipoib_start_xmit()'s return type

2018-04-24 Thread Yuval Shaia
this driver too. > > Signed-off-by: Luc Van Oostenryck Reviewed-by: Yuval Shaia > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c > b/drivers/infiniband/u

[PATCH v1] linux/kernel.h: Fix minor typo in comment

2018-04-10 Thread Yuval Shaia
Signed-off-by: Yuval Shaia <yuval.sh...@oracle.com> --- v1 ->v2: * Fix typo in commit message --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf..a5b4ba3bdb

[PATCH v1] linux/kernel.h: Fix minor typo in comment

2018-04-10 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- v1 ->v2: * Fix typo in commit message --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf..a5b4ba3bdb61 100644 --- a/include/linux/kernel.h ++

Re: [PATCH] linux/kernel.h: Fix minor type in comment

2018-04-10 Thread Yuval Shaia
On Tue, Apr 10, 2018 at 09:06:26AM +0200, Ingo Molnar wrote: > > * Yuval Shaia <yuval.sh...@oracle.com> wrote: > > > Signed-off-by: Yuval Shaia <yuval.sh...@oracle.com> > > --- > > include/linux/kernel.h | 2 +- > > 1 file changed, 1 insertion(+)

Re: [PATCH] linux/kernel.h: Fix minor type in comment

2018-04-10 Thread Yuval Shaia
On Tue, Apr 10, 2018 at 09:06:26AM +0200, Ingo Molnar wrote: > > * Yuval Shaia wrote: > > > Signed-off-by: Yuval Shaia > > --- > > include/linux/kernel.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linu

[PATCH] linux/kernel.h: Fix minor type in comment

2018-04-10 Thread Yuval Shaia
Signed-off-by: Yuval Shaia <yuval.sh...@oracle.com> --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf..a5b4ba3bdb61 100644 --- a/include/linux/kernel.h +++ b/include/linux/ke

[PATCH] linux/kernel.h: Fix minor type in comment

2018-04-10 Thread Yuval Shaia
Signed-off-by: Yuval Shaia --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf..a5b4ba3bdb61 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -651,7 +651,7 @@ do

Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free

2018-03-22 Thread Yuval Shaia
e as this is enough. net/mlx5: Fix use-after-free Besides that - lgtm. Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ether

Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free

2018-03-22 Thread Yuval Shaia
5: Fix use-after-free Besides that - lgtm. Reviewed-by: Yuval Shaia > --- > drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c > b/drivers/net/e

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-14 Thread Yuval Shaia
On Tue, Mar 13, 2018 at 06:13:45PM +0200, Yuval Shaia wrote: > On Tue, Mar 13, 2018 at 05:07:22PM +0200, Liran Alon wrote: > > Before this commit, dev_forward_skb() always cleared packet's > > per-network-namespace info. Even if the packet doesn't cross > > network namespaces.

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-14 Thread Yuval Shaia
On Tue, Mar 13, 2018 at 06:13:45PM +0200, Yuval Shaia wrote: > On Tue, Mar 13, 2018 at 05:07:22PM +0200, Liran Alon wrote: > > Before this commit, dev_forward_skb() always cleared packet's > > per-network-namespace info. Even if the packet doesn't cross > > network namespaces.

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-13 Thread Yuval Shaia
tc filter add dev veth-b parent : basic match 'meta(nf_mark eq 1337)' > action simple "skb->mark 1337!" > dmesg -C > ping 12.0.0.2 > dmesg > > Before this change, the above will print nothing to dmesg. > After this change, "skb->mark 1337!" will

Re: [PATCH] net: dev_forward_skb(): Scrub packet's per-netns info only when crossing netns

2018-03-13 Thread Yuval Shaia
tc filter add dev veth-b parent : basic match 'meta(nf_mark eq 1337)' > action simple "skb->mark 1337!" > dmesg -C > ping 12.0.0.2 > dmesg > > Before this change, the above will print nothing to dmesg. > After this change, "skb->mark 1337!" will b

Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])

2018-03-12 Thread Yuval Shaia
Bart, > > No, I didn't know, sorry about that. I'll test it as soon as I can. > Thanks for the response. Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> Tested-by: Yuval Shaia <yuval.sh...@oracle.com> > > Cheers, > Hernán > -- > To unsubscribe from this list: se

Re: [PATCH] IB/rxe: Remove unused variable (char *rxe_qp_state_name[])

2018-03-12 Thread Yuval Shaia
, sorry about that. I'll test it as soon as I can. > Thanks for the response. Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia > > Cheers, > Hernán > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net] RDS: Check cmsg_len before dereferencing CMSG_DATA

2017-12-22 Thread Yuval Shaia
if (cmsg->cmsg_len < > + CMSG_LEN(sizeof(struct rds_rdma_args))) > + return -EINVAL; > args = CMSG_DATA(cmsg); > *rdma_bytes += args->remote_vec.bytes; > } Reviewed-by: Yuval Shaia

Re: [PATCH net] RDS: Check cmsg_len before dereferencing CMSG_DATA

2017-12-22 Thread Yuval Shaia
truct rds_rdma_args))) > + return -EINVAL; > args = CMSG_DATA(cmsg); > *rdma_bytes += args->remote_vec.bytes; > } Reviewed-by: Yuval Shaia > -- > 2.4.11 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V2 net] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-13 Thread Yuval Shaia
Christoph Hellwig <h...@lst.de> > --- > PATCH V2: Yuval Shaia <yuval.sh...@oracle.com> > Link -> https://lkml.org/lkml/2017/11/9/138 > PATCH V1: Initial Submit > --- > .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 107 > +++-- > .../e

Re: [PATCH V2 net] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-13 Thread Yuval Shaia
On Thu, Nov 09, 2017 at 04:38:13PM +, Salil Mehta wrote: > This patch migrates the HNS3 driver code from use of depricated PCI > MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. > > Signed-off-by: Salil Mehta > Suggested-by: Christoph Hellwig > --- >

Re: [PATCH net] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-09 Thread Yuval Shaia
On Wed, Nov 08, 2017 at 11:56:06AM +, Salil Mehta wrote: > This patch migrates the HNS3 driver code from use of depricated PCI > MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. > > Signed-off-by: Salil Mehta > Suggested-by: Christoph Hellwig

Re: [PATCH net] net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs

2017-11-09 Thread Yuval Shaia
On Wed, Nov 08, 2017 at 11:56:06AM +, Salil Mehta wrote: > This patch migrates the HNS3 driver code from use of depricated PCI > MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. > > Signed-off-by: Salil Mehta > Suggested-by: Christoph Hellwig > --- >

Re: [PATCH] IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey

2017-11-06 Thread Yuval Shaia
cmd); > - if (status) > - goto mbx_err; > -mbx_err: > + > kfree(cmd); > return status; Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > } > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma&qu

Re: [PATCH] IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey

2017-11-06 Thread Yuval Shaia
goto mbx_err; > -mbx_err: > + > kfree(cmd); > return status; Reviewed-by: Yuval Shaia > } > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] IB/ocrdma: pr_err() strings should end with newlines

2017-09-26 Thread Yuval Shaia
et stats = %d", status); > + pr_err("Failed to reset stats = %d\n", status); > goto err; > } > } > -- Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > 1.9.1

Re: [PATCH v2] IB/ocrdma: pr_err() strings should end with newlines

2017-09-26 Thread Yuval Shaia
ts = %d", status); > + pr_err("Failed to reset stats = %d\n", status); > goto err; > } > } > -- Reviewed-by: Yuval Shaia > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] IB/ocrdma: pr_err() strings should end with newlines

2017-09-26 Thread Yuval Shaia
On Tue, Sep 26, 2017 at 12:21:44PM +0530, Arvind Yadav wrote: > pr_err() messages should end with a new-line to avoid other messages > being concatenated. > > Signed-off-by: Arvind Yadav > --- > drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- > 1 file changed, 1

Re: [PATCH] IB/ocrdma: pr_err() strings should end with newlines

2017-09-26 Thread Yuval Shaia
On Tue, Sep 26, 2017 at 12:21:44PM +0530, Arvind Yadav wrote: > pr_err() messages should end with a new-line to avoid other messages > being concatenated. > > Signed-off-by: Arvind Yadav > --- > drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines

2017-09-26 Thread Yuval Shaia
pr_err("Got MR registration for ODP MR > 512MB, not > supported for Connect-IB\n"); > goto error; > } > use_umr = false; > -- > 1.9.1 FWIW, Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > > -- > To unsubscr

Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines

2017-09-26 Thread Yuval Shaia
MR > 512MB, not > supported for Connect-IB\n"); > goto error; > } > use_umr = false; > -- > 1.9.1 FWIW, Reviewed-by: Yuval Shaia > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset

2017-08-27 Thread Yuval Shaia
lib_ah.pd = >qplib_pd; > > @@ -1016,7 +1015,6 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp > if (!qp) > return NULL; > > - memset(qp, 0, sizeof(*qp)); > qp->rdev = rdev; > > /* Initialize the shadow QP structure from the QP1 val

Re: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset

2017-08-27 Thread Yuval Shaia
+1015,6 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp > if (!qp) > return NULL; > > - memset(qp, 0, sizeof(*qp)); > qp->rdev = rdev; > > /* Initialize the shadow QP structure from the QP1 values */ > -- > 2.7.4 FWI

Re: [PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Yuval Shaia
u16 *availible_vpp, u8 *vpp_p_up); > + u16 *available_vpp, u8 *vpp_p_up); > /** > * mlx4_ALLOCATE_VPP_set - Distribution of VPPs among differnt priorities. > * The total number of VPPs assigned to all for a port must not exceed > - * the valu

Re: [PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Yuval Shaia
ored > * @vpp_p_up: Distribution of VPPs to priorities is stored in this array > * > * Returns 0 on success or a negative mlx4_core errno code. > **/ > int mlx4_ALLOCATE_VPP_get(struct mlx4_dev *dev, u8 port, > - u16 *availible_vpp, u8 *vpp_p_up); > +

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
er. > > Fix it by marking the packet for loopback if the destination > address appears in rxe's gid table. > > Signed-off-by: Marcel Apfelbaum <mar...@redhat.com> Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> Tested-by: Yuval Shaia <yuval.sh...@oracle.com> >

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
er. > > Fix it by marking the packet for loopback if the destination > address appears in rxe's gid table. > > Signed-off-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia > --- > drivers/infiniband/sw/rxe/rxe_net.c | 47 > ++

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
> > + endfor_ifa(in_dev); > > The above endfor_ifa should move to below. Please ignore, my mistake. > > > +out:

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
> > + endfor_ifa(in_dev); > > The above endfor_ifa should move to below. Please ignore, my mistake. > > > +out:

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
On Wed, Jul 26, 2017 at 05:52:48PM +0300, Marcel Apfelbaum wrote: > Currently a packet is marked for loopback only if the source and > destination address match. This is not enough when multiple > gids are present in rxe's gid table and the traffic is > from one gid to another. > > Fix it by

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-26 Thread Yuval Shaia
On Wed, Jul 26, 2017 at 05:52:48PM +0300, Marcel Apfelbaum wrote: > Currently a packet is marked for loopback only if the source and > destination address match. This is not enough when multiple > gids are present in rxe's gid table and the traffic is > from one gid to another. > > Fix it by

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Yuval Shaia
On Mon, Jun 05, 2017 at 03:39:02PM +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > To fix it, the lock is released before

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Yuval Shaia
On Mon, Jun 05, 2017 at 03:39:02PM +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > To fix it, the lock is released before

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Yuval Shaia
On Thu, Jun 01, 2017 at 04:28:55PM +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > To fix it, the lock is released before

Re: [PATCH V3] rxe: Fix a sleep-in-atomic bug in post_one_send

2017-06-05 Thread Yuval Shaia
On Thu, Jun 01, 2017 at 04:28:55PM +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > post_one_send (acquire the lock by spin_lock_irqsave) > init_send_wqe > copy_from_user --> may sleep > > To fix it, the lock is released before

Re: [infiniband-hw-i40iw] question about identical code for different branches

2017-05-18 Thread Yuval Shaia
, vchnl_msg); > - else > - vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg); > + vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg); > return I40IW_SUCCESS; > } > for (iw_vf_idx = 0; iw_vf_idx &

Re: [infiniband-hw-i40iw] question about identical code for different branches

2017-05-18 Thread Yuval Shaia
, vchnl_msg); > - else > - vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg); > + vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg); > return I40IW_SUCCESS; > } > for (iw_vf_idx = 0; iw_vf_idx &

Re: [PATCH] IB/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings

2017-05-11 Thread Yuval Shaia
p/ipoib/ipoib_ethtool.c > @@ -178,7 +178,7 @@ static inline int ib_speed_enum_to_int(int speed) > static int ipoib_get_link_ksettings(struct net_device *netdev, > struct ethtool_link_ksettings *cmd) > { > - struct ipoib_dev_priv *priv = netdev_priv(netdev

Re: [PATCH] IB/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings

2017-05-11 Thread Yuval Shaia
ic inline int ib_speed_enum_to_int(int speed) > static int ipoib_get_link_ksettings(struct net_device *netdev, > struct ethtool_link_ksettings *cmd) > { > - struct ipoib_dev_priv *priv = netdev_priv(netdev); > + struct ipoib_dev_priv *pri

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Yuval Shaia
back IB LL address into the hard header') > Reported-by: Norbert P <n...@physik.uzh.ch> > Signed-off-by: Honggang Li <ho...@redhat.com> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/infiniband/ulp

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Yuval Shaia
the hard header') > Reported-by: Norbert P > Signed-off-by: Honggang Li > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c > b/drivers/infiniband/ulp/ipoib/ipoib_main.c &g

Re: [PATCH 5/9] IB/IPoIB: Combine substrings for three messages

2017-04-18 Thread Yuval Shaia
g split across lines > > Thus fix affected source code places. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 13 +++-- > 1 file

Re: [PATCH 5/9] IB/IPoIB: Combine substrings for three messages

2017-04-18 Thread Yuval Shaia
us fix affected source code places. > > Signed-off-by: Markus Elfring Reviewed-by: Yuval Shaia > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c

Re: IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-06 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 05:21:22PM +0200, SF Markus Elfring wrote: > > I found that the fix brings no harm to the existing code. > > How do you think about to take another look at remaining update candidates > at other source code places for this Linux module? You mean the other patches in this

Re: IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-06 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 05:21:22PM +0200, SF Markus Elfring wrote: > > I found that the fix brings no harm to the existing code. > > How do you think about to take another look at remaining update candidates > at other source code places for this Linux module? You mean the other patches in this

Re: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs()

2017-04-05 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 05:06:58PM +0200, Johannes Thumshirn wrote: > On Wed, Apr 05, 2017 at 04:54:40PM +0200, SF Markus Elfring wrote: > > >> @@ -7324,8 +7324,9 @@ struct qib_devdata *qib_init_iba7322_funcs(struct > > >> pci_dev *pdev, > > >> actual_cnt -= dd->num_pports; > >

Re: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs()

2017-04-05 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 05:06:58PM +0200, Johannes Thumshirn wrote: > On Wed, Apr 05, 2017 at 04:54:40PM +0200, SF Markus Elfring wrote: > > >> @@ -7324,8 +7324,9 @@ struct qib_devdata *qib_init_iba7322_funcs(struct > > >> pci_dev *pdev, > > >> actual_cnt -= dd->num_pports; > >

Re: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-05 Thread Yuval Shaia
gt; > the array allocations in lines 264 and 268? > > Do you refer to source code places here which are affected by the update step > "[PATCH 4/5] IB/qib: Use kcalloc() in qib_init_pportdata()"? Oops, please ignore. > > > > Besides that: > > Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > > Do you find the proposed change for the shown data types really acceptable > in these function calls? I found that the fix brings no harm to the existing code. > > Regards, > Markus

Re: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-05 Thread Yuval Shaia
gt; > the array allocations in lines 264 and 268? > > Do you refer to source code places here which are affected by the update step > "[PATCH 4/5] IB/qib: Use kcalloc() in qib_init_pportdata()"? Oops, please ignore. > > > > Besides that: > > Reviewed-by: Yuval Shaia > > Do you find the proposed change for the shown data types really acceptable > in these function calls? I found that the fix brings no harm to the existing code. > > Regards, > Markus

Re: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs()

2017-04-05 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 03:51:52PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 5 Apr 2017 09:43:54 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed.

Re: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs()

2017-04-05 Thread Yuval Shaia
On Wed, Apr 05, 2017 at 03:51:52PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 5 Apr 2017 09:43:54 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding

Re: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-05 Thread Yuval Shaia
> ->congestion_entries_shadow), > + GFP_KERNEL); Not related to this patch but is related to your patch-set - can you check the array allocations in lines 264 and 268? Besides that: Reviewed-by:

Re: [PATCH 5/5] IB/qib: Adjust two size determinations in qib_init_pportdata()

2017-04-05 Thread Yuval Shaia
es_shadow), > + GFP_KERNEL); Not related to this patch but is related to your patch-set - can you check the array allocations in lines 264 and 268? Besides that: Reviewed-by: Yuval Shaia > if (!ppd->congestion_entries_shadow) >

Re: [PATCH 2/5] IB/qib: Use kmalloc_array() in qib_init_7322_variables()

2017-04-05 Thread Yuval Shaia
sizeof(*dd->cspec->sendibchk), > + GFP_KERNEL); > if (!dd->cspec->sendchkenable || !dd->cspec->sendgrhchk || > !dd->cspec->sendibchk) { > ret = -ENOMEM; Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > -- > 2.12.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/5] IB/qib: Use kmalloc_array() in qib_init_7322_variables()

2017-04-05 Thread Yuval Shaia
sizeof(*dd->cspec->sendgrhchk), > + GFP_KERNEL); > + dd->cspec->sendibchk = kmalloc_array(sbufcnt, > + sizeof(*dd->cspec->sendibchk), > +

Re: [PATCH 19/26] IB/ocrdma: Improve another size determination in ocrdma_alloc_mr()

2017-03-09 Thread Yuval Shaia
> @@ -3030,7 +3030,7 @@ struct ib_mr *ocrdma_alloc_mr(struct ib_pd *ibpd, > if (!mr) > return ERR_PTR(-ENOMEM); > > - mr->pages = kcalloc(max_num_sg, sizeof(u64), GFP_KERNEL); > + mr->pages = kcalloc(max_num_sg, sizeof(*mr->pages), GFP_KERNEL);

Re: [PATCH 19/26] IB/ocrdma: Improve another size determination in ocrdma_alloc_mr()

2017-03-09 Thread Yuval Shaia
d *ibpd, > if (!mr) > return ERR_PTR(-ENOMEM); > > - mr->pages = kcalloc(max_num_sg, sizeof(u64), GFP_KERNEL); > + mr->pages = kcalloc(max_num_sg, sizeof(*mr->pages), GFP_KERNEL); Reviewed-by: Yuval Shaia > if (!mr->pages) { >

Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()

2017-03-09 Thread Yuval Shaia
> - } > + if (new_cnt < 1 || new_cnt > cq->max_hw_cqe) > + return -EINVAL; > ibcq->cqe = new_cnt; > - return status; > + return 0; Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > } > > static void ocrdma_flush

Re: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq()

2017-03-09 Thread Yuval Shaia
qe) > + return -EINVAL; > ibcq->cqe = new_cnt; > - return status; > + return 0; Reviewed-by: Yuval Shaia > } > > static void ocrdma_flush_cq(struct ocrdma_cq *cq) > -- > 2.12.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 20/26] IB/ocrdma: Delete an unnecessary variable assignment in ocrdma_alloc_mr()

2017-03-09 Thread Yuval Shaia
*ocrdma_alloc_mr(struct ib_pd *ibpd, > return ERR_PTR(-ENOMEM); > > mr->pages = kcalloc(max_num_sg, sizeof(*mr->pages), GFP_KERNEL); > - if (!mr->pages) { > - status = -ENOMEM; > + if (!mr->pages) > goto pl_err; &

Re: [PATCH 20/26] IB/ocrdma: Delete an unnecessary variable assignment in ocrdma_alloc_mr()

2017-03-09 Thread Yuval Shaia
MEM); > > mr->pages = kcalloc(max_num_sg, sizeof(*mr->pages), GFP_KERNEL); > - if (!mr->pages) { > - status = -ENOMEM; > + if (!mr->pages) > goto pl_err; > - } > Reviewed-by: Yuval Shaia > status = ocrdma_get_pbl_i

Re: [PATCH 23/26] IB/ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd()

2017-03-09 Thread Yuval Shaia
return 0; > } > } > - status = _ocrdma_dealloc_pd(dev, pd); > - return status; > + return _ocrdma_dealloc_pd(dev, pd); > } Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > > static int ocrdma_alloc_lkey(struct

Re: [PATCH 23/26] IB/ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd()

2017-03-09 Thread Yuval Shaia
; @@ -769,11 +768,10 @@ int ocrdma_dealloc_pd(struct ib_pd *ibpd) > > if (is_ucontext_pd(uctx, pd)) { > ocrdma_release_ucontext_pd(uctx); > - return status; > + return 0; > } > } > -

Re: [PATCH 24/26] IB/ocrdma: One jump label less in ocrdma_alloc_ucontext_pd()

2017-03-09 Thread Yuval Shaia
> + int status = PTR_ERR(uctx->cntxt_pd); > + > uctx->cntxt_pd = NULL; > - goto err; > + return status; > } > > uctx->cntxt_pd->uctx = uctx; > uctx->cntxt_pd->ibpd.device = >ibdev; > -err: > - re

Re: [PATCH 24/26] IB/ocrdma: One jump label less in ocrdma_alloc_ucontext_pd()

2017-03-09 Thread Yuval Shaia
uctx->cntxt_pd = NULL; > - goto err; > + return status; > } > > uctx->cntxt_pd->uctx = uctx; > uctx->cntxt_pd->ibpd.device = >ibdev; > -err: > - return status; > + return 0; > } Reviewed-by: Yuval Sha

Re: [PATCH 25/26] IB/ocrdma: Delete unnecessary braces

2017-03-09 Thread Yuval Shaia
); > - } else { > - expand = ocrdma_poll_rcqe(qp, cqe, ibwc, , > - ); > - } > + expand = is_cqe_for_sq(cqe) > + ? ocrdma_poll_scqe(qp, cqe, ibwc, , ) > + : ocrdma_poll_rcqe(qp, cqe, ibwc, , ); > if (expand) > goto expand_cqe; > if (stop) > -- Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > 2.12.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 25/26] IB/ocrdma: Delete unnecessary braces

2017-03-09 Thread Yuval Shaia
@@ static int ocrdma_poll_hwcq(struct ocrdma_cq *cq, int > num_entries, > qp = dev->qp_tbl[qpn]; > BUG_ON(qp == NULL); > > - if (is_cqe_for_sq(cqe)) { > - expand = ocrdma_poll_scqe(qp, cqe, ibwc, , > - ); > - } else { > -

Re: [PATCH 26/26] IB/ocrdma: Adjust further ten checks for null pointers

2017-03-09 Thread Yuval Shaia
On Wed, Mar 08, 2017 at 08:48:39PM +0530, Devesh Sharma wrote: > Acked-By: Devesh Sharma <devesh.sha...@broadcom.com> Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > > On Wed, Mar 8, 2017 at 7:04 PM, SF Markus Elfring > <elfr...@users.sourceforge.net> wrote:

Re: [PATCH 26/26] IB/ocrdma: Adjust further ten checks for null pointers

2017-03-09 Thread Yuval Shaia
On Wed, Mar 08, 2017 at 08:48:39PM +0530, Devesh Sharma wrote: > Acked-By: Devesh Sharma Reviewed-by: Yuval Shaia > > On Wed, Mar 8, 2017 at 7:04 PM, SF Markus Elfring > wrote: > > From: Markus Elfring > > Date: Wed, 8 Mar 2017 12:50:14 +0100 > > MIME-Versi

Re: [PATCH 21/26] IB/ocrdma: Improve another size determination in ocrdma_create_srq()

2017-03-09 Thread Yuval Shaia
t; @@ -1915,7 +1915,7 @@ struct ib_srq *ocrdma_create_srq(struct ib_pd *ibpd, > if (srq->idx_bit_fields == NULL) > goto arm_err; > memset(srq->idx_bit_fields, 0xff, > -srq->bit_fields_len * sizeof(u32)); > +

Re: [PATCH 21/26] IB/ocrdma: Improve another size determination in ocrdma_create_srq()

2017-03-09 Thread Yuval Shaia
uct ib_pd *ibpd, > if (srq->idx_bit_fields == NULL) > goto arm_err; > memset(srq->idx_bit_fields, 0xff, > -srq->bit_fields_len * sizeof(u32)); > + srq->bit_fields_len * sizeof(*srq->idx

Re: [PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources()

2017-03-09 Thread Yuval Shaia
@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev) > > dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(*dev->stag_arr), > GFP_KERNEL); > - if (dev->stag_arr == NULL) > + if (!dev->stag_arr) > goto alloc_err; Revi

Re: [PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources()

2017-03-09 Thread Yuval Shaia
ev *dev) > > dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(*dev->stag_arr), > GFP_KERNEL); > - if (dev->stag_arr == NULL) > + if (!dev->stag_arr) > goto alloc_err; Reviewed-by: Yuval Shaia > > ocrdma_alloc_pd_pool(dev); &g

Re: [PATCH 10/26] IB/ocrdma: Improve another size determination in ocrdma_init_emb_mqe()

2017-03-08 Thread Yuval Shaia
@@ -352,7 +352,7 @@ static void *ocrdma_init_emb_mqe(u8 opcode, u32 cmd_len) > { > struct ocrdma_mqe *mqe; > > - mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); > + mqe = kzalloc(sizeof(*mqe), GFP_KERNEL); > if (!mqe) > return NULL; >

Re: [PATCH 10/26] IB/ocrdma: Improve another size determination in ocrdma_init_emb_mqe()

2017-03-08 Thread Yuval Shaia
{ > struct ocrdma_mqe *mqe; > > - mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); > + mqe = kzalloc(sizeof(*mqe), GFP_KERNEL); > if (!mqe) > return NULL; > mqe->hdr.spcl_sge_cnt_emb |= Reviewed-by: Yuval Shaia > -- > 2.1

Re: [PATCH 15/26] IB/ocrdma: Delete an error message for a failed memory allocation in ocrdma_add()

2017-03-08 Thread Yuval Shaia
+304,9 @@ static struct ocrdma_dev *ocrdma_add(struct be_dev_info > *dev_info) > struct ocrdma_dev *dev; > > dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(*dev)); > - if (!dev) { > - pr_err("Unable to allocate ib device\n"); > + if (!

Re: [PATCH 15/26] IB/ocrdma: Delete an error message for a failed memory allocation in ocrdma_add()

2017-03-08 Thread Yuval Shaia
dev_info) > struct ocrdma_dev *dev; > > dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(*dev)); > - if (!dev) { > - pr_err("Unable to allocate ib device\n"); > + if (!dev) > return NULL; > - } > + Reviewed-

Re: [PATCH 11/26] IB/ocrdma: Delete unnecessary braces

2017-03-08 Thread Yuval Shaia
pr_err("opcode=0x%x, subsystem=0x%x\n", > (rsp->subsys_op & OCRDMA_MBX_RSP_OPCODE_MASK) >> > OCRDMA_MBX_RSP_OPCODE_SHIFT, > (rsp->subsys_op & OCRDMA_MBX_RSP_SUBSYS_MASK)

Re: [PATCH 11/26] IB/ocrdma: Delete unnecessary braces

2017-03-08 Thread Yuval Shaia
ystem=0x%x\n", > (rsp->subsys_op & OCRDMA_MBX_RSP_OPCODE_MASK) >> > OCRDMA_MBX_RSP_OPCODE_SHIFT, > (rsp->subsys_op & OCRDMA_MBX_RSP_SUBSYS_MASK) >> > OCRDMA_MBX_RSP_SUBSYS_SHIFT);

Re: [PATCH 12/26] IB/ocrdma: Adjust ten checks for null pointers

2017-03-08 Thread Yuval Shaia
ipt “checkpatch.pl“ pointed information out like the following. > > Comparison to NULL could be written !… Good to know. Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > > Thus fix the affected source code places. Above line can be removed. > > Signed-of

Re: [PATCH 12/26] IB/ocrdma: Adjust ten checks for null pointers

2017-03-08 Thread Yuval Shaia
information out like the following. > > Comparison to NULL could be written !… Good to know. Reviewed-by: Yuval Shaia > > Thus fix the affected source code places. Above line can be removed. > > Signed-off-by: Markus Elfring > --- > drivers/infiniband/hw/ocrdma/ocrdma_hw.

Re: [PATCH 14/26] IB/ocrdma: Improve another size determination in ocrdma_add()

2017-03-08 Thread Yuval Shaia
vice(sizeof(*dev)); > if (!dev) { > pr_err("Unable to allocate ib device\n"); > return NULL; Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > -- > 2.12.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 14/26] IB/ocrdma: Improve another size determination in ocrdma_add()

2017-03-08 Thread Yuval Shaia
o > *dev_info) > u8 lstate = 0; > struct ocrdma_dev *dev; > > - dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(struct ocrdma_dev)); > + dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(*dev)); > if (!dev) { > pr_err(&

Re: [PATCH 08/26] IB/ocrdma: Improve size determinations in ocrdma_mbx_rdma_stats()

2017-03-08 Thread Yuval Shaia
On Wed, Mar 08, 2017 at 01:58:49PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 7 Mar 2017 20:16:16 +0100 > > Replace the specification of two data structures by pointer dereferences > as the parameter for the operator "sizeof" to make the

Re: [PATCH 08/26] IB/ocrdma: Improve size determinations in ocrdma_mbx_rdma_stats()

2017-03-08 Thread Yuval Shaia
On Wed, Mar 08, 2017 at 01:58:49PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 7 Mar 2017 20:16:16 +0100 > > Replace the specification of two data structures by pointer dereferences > as the parameter for the operator "sizeof" to make the corresponding size >

Re: [PATCH 09/26] IB/ocrdma: Improve another size determination in ocrdma_mq_cq_handler()

2017-03-08 Thread Yuval Shaia
memset(cqe, 0, sizeof(struct ocrdma_mcqe)); > + memset(cqe, 0, sizeof(*cqe)); > ocrdma_mcq_inc_tail(dev); > } Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > ocrdma_ring_cq_db(dev, dev->mq.cq.id, true, false, cqe_popped); > -- >

  1   2   >