From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 128C6C386 for ; Thu, 23 Jun 2016 08:15:08 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 22 Jun 2016 23:15:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,515,1459839600"; d="scan'208";a="993424884" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 22 Jun 2016 23:15:07 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u5N6F6ku008123; Thu, 23 Jun 2016 14:15:06 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u5N6F3TS025788; Thu, 23 Jun 2016 14:15:05 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u5N6F39O025784; Thu, 23 Jun 2016 14:15:03 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Thu, 23 Jun 2016 14:15:01 +0800 Message-Id: <1466662501-25707-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] nics: fix domain id missing when initializing nic modules X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2016 06:15:09 -0000 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 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 diff --git a/nics/br.py b/nics/br.py index ae9f9a2..86c4d95 100644 --- a/nics/br.py +++ b/nics/br.py @@ -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 -- 1.9.3