From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [patch net-next v2 00/10] Add support for resource abstraction Date: Thu, 28 Dec 2017 10:33:58 -0600 Message-ID: <4bd0a9d4-350d-274c-6370-e3a98a1e4f93@cumulusnetworks.com> References: <20171226112359.5313-1-jiri@resnulli.us> <20171227080902.GA1997@nanopsycho> <22cc777b-e39e-29c0-22fe-aa7a99ef80df@cumulusnetworks.com> <20171228162314.GA1983@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Yuval Mintz , "netdev@vger.kernel.org" , "davem@davemloft.net" , Arkadi Sharshevsky , mlxsw , "andrew@lunn.ch" , "vivien.didelot@savoirfairelinux.com" , "f.fainelli@gmail.com" , "michael.chan@broadcom.com" , "ganeshgr@chelsio.com" , Saeed Mahameed , Matan Barak , Leon Romanovsky , Ido Schimmel , "jakub.kicinski@netronome.com" , "ast@kernel.org" , "daniel@iogearbox.net" , " To: Jiri Pirko Return-path: Received: from mail-pg0-f53.google.com ([74.125.83.53]:37064 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbdL1QeC (ORCPT ); Thu, 28 Dec 2017 11:34:02 -0500 Received: by mail-pg0-f53.google.com with SMTP id o13so9299469pgp.4 for ; Thu, 28 Dec 2017 08:34:02 -0800 (PST) In-Reply-To: <20171228162314.GA1983@nanopsycho> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/28/17 10:23 AM, Jiri Pirko wrote: >> So there are 4 tables exported to userspace: >> >> 1. mlxsw_erif table which is not in any of the kvd regions (no resource >> path is given) and it has a size of 1000. Does mlxsw_erif mean a rif as >> in Router Interfaces? So the switch supports up to 1000 router interfaces. >> >> 2. mlxsw_host4 in /kvd/hash_single with a size of 62. Based on the > Size tells you the actual size. It cannot give you max size. The reason > is simple. The resources are shared among multiple tables. That is > exactly what this resource patch makes visible. > > In the erif table, the 1000 is the max not current usage. I do not have 1000 interfaces: $ ip -br li sh | wc -l 597 $ devlink dpipe table dump pci/0000:03:00.0 name mlxsw_erif ... index 503 match_value: type field_exact header mlxsw_meta field erif_port mapping ifindex mapping_value 601 value 503 action_value: type field_modify header mlxsw_meta field l3_forward value 1 The host4 table it is current size with no maximum. The meaning of table size needs to be consistent across tables.