From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [RFC iproute2-next] devlink: add info subcommand Date: Tue, 15 Jan 2019 19:05:01 +0100 Message-ID: <20190115180501.GG2290@nanopsycho> References: <20190115005009.16025-1-jakub.kicinski@netronome.com> <20190115005009.16025-8-jakub.kicinski@netronome.com> <20190115082011.GB2290@nanopsycho> <20190115095352.75661db4@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, oss-drivers@netronome.com To: Jakub Kicinski Return-path: Received: from mail-wm1-f68.google.com ([209.85.128.68]:35448 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729915AbfAOSNg (ORCPT ); Tue, 15 Jan 2019 13:13:36 -0500 Received: by mail-wm1-f68.google.com with SMTP id t200so4276515wmt.0 for ; Tue, 15 Jan 2019 10:13:35 -0800 (PST) Content-Disposition: inline In-Reply-To: <20190115095352.75661db4@cakuba.netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: Tue, Jan 15, 2019 at 06:53:52PM CET, jakub.kicinski@netronome.com wrote: >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. Okay. Fair enough. > >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 This is aligned with the rest. > >?