summaryrefslogtreecommitdiffstats
path: root/patches/fuel-nailgun-agent/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch
blob: 4fa8a3be6069181fc07d06c7365f7de2d8b8aca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Fri, 19 May 2017 20:36:24 +0200
Subject: [PATCH] Temporary: SR-IOV: Fix VNICs broken filter.

Some blades have VNICs (VFs on a PCI device), which are not
SR-IOV VFs.

Bug report: "VNICs ignored due to SR-IOV filtering" [1]

HACK: Instead of checking for "physfn", we now rely on testing
for "physfn/net" subdir to determine whether current eth is
a SR-IOV VF or something else (thus keeping VNICs).

FIXME: Revert this patch once upstream closes bug [1].

[1] https://bugs.launchpad.net/fuel/+bug/1597775

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 ...-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 debian/patches/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch

diff --git a/debian/patches/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch b/debian/patches/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch
new file mode 100644
index 0000000..87cdffc
--- /dev/null
+++ b/debian/patches/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch
@@ -0,0 +1,35 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 7 Jul 2016 13:58:34 +0200
+Subject: [PATCH 1/4] Temporary: SR-IOV: Fix VNICs broken filter.
+
+Some blades have VNICs (VFs on a PCI device), which are not
+SR-IOV VFs.
+
+Bug report: "VNICs ignored due to SR-IOV filtering" [1]
+
+HACK: Instead of checking for "physfn", we now rely on testing
+for "physfn/net" subdir to determine whether current eth is
+a SR-IOV VF or something else (thus keeping VNICs).
+
+FIXME: Revert this patch once upstream closes bug [1].
+
+[1] https://bugs.launchpad.net/fuel/+bug/1597775
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ agent | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/agent b/agent
+index e0251be..2c041ec 100755
+--- a/agent
++++ b/agent
+@@ -581,7 +581,7 @@ class NodeAgent
+         next if File.exist?("/sys/class/net/#{int}/phy80211") ||
+                 File.exist?("/sys/class/net/#{int}/wireless")
+         # Skip virtual functions
+-        next if File.exists?("/sys/class/net/#{int}/device/physfn")
++        next if File.exists?("/sys/class/net/#{int}/device/physfn/net")
+         int_meta = {:name => int}
+         int_meta[:interface_properties] = {}
+         int_meta[:state] = intinfo[:state]
diff --git a/debian/patches/series b/debian/patches/series
index b221a98..3980c60 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-ohai-Support-reading-L1-info-from-ethtool.patch
+0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch