From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink Date: Thu, 5 Apr 2018 15:06:41 -0600 Message-ID: References: <20180328012200.15175-1-dsa@cumulusnetworks.com> <20180328012200.15175-7-dsa@cumulusnetworks.com> <20180405172718.GA9125@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, roopa@cumulusnetworks.com, shm@cumulusnetworks.com, jiri@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, andy.roulin@gmail.com To: Jiri Pirko Return-path: Received: from mail-pl0-f43.google.com ([209.85.160.43]:43548 "EHLO mail-pl0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeDEVGn (ORCPT ); Thu, 5 Apr 2018 17:06:43 -0400 Received: by mail-pl0-f43.google.com with SMTP id a39-v6so1680510pla.10 for ; Thu, 05 Apr 2018 14:06:43 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 4/5/18 2:10 PM, David Ahern wrote: > > The ASIC here is the kernel tables in a namespace. It does not make > sense to have 2 devlink instances for a single namespace. I put this example controller in netdevsim per a suggestion from Ido. The netdevsim seemed like a good idea given that modules intention -- testing network facilities. Perhaps I should have done this as a completely standalone module ... The intention is to treat the kernel's tables *per namespace* as a standalone entity that can be managed very similar to ASIC resources. Given that I can add a resource controller module (drivers/net/kern_res_mgr.c?) that creates a 'struct device' per network namespace with a devlink instance. In this case the device would very much be tied to the namespace 1:1.