naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0158-ip-link-Support-printing-VF-trust-setting.patch

049c96
From 9318ed3fad1320bbe3ca61e5ed5f317331ec38d7 Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Thu, 16 Jun 2016 16:51:20 +0200
049c96
Subject: [PATCH] ip-link: Support printing VF trust setting
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1302119
049c96
Upstream Status: iproute2.git commit fe9322781e635
049c96
Conflicts: Context changes due to missing commit a1b99717c7cd7
049c96
           ("Add displaying VF traffic statistics").
049c96
049c96
commit fe9322781e6351b5572cbaa8df4dd0e5ec96398a
049c96
Author: Phil Sutter <phil@nwl.cc>
049c96
Date:   Thu Mar 31 14:43:32 2016 +0200
049c96
049c96
    ip-link: Support printing VF trust setting
049c96
049c96
    This adds a new item to VF lines of a PF, stating whether the VF is
049c96
    trusted or not.
049c96
049c96
    Signed-off-by: Phil Sutter <phil@nwl.cc>
049c96
---
049c96
 ip/ipaddress.c | 7 +++++++
049c96
 1 file changed, 7 insertions(+)
049c96
049c96
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
049c96
index f10f58a..05e0da9 100644
049c96
--- a/ip/ipaddress.c
049c96
+++ b/ip/ipaddress.c
049c96
@@ -356,6 +356,13 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
049c96
 		else
049c96
 			fprintf(fp, ", link-state disable");
049c96
 	}
049c96
+	if (vf[IFLA_VF_TRUST]) {
049c96
+		struct ifla_vf_trust *vf_trust = RTA_DATA(vf[IFLA_VF_TRUST]);
049c96
+
049c96
+		if (vf_trust->setting != -1)
049c96
+			fprintf(fp, ", trust %s",
049c96
+			        vf_trust->setting ? "on" : "off");
049c96
+	}
049c96
 }
049c96
 
049c96
 static void print_num(FILE *fp, unsigned width, uint64_t count)
049c96
-- 
049c96
1.8.3.1
049c96