From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <shemming@brocade.com>
Cc: netdev@vger.kernel.org
Subject: [iproute PATCH] ip-link: Support printing VF trust setting
Date: Thu, 31 Mar 2016 14:43:32 +0200 [thread overview]
Message-ID: <1459428212-19575-1-git-send-email-phil@nwl.cc> (raw)
This adds a new item to VF lines of a PF, stating whether the VF is
trusted or not.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
ip/ipaddress.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 3998d8cec4ab2..2f1d55c115dde 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -380,6 +380,13 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
else
fprintf(fp, ", link-state disable");
}
+ if (vf[IFLA_VF_TRUST]) {
+ struct ifla_vf_trust *vf_trust = RTA_DATA(vf[IFLA_VF_TRUST]);
+
+ if (vf_trust->setting != -1)
+ fprintf(fp, ", trust %s",
+ vf_trust->setting ? "on" : "off");
+ }
if (vf[IFLA_VF_STATS] && show_stats)
print_vf_stats64(fp, vf[IFLA_VF_STATS]);
}
--
2.7.2
reply other threads:[~2016-03-31 12:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1459428212-19575-1-git-send-email-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netdev@vger.kernel.org \
--cc=shemming@brocade.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox