From: "huilong,xu" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH V1 3/3] update get_intf_name function
Date: Fri, 5 Jun 2015 13:50:18 +0800 [thread overview]
Message-ID: <1433483418-1673-3-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1433483418-1673-1-git-send-email-huilongx.xu@intel.com>
From: huilong xu <huilongx.xu@intel.com>
change list:
1.in linux kernerl 3.13+, i40e kerner driver merger in kernel module.
the kernerl default driver, one NIC have two intface name,
so we must get one intface name for test
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
framework/net_device.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/framework/net_device.py b/framework/net_device.py
index b8d785e..3b0a8d5 100644
--- a/framework/net_device.py
+++ b/framework/net_device.py
@@ -154,7 +154,10 @@ class NetDevice(object):
"""
command = 'ls --color=never /sys/bus/pci/devices/0000\:%s\:%s/net' % (
bus_id, devfun_id)
- return self.__send_expect(command, '# ')
+ intf_name = self.__send_expect(command, '# ')
+ if " " in intf_name:
+ return intf_name.split(" ")[0]
+ return intf_name
def get_interface_name_freebsd(self, bus_id, devfun_id, driver):
"""
--
1.7.4.4
prev parent reply other threads:[~2015-06-05 5:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 5:50 [dts] [PATCH V1 1/3] update fortville NIC test case list huilong,xu
2015-06-05 5:50 ` [dts] [PATCH V1 2/3] add unit " huilong,xu
2015-06-05 5:50 ` huilong,xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433483418-1673-3-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).