All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Robert Marko <robert.marko@sartura.hr>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, dsahern@kernel.org, jiri@resnulli.us,
	andrew@lunn.ch, luka.perkov@sartura.hr
Subject: Re: [iproute2-next] ip: link: rmnet: add support for flag handling
Date: Wed, 4 Dec 2024 08:31:05 -0800	[thread overview]
Message-ID: <20241204083105.1827dd73@hermes.local> (raw)
In-Reply-To: <20241203124921.200637-1-robert.marko@sartura.hr>

On Tue,  3 Dec 2024 13:47:59 +0100
Robert Marko <robert.marko@sartura.hr> wrote:

> +		} else if (matches(*argv, "deaggregate") == 0) {
> +			NEXT_ARG();
> +			flags.mask |= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> +			if (strcmp(*argv, "on") == 0)
> +				flags.flags |= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> +			else if (strcmp(*argv, "off") == 0)
> +				flags.flags &= RMNET_FLAGS_INGRESS_DEAGGREGATION;
> +			else
> +				return on_off("deaggregate", *argv);
> +		} else if (matches(*argv, "commands") == 0) {
> +			NEXT_ARG();
> +			flags.mask |= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> +			if (strcmp(*argv, "on") == 0)
> +				flags.flags |= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> +			else if (strcmp(*argv, "off") == 0)
> +				flags.flags &= RMNET_FLAGS_INGRESS_MAP_COMMANDS;
> +			else
> +				return on_off("commands", *argv);
> +		} else if (matches(*argv, "qmapv4") == 0) {

New uses of matches() is discouraged because it leads to argument conflicts.
Use strcmp instead.

      reply	other threads:[~2024-12-04 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 12:47 [iproute2-next] ip: link: rmnet: add support for flag handling Robert Marko
2024-12-04 16:31 ` Stephen Hemminger [this message]

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=20241204083105.1827dd73@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=luka.perkov@sartura.hr \
    --cc=netdev@vger.kernel.org \
    --cc=robert.marko@sartura.hr \
    /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.