From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [patch net-next 00/10] Add support for resource abstraction Date: Wed, 20 Dec 2017 12:23:54 -0700 Message-ID: References: <20171220115821.22171-1-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, arkadis@mellanox.com, mlxsw@mellanox.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, michael.chan@broadcom.com, ganeshgr@chelsio.com, saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, ast@kernel.org, daniel@iogearbox.net, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com, alexander.h.duyck@intel.com, linville@tuxdriver.com, gospo@broadcom.com, steven.lin1@broadcom.com, yuvalm@mellanox.com, ogerlitz@mellanox.com, roopa@cumulusnetworks.com To: Jiri Pirko , netdev@vger.kernel.org Return-path: Received: from mail-pl0-f68.google.com ([209.85.160.68]:41131 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755534AbdLTTX5 (ORCPT ); Wed, 20 Dec 2017 14:23:57 -0500 Received: by mail-pl0-f68.google.com with SMTP id g2so9575647pli.8 for ; Wed, 20 Dec 2017 11:23:57 -0800 (PST) In-Reply-To: <20171220115821.22171-1-jiri@resnulli.us> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/20/17 4:58 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Many of the ASIC's internal resources are limited and are shared between > several hardware procedures. For example, unified hash-based memory can > be used for many lookup purposes, like FDB and LPM. In many cases the user > can provide a partitioning scheme for such a resource in order to perform > fine tuning for his application. In such cases performing driver reload is > needed for the changes to take place, thus this patchset also adds support > for hot reload. > > Such an abstraction can be coupled with devlink's dpipe interface, which > models the ASIC's pipeline as a graph of match/action tables. By modeling > the hardware resource object, and by coupling it to several dpipe tables, > further visibility can be achieved in order to debug ASIC-wide issues. > > The proposed interface will provide the user the ability to understand the > limitations of the hardware, and receive notification regarding its occupancy. > Furthermore, monitoring the resource occupancy can be done in real-time and > can be useful in many cases. > --- > Userspace part prototype can be found at https://github.com/arkadis/iproute2/ > at resource_dev branch. > The breakout problem I mentioned in the last round of patches has not been fixed: $ ./devlink port split swp1 count 4 $ ps -C devlink PID TTY TIME CMD 4530 pts/0 00:00:00 devlink $ cat /proc/4530/stack [<0>] devlink_port_unregister+0x29/0x60 [devlink] [<0>] mlxsw_core_port_fini+0x25/0x50 [mlxsw_core] [<0>] mlxsw_sp_port_remove+0xf0/0x100 [mlxsw_spectrum] [<0>] mlxsw_sp_port_split+0xdc/0x240 [mlxsw_spectrum] [<0>] mlxsw_devlink_port_split+0x36/0x50 [mlxsw_core] [<0>] devlink_nl_cmd_port_split_doit+0x3d/0x50 [devlink] [<0>] genl_family_rcv_msg+0x1c4/0x380 [<0>] genl_rcv_msg+0x4c/0x90 [<0>] netlink_rcv_skb+0xe7/0x120 [<0>] genl_rcv+0x28/0x40 [<0>] netlink_unicast+0x181/0x230 [<0>] netlink_sendmsg+0x273/0x350 [<0>] SYSC_sendto+0x10e/0x1a0 [<0>] SyS_sendto+0xe/0x10 [<0>] do_syscall_64+0x5c/0x120 [<0>] entry_SYSCALL64_slow_path+0x25/0x25 [<0>] 0xffffffffffffffff I rebuilt the tool from remotes/arkadi/resource_dev and I am not seeing anything from the devlink command: $ ./devlink resource show pci/0000:03:00.0 devlink answers: Success Checking the kernel: $ grep mlxsw_sp_resource_ /proc/kallsyms ffffffffa0145080 t mlxsw_sp_resource_kvd_size_validate [mlxsw_spectrum] ffffffffa01450a0 t mlxsw_sp_resource_kvd_linear_size_validate [mlxsw_spectrum] ffffffffa01456a0 t mlxsw_sp_resource_kvd_hash_double_size_validate [mlxsw_spectrum] ffffffffa0145d40 t mlxsw_sp_resource_kvd_linear_occ_get [mlxsw_spectrum] ffffffffa0145d70 t mlxsw_sp_resource_kvd_hash_single_size_validate [mlxsw_spectrum]