Browse Source

remote ethtool and ip link dependencies

Change-Id: I530e9b4e4d2c6b1d226861131c7cdc2fa8399c2f
tags/13.3.0^0
Moshe Levi 1 week ago
parent
commit
018a2c4c50

+ 0
- 3
devstack/lib/neutron_ml2_mlnx View File

@@ -79,9 +79,6 @@ function init_neutron_ml2_mlnx {
79 79
 
80 80
 # install_neutron_ml2_mlnx() - Collect source and prepare
81 81
 function install_neutron_ml2_mlnx {
82
-    if is_service_enabled eswitchd; then
83
-        install_eswitchd
84
-    fi
85 82
     setup_develop $DEST/neutron_ml2_mlnx
86 83
 }
87 84
 

+ 0
- 2
etc/neutron/rootwrap.d/eswitchd.filters View File

@@ -2,6 +2,4 @@
2 2
 # This file should be owned by (and only-writeable by) the root user
3 3
 
4 4
 [Filters]
5
-ip: CommandFilter, ip, root
6
-ethtool: CommandFilter, ethtool, root
7 5
 ebrctl: CommandFilter, ebrctl, root

+ 1
- 2
networking_mlnx/eswitchd/eswitch_handler.py View File

@@ -50,8 +50,7 @@ class eSwitchHandler(object):
50 50
             verify_vendor_pf = (
51 51
                 self.pci_utils.verify_vendor_pf(pf, constants.VENDOR))
52 52
             if (not verify_vendor_pf or
53
-                    not self.pci_utils.is_sriov_pf(pf) or
54
-                    not self.pci_utils.is_ifc_module(pf)):
53
+                    not self.pci_utils.is_sriov_pf(pf)):
55 54
                 LOG.error(_LE("PF %s must have Mellanox Vendor ID"
56 55
                           ",SR-IOV and driver module "
57 56
                           "enabled. Terminating!") % pf)

+ 1
- 26
networking_mlnx/eswitchd/utils/pci_utils.py View File

@@ -16,13 +16,10 @@ import glob
16 16
 import os
17 17
 import re
18 18
 
19
-import ethtool
20
-from oslo_concurrency import processutils
21 19
 from oslo_log import log as logging
22 20
 
23
-from networking_mlnx._i18n import _LE, _LW
21
+from networking_mlnx._i18n import _LE
24 22
 from networking_mlnx.eswitchd.common import constants
25
-from networking_mlnx.eswitchd.utils import command_utils
26 23
 
27 24
 LOG = logging.getLogger(__name__)
28 25
 
@@ -97,28 +94,6 @@ class pciUtils(object):
97 94
         else:
98 95
             return
99 96
 
100
-    def get_interface_type(self, ifc):
101
-        cmd = ['ip', '-o', 'link', 'show', 'dev', ifc]
102
-        try:
103
-            out, err = command_utils.execute(*cmd)
104
-        except (processutils.ProcessExecutionError, OSError) as e:
105
-            LOG.warning(_LW("Failed to execute command %(cmd)s due to %(e)s"),
106
-                    {"cmd": cmd, "e": e})
107
-            raise
108
-        if out.find('link/ether') != -1:
109
-            return 'eth'
110
-        elif out.find('link/infiniband') != -1:
111
-            return 'ib'
112
-        else:
113
-            return None
114
-
115
-    def is_ifc_module(self, ifc):
116
-        if 'ipoib' in ethtool.get_module(ifc):
117
-            return True
118
-
119
-    def filter_ifcs_module(self, ifcs):
120
-        return [ifc for ifc in ifcs if self.is_ifc_module(ifc)]
121
-
122 97
     def get_pf_mlx_dev(self, pf):
123 98
         dev_path = (
124 99
             os.path.join(pciUtils.ETH_PATH % {'interface': pf},

Loading…
Cancel
Save