From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C693A034F; Thu, 1 Apr 2021 09:47:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33ACA141083; Thu, 1 Apr 2021 09:47:56 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C328F4013F for ; Thu, 1 Apr 2021 09:47:54 +0200 (CEST) IronPort-SDR: n85+UDIzFnrJjpELJL6eCvtT6Qhde1VxC5VFD60jgcJp49rJFTPrp7AduXv2N72z5vu5ATwEPT r2nnBAQNxnug== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="179304936" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="179304936" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 00:47:51 -0700 IronPort-SDR: kybAmUx4h+XLc1ZHcPAeS7cpO2MkNhbLXu5wbSTYiNTZWrgke2Yd1nFKenxOULq+4/wxA5A/qS 0DXcPBybMSzw== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="610810646" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 00:47:50 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Thu, 1 Apr 2021 15:38:33 +0800 Message-Id: <20210401073833.26279-1-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] framework/dut: fix getting nic info failed in FreeBSD X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Getting pci_id will be failed in FreeBSD and it causes get nic name and default_driver failed, and will cause many cases failed, fix it by assign the pci_id and reget the nic and driver name. Signed-off-by: Haiyang Zhao --- framework/dut.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/dut.py b/framework/dut.py index 6216166d..ca1c9089 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -1061,6 +1061,9 @@ class Dut(Crb): bus_id = addr_array[1] devfun_id = addr_array[2] port = GetNicObj(self, domain_id, bus_id, devfun_id) + port.pci_id= pci_id + port.name = settings.get_nic_name(pci_id) + port.default_driver = settings.get_nic_driver(pci_id) intf = port.get_interface_name() macaddr = port.get_mac_addr() -- 2.17.1