Re: [net-next PATCH 2/2] mlxsw: spectrum_kvdl: avoid uninitialized variable warning

2018-02-25 Thread Arkadi Sharshevsky
hernet/mellanox/mlxsw/spectrum_kvdl.c > @@ -270,6 +270,8 @@ static int mlxsw_sp_kvdl_part_init(struct mlxsw_sp > *mlxsw_sp, > case MLXSW_SP_KVDL_PART_LARGE_CHUNKS: > resource_id = MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS; > break; > + default: > + return -EINVAL; > } > > err = devlink_resource_size_get(devlink, resource_id, &resource_size); > Acked-by: Arkadi Sharshevsky

Re: [net-next PATCH 1/2] mlxsw: spectrum_kvdl: use div_u64() for 64-bit division

2018-02-25 Thread Arkadi Sharshevsky
_sp > *mlxsw_sp, > resource_size = info->end_index - info->start_index + 1; > } > > - nr_entries = resource_size / info->alloc_size; > + nr_entries = div_u64(resource_size, info->alloc_size); > usage_size = BITS_TO_LONGS(nr_entries) * sizeof(unsigned long); > part = kzalloc(sizeof(*part) + usage_size, GFP_KERNEL); > if (!part) > Acked-by: Arkadi Sharshevsky

Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-29 Thread Arkadi Sharshevsky
On 08/29/2017 03:50 PM, Andrew Lunn wrote: > On Tue, Aug 29, 2017 at 08:25:23AM +0200, Jiri Pirko wrote: >> Mon, Aug 28, 2017 at 10:08:34PM CEST, and...@lunn.ch wrote: I see this overlaps a lot with DPIPE. Why won't you use that to expose your hw state? >>> >>> We took a look at dpipe a

Re: [PATCH] devlink: fix potential memort leak

2017-06-04 Thread Arkadi Sharshevsky
On 06/04/2017 03:49 PM, Haishuang Yan wrote: > We must free allocated skb when genlmsg_put() return fails. > > Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") > Signed-off-by: Haishuang Yan > --- > net/core/devlink.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-