From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2949DC169C4 for ; Fri, 8 Feb 2019 07:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E948721917 for ; Fri, 8 Feb 2019 07:10:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbfBHHKF (ORCPT ); Fri, 8 Feb 2019 02:10:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:52950 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726004AbfBHHKF (ORCPT ); Fri, 8 Feb 2019 02:10:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8C1AAAF1F; Fri, 8 Feb 2019 07:10:04 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 1BB47E0142; Fri, 8 Feb 2019 08:10:04 +0100 (CET) Date: Fri, 8 Feb 2019 08:10:04 +0100 From: Michal Kubecek To: netdev@vger.kernel.org Cc: "Nunley, Nicholas D" , "Kirsher, Jeffrey T" , "linville@tuxdriver.com" , "nhorman@redhat.com" , "sassmann@redhat.com" Subject: Re: [PATCH v2 4/6] ethtool: support per-queue sub command --show-coalesce Message-ID: <20190208071004.GB7035@unicorn.suse.cz> References: <20190206000106.24364-1-jeffrey.t.kirsher@intel.com> <20190206000106.24364-4-jeffrey.t.kirsher@intel.com> <20190206132228.GB18410@unicorn.suse.cz> <146CDE3B8C383A4B88452B498CB0FBBBFD9C3FE9@ORSMSX157.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <146CDE3B8C383A4B88452B498CB0FBBBFD9C3FE9@ORSMSX157.amr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 07, 2019 at 11:53:40PM +0000, Nunley, Nicholas D wrote: > > > @@ -5390,7 +5438,19 @@ static int do_perqueue(struct cmd_context *ctx) > > > if (i < 0) > > > exit_bad_args(); > > > > > > - /* no sub_command support yet */ > > > + if (strstr(args[i].opts, "--show-coalesce") != NULL) { > > > > Comparing args[i].func to do_gcoalesce might be easier. > > This is the one comment where I think it's better to leave the code as it is. > To me is seems more confusing to match on a function pointer that we're never > going to call. Unless there are more objections I'd rather keep it the way it > is. No problem. This is not a code where performance is crucial. In theory, you could get into trouble if someone introduces another command (allowing per queue settings) with name like "--show-coalesce-foo" but that's not very likely, IMHO. Michal Kubecek