diff options
author | Marvin Liu <yong.liu@intel.com> | 2016-06-23 14:15:01 +0800 |
---|---|---|
committer | Marvin Liu <yong.liu@intel.com> | 2016-06-23 14:20:30 +0800 |
commit | 94793ee5cfc2f7baf8142a37dbbbae12e495ade0 (patch) | |
tree | 740d2c2559692453e453bde8ab6ea70955e22d51 /nics | |
parent | 514ad67fdcfd03cdfa5c42f5ca9bb1b216789cfd (diff) |
nics: fix domain id missing when initializing nic modules
Domain id is imported into DTS recently. Nic modules should also support
domain id.
Skip testpoint setup when FM10k family ports work as tester ports.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Diffstat (limited to 'nics')
-rw-r--r-- | nics/atwood.py | 4 | ||||
-rw-r--r-- | nics/br.py | 8 | ||||
-rw-r--r-- | nics/net_device.py | 6 | ||||
-rw-r--r-- | nics/rrc.py | 8 |
4 files changed, 17 insertions, 9 deletions
diff --git a/nics/atwood.py b/nics/atwood.py index 8677861..e2fe458 100644 --- a/nics/atwood.py +++ b/nics/atwood.py @@ -82,8 +82,8 @@ class Atwood(NetDevice): Class for RedRockCanyou, inherit from NetDevice class """ - def __init__(self, host, bus_id, devfun_id): - super(Atwood, self).__init__(host, bus_id, devfun_id) + def __init__(self, host, domain_id, bus_id, devfun_id): + super(Atwood, self).__init__(host, domain_id, bus_id, devfun_id) self.tp_path = "~" self.host = host @@ -98,8 +98,12 @@ class BoulderRapid(NetDevice): Class for BoulderRapid, inherit from NetDevice class """ - def __init__(self, host, bus_id, devfun_id): - super(BoulderRapid, self).__init__(host, bus_id, devfun_id) + def __init__(self, host, domain_id, bus_id, devfun_id): + super(BoulderRapid, self).__init__(host, domain_id, bus_id, devfun_id) + + if host.NAME == "tester": + return + self.tp_path = "~" self.sec_port = False self.host = host diff --git a/nics/net_device.py b/nics/net_device.py index b87bc7c..897ceb9 100644 --- a/nics/net_device.py +++ b/nics/net_device.py @@ -890,15 +890,15 @@ def GetNicObj(crb, domain_id, bus_id, devfun_id): if nic == 'redrockcanyou': # redrockcanyou nic need special initialization from rrc import RedRockCanyou - obj = RedRockCanyou(crb, bus_id, devfun_id) + obj = RedRockCanyou(crb, domain_id, bus_id, devfun_id) elif nic == 'atwood': # atwood nic need special initialization from atwood import Atwood - obj = Atwood(crb, bus_id, devfun_id) + obj = Atwood(crb, domain_id, bus_id, devfun_id) elif nic == 'boulderrapid': # atwood nic need special initialization from br import BoulderRapid - obj = BoulderRapid(crb, bus_id, devfun_id) + obj = BoulderRapid(crb, domain_id, bus_id, devfun_id) else: obj = NetDevice(crb, domain_id, bus_id, devfun_id) diff --git a/nics/rrc.py b/nics/rrc.py index 7d42814..a498b7a 100644 --- a/nics/rrc.py +++ b/nics/rrc.py @@ -99,8 +99,12 @@ class RedRockCanyou(NetDevice): Class for RedRockCanyou, inherit from NetDevice class """ - def __init__(self, host, bus_id, devfun_id): - super(RedRockCanyou, self).__init__(host, bus_id, devfun_id) + def __init__(self, host, domain_id, bus_id, devfun_id): + super(RedRockCanyou, self).__init__(host, domain_id, bus_id, devfun_id) + + if host.NAME == "tester": + return + self.tp_path = "~" self.sec_port = False self.host = host |