All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	<netdev@vger.kernel.org>, David Ahern <dsahern@kernel.org>,
	Petr Machata <petrm@nvidia.com>
Subject: Re: [PATCH iproute2] dcb: fix broken "show default-prio"
Date: Fri, 25 Feb 2022 22:30:38 +0100	[thread overview]
Message-ID: <87sfs6d434.fsf@nvidia.com> (raw)
In-Reply-To: <20220225095154.7232777b@hermes.local>


Stephen Hemminger <stephen@networkplumber.org> writes:

> On Fri, 25 Feb 2022 19:12:58 +0200
> Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
>> diff --git a/dcb/dcb_app.c b/dcb/dcb_app.c
>> index 6bd64bbed0cc..c135e73acb76 100644
>> --- a/dcb/dcb_app.c
>> +++ b/dcb/dcb_app.c
>> @@ -646,6 +646,8 @@ static int dcb_cmd_app_show(struct dcb *dcb, const char *dev, int argc, char **a
>>  		if (matches(*argv, "help") == 0) {
>>  			dcb_app_help_show_flush();
>>  			goto out;
>> +		} else if (matches(*argv, "default-prio") == 0) {
>> +			dcb_app_print_default_prio(&tab);
>>  		} else if (matches(*argv, "ethtype-prio") == 0) {
>>  			dcb_app_print_ethtype_prio(&tab);
>>  		} else if (matches(*argv, "dscp-prio") == 0) {

A fix along these lines got merged recently:

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=924f6b4a5d2b

> This is an example of why matches() sucks.
> If we add this patch, then the result of command where *argv == "d"
> will change.

To further drive this point, I made the exact same mistake in v1 of my
patch.

  reply	other threads:[~2022-02-25 21:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 17:12 [PATCH iproute2] dcb: fix broken "show default-prio" Vladimir Oltean
2022-02-25 17:51 ` Stephen Hemminger
2022-02-25 21:30   ` Petr Machata [this message]
2022-02-25 21:36     ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfs6d434.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.