diff options
author | Yong Liu <yong.liu@intel.com> | 2016-01-20 16:41:19 +0800 |
---|---|---|
committer | sys_stv <sys_stv@intel.com> | 2016-01-20 16:47:00 +0800 |
commit | 77e4aee5afe9901978c9ff5ecb3a50c765b60a76 (patch) | |
tree | 1e5071b599c5618a30610691985641338e763268 /nics | |
parent | 698817c2d4d35ae56c0c800a3605f970ed64b5bc (diff) |
nics fm10k: fix nic object incorrect issue
This issue happened at dut/tester have same pci address net device.
Net_device module check they will be same devices, so will return
incorrect net device object.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Diffstat (limited to 'nics')
-rw-r--r-- | nics/net_device.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nics/net_device.py b/nics/net_device.py index c3b3755..0286aa4 100644 --- a/nics/net_device.py +++ b/nics/net_device.py @@ -820,7 +820,7 @@ def GetNicObj(crb, bus_id, devfun_id): object different from default. """ # find existed NetDevice object - obj = get_from_list(crb.crb['IP'], bus_id, devfun_id) + obj = get_from_list(crb.crb['My IP'], bus_id, devfun_id) if obj: return obj @@ -831,8 +831,12 @@ def GetNicObj(crb, bus_id, devfun_id): # redrockcanyou nic need special initialization from fm10k import RedRockCanyou obj = RedRockCanyou(crb, bus_id, devfun_id) + elif nic == 'atwood': + # atwood nic need special initialization + from atwood import Atwood + obj = Atwood(crb, bus_id, devfun_id) else: obj = NetDevice(crb, bus_id, devfun_id) - add_to_list(crb.crb['IP'], obj) + add_to_list(crb.crb['My IP'], obj) return obj |