From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [RFC iproute2-next] devlink: add info subcommand Date: Tue, 15 Jan 2019 09:53:52 -0800 Message-ID: <20190115095352.75661db4@cakuba.netronome.com> References: <20190115005009.16025-1-jakub.kicinski@netronome.com> <20190115005009.16025-8-jakub.kicinski@netronome.com> <20190115082011.GB2290@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, netdev@vger.kernel.org, oss-drivers@netronome.com To: Jiri Pirko Return-path: Received: from mail-qt1-f195.google.com ([209.85.160.195]:39688 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728073AbfAORx5 (ORCPT ); Tue, 15 Jan 2019 12:53:57 -0500 Received: by mail-qt1-f195.google.com with SMTP id u47so3955450qtj.6 for ; Tue, 15 Jan 2019 09:53:56 -0800 (PST) In-Reply-To: <20190115082011.GB2290@nanopsycho> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 15 Jan 2019 09:20:11 +0100, Jiri Pirko wrote: > > static void help(void) > > { > > pr_err("Usage: devlink [ OPTIONS ] OBJECT { COMMAND | help }\n" > > " devlink [ -f[orce] ] -b[atch] filename\n" > >- "where OBJECT := { dev | port | sb | monitor | dpipe | resource | region }\n" > >+ "where OBJECT := { dev | port | sb | monitor | dpipe | resource | region | info }\n" > > I think that "info" should be nested under "dev". It is related to dev. Ack. > Maybe it even does not have to be a separate command and can be a nested > attribute to existing DEVLINK_CMD_GET cmd. I thought about that, but I'd rather keep it as a separate command. I think it'd be good to keep DEVLINK_CMD_GET nice and lean. For versions there may be FW communication required, and reading stuff out of flash. I bit of overhead for users who just want the list of devlink instances. Having in under dev but as a separate command seems quite nice indeed. Especially given that there can only be a show subcommand.. So: For dump: $ devlink dev info But for get: $ devlink dev pci/0000:82:00.0 info or $ devlink dev info pci/0000:82:00.0 ?