Netdev List
 help / color / mirror / Atom feed
* [iproute PATCH] ip-link: Support printing VF trust setting
@ 2016-03-31 12:43 Phil Sutter
  0 siblings, 0 replies; only message in thread
From: Phil Sutter @ 2016-03-31 12:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-31 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 12:43 [iproute PATCH] ip-link: Support printing VF trust setting Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox