summaryrefslogtreecommitdiffstats
path: root/vnfs/qemu/qemu_pci_passthrough.py
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/qemu/qemu_pci_passthrough.py')
-rw-r--r--vnfs/qemu/qemu_pci_passthrough.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/vnfs/qemu/qemu_pci_passthrough.py b/vnfs/qemu/qemu_pci_passthrough.py
index 951d6086..ba1f1010 100644
--- a/vnfs/qemu/qemu_pci_passthrough.py
+++ b/vnfs/qemu/qemu_pci_passthrough.py
@@ -39,7 +39,7 @@ class QemuPciPassthrough(IVnfQemu):
"""
super(QemuPciPassthrough, self).__init__()
self._logger = logging.getLogger(__name__)
- self._nics = S.getValue('NICS')
+ self._host_nics = S.getValue('NICS')
# in case of SRIOV and PCI passthrough we must ensure, that MAC addresses are swapped
if S.getValue('SRIOV_ENABLED') and not self._testpmd_fwd_mode.startswith('mac'):
@@ -47,7 +47,7 @@ class QemuPciPassthrough(IVnfQemu):
self._testpmd_fwd_mode, 'mac')
self._testpmd_fwd_mode = 'mac'
- for nic in self._nics:
+ for nic in self._host_nics:
self._cmd += ['-device', 'vfio-pci,host=' + nic['pci']]
def start(self):
@@ -59,12 +59,12 @@ class QemuPciPassthrough(IVnfQemu):
# bind every interface to vfio-pci driver
try:
- nics_list = list(tmp_nic['pci'] for tmp_nic in self._nics)
+ nics_list = list(tmp_nic['pci'] for tmp_nic in self._host_nics)
tasks.run_task(['sudo', _RTE_PCI_TOOL, '--bind=vfio-pci'] + nics_list,
self._logger, 'Binding NICs %s...' % nics_list, True)
except subprocess.CalledProcessError:
- self._logger.error('Unable to bind NICs %s', self._nics)
+ self._logger.error('Unable to bind NICs %s', self._host_nics)
super(QemuPciPassthrough, self).start()
@@ -75,7 +75,7 @@ class QemuPciPassthrough(IVnfQemu):
super(QemuPciPassthrough, self).stop()
# bind original driver to every interface
- for nic in self._nics:
+ for nic in self._host_nics:
if nic['driver']:
try:
tasks.run_task(['sudo', _RTE_PCI_TOOL, '--bind=' + nic['driver'], nic['pci']],
04 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341