From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id EA8537CDA for ; Fri, 2 Nov 2018 07:12:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2018 23:12:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,454,1534834800"; d="scan'208";a="104660150" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 01 Nov 2018 23:12:44 -0700 From: zhuwenhui To: dts@dpdk.org Cc: zhuwenhui Date: Fri, 2 Nov 2018 14:15:44 +0800 Message-Id: <1541139344-21101-1-git-send-email-wenhuix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/kni:set kni virtual interface carrier up automatically 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: Fri, 02 Nov 2018 06:12:46 -0000 kni interface carrier status is "off"by default, which is equivalent of cable not plugged in in physical device,so start kni sample application with -m parameter, set kni virtual interface carrier up automatically Signed-off-by: zhuwenhui --- tests/TestSuite_kni.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 5f81def..7655266 100644 --- a/tests/TestSuite_kni.py +++ b/tests/TestSuite_kni.py @@ -277,7 +277,7 @@ class TestKni(TestCase): """ pass - def start_kni(self, lo_mode=None, kthread_mode=None): + def start_kni(self, lo_mode=None, kthread_mode=None, status=True): """ Insert the igb_uio and rte_kni modules with passed parameters and launch kni application. @@ -306,11 +306,17 @@ class TestKni(TestCase): self.config['rx_cores'] + self.config['tx_cores'] + self.config['kernel_cores']) config_param = self.build_config_param() - - out_kni = self.dut.send_expect( - './examples/kni/build/app/kni -c %s -n %d -- -P -p %s %s &' % - (core_mask, self.dut.get_memory_channels(), port_mask, config_param), - "Link Up", 20) + + if status is not True: + out_kni = self.dut.send_expect( + './examples/kni/build/app/kni -c %s -n %d -- -P -p %s %s -m &' % + (core_mask, self.dut.get_memory_channels(), port_mask, config_param), + "Link Up", 20) + else: + out_kni = self.dut.send_expect( + './examples/kni/build/app/kni -c %s -n %d -- -P -p %s %s &' % + (core_mask, self.dut.get_memory_channels(), port_mask, config_param), + "Link Up", 20) time.sleep(5) if kthread_mode == 'single': @@ -525,7 +531,7 @@ class TestKni(TestCase): # Ports and cores configuration set in set_up_all function # Setup IP address on virtual interfaces and tester ports self.dut.kill_all() - self.start_kni() + self.start_kni(status=False) for port in self.config['ports']: virtual_interface = self.virtual_interface_name(port) -- 2.17.2