From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D3479239 for ; Mon, 5 Nov 2018 03:07:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2018 18:07:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,466,1534834800"; d="scan'208";a="93659092" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 04 Nov 2018 18:07:01 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 4 Nov 2018 18:07:01 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 4 Nov 2018 18:07:01 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.102]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.214]) with mapi id 14.03.0415.000; Mon, 5 Nov 2018 10:06:59 +0800 From: "Tu, Lijuan" To: "Zhu, WenhuiX" , "dts@dpdk.org" CC: "Zhu, WenhuiX" Thread-Topic: [dts] [PATCH V1] tests/kni:set kni virtual interface carrier up automatically Thread-Index: AQHUcnMhJxHcyfmWDEK2N01MkTyKXqVAclTQ Date: Mon, 5 Nov 2018 02:06:58 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0B9B6703@SHSMSX101.ccr.corp.intel.com> References: <1541139344-21101-1-git-send-email-wenhuix.zhu@intel.com> In-Reply-To: <1541139344-21101-1-git-send-email-wenhuix.zhu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzg0NDMyYzgtMmEwZC00NzNkLWEyMzgtOTg0NzI0MWUzODgyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMGtmTStzUGJzSW9kakNyMlpUM0haS01GS2o5cHVJZHB6b3JrUUZWQ3hUNDRxY2w5ajVCem1HdGpzSVRQQXpUYiJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Mon, 05 Nov 2018 02:07:05 -0000 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui > Sent: Friday, November 2, 2018 2:16 PM > To: dts@dpdk.org > Cc: Zhu, WenhuiX > Subject: [dts] [PATCH V1] tests/kni:set kni virtual interface carrier up > automatically >=20 > kni interface carrier status is "off"by default, which is equivalent of c= able not > plugged in in physical device,so start kni sample application with -m > parameter, set kni virtual interface carrier up automatically [Lijuan] The description is not align with dpdk documentation. "-m" means e= nable link monitoring, and the link status will be updated to match the phy= sical NIC port's state. >=20 > Signed-off-by: zhuwenhui > --- > tests/TestSuite_kni.py | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) >=20 > 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 >=20 > - def start_kni(self, lo_mode=3DNone, kthread_mode=3DNone): > + def start_kni(self, lo_mode=3DNone, kthread_mode=3DNone, status=3DTr= ue): > """ > 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']) >=20 > config_param =3D self.build_config_param() > - > - out_kni =3D 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 =3D 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 =3D 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) >=20 > time.sleep(5) > if kthread_mode =3D=3D '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=3DFalse) > for port in self.config['ports']: > virtual_interface =3D self.virtual_interface_name(port) >=20 > -- > 2.17.2