From: Stephen Hemminger <stephen@networkplumber•org>
To: Ariel Levkovich <lariel@mellanox•com>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>,
Jiri Pirko <jiri@mellanox•com>
Subject: Re: [PATCH 2/3] ip: Present the VF VLAN tagging mode
Date: Wed, 30 Oct 2019 16:29:20 -0700 [thread overview]
Message-ID: <20191030162920.3ec8549d@hermes.lan> (raw)
In-Reply-To: <1572463033-26368-3-git-send-email-lariel@mellanox.com>
On Wed, 30 Oct 2019 19:17:32 +0000
Ariel Levkovich <lariel@mellanox•com> wrote:
> + if (vlan_mode->mode == IFLA_VF_VLAN_MODE_TRUNK)
> + print_string(PRINT_ANY,
> + "vlan-mode",
> + ", vlan-mode %s",
> + "trunk");
> + else if (vlan_mode->mode == IFLA_VF_VLAN_MODE_VST)
> + print_string(PRINT_ANY,
> + "vlan-mode",
> + ", vlan_mode %s",
> + "vst");
> + else if (vlan_mode->mode == IFLA_VF_VLAN_MODE_VGT)
> + print_string(PRINT_ANY,
> + "vlan-mode",
> + ", vlan-mode %s",
> + "vgt");
This seems like you want something like:
print_string(PRINT_ANY, "vlan-mode", ", vlan-mode %s",
vlan_mode_str(vlan_mode->mode);
and why the comma in the output? the convention for ip commands is that
the output format is equivalent to the command line.
next prev parent reply other threads:[~2019-10-30 23:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 19:17 [PATCH 0/3] VGT+ support Ariel Levkovich
2019-10-30 19:17 ` [PATCH 1/3] ip: Allow query link with extended vf properties Ariel Levkovich
2019-10-30 19:17 ` [PATCH 2/3] ip: Present the VF VLAN tagging mode Ariel Levkovich
2019-10-30 23:29 ` Stephen Hemminger [this message]
2019-10-31 14:50 ` Ariel Levkovich
2019-10-30 19:17 ` [PATCH 3/3] ip: Add SR-IOV VF VGT+ support Ariel Levkovich
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=20191030162920.3ec8549d@hermes.lan \
--to=stephen@networkplumber$(echo .)org \
--cc=jiri@mellanox$(echo .)com \
--cc=lariel@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox