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 2FDF8A0C47; Mon, 25 Oct 2021 08:37:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07156407FF; Mon, 25 Oct 2021 08:37:17 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 9C99D4003E for ; Mon, 25 Oct 2021 08:37:15 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10147"; a="216487878" X-IronPort-AV: E=Sophos;i="5.87,179,1631602800"; d="scan'208";a="216487878" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2021 23:37:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,179,1631602800"; d="scan'208";a="464753173" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 24 Oct 2021 23:37:14 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 24 Oct 2021 23:37:13 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 25 Oct 2021 14:37:11 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.012; Mon, 25 Oct 2021 14:37:11 +0800 From: "Tu, Lijuan" To: "Jiale, SongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off Thread-Index: AQHXvlAWb+zm4Kr/t0KcS4m8OQXDbKvjKlIw//+WoQCAAJeX0A== Date: Mon, 25 Oct 2021 06:37:11 +0000 Message-ID: <1f8bed50cee641b695a65ef549faa94f@intel.com> References: <1633923720-95214-1-git-send-email-songx.jiale@intel.com> <3a41dc8eff0b4f84beb30256714448bf@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off 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" > -----Original Message----- > From: Jiale, SongX > Sent: 2021=1B$BG/=1B(B10=1B$B7n=1B(B25=1B$BF|=1B(B 13:34 > To: Tu, Lijuan ; dts@dpdk.org > Subject: RE: [dts] [PATCH V2] tests/link_status_interrupt: close nic link= -down-on- > close off >=20 > some network cards do not have link-down-on-close, such as niantic, etc.,= but > using verify() to make assertions in the code will cause case failed I saw it is checked as bellowing: > > - elif not res: > > - self.logger.info("NIC %s might not support this case" = % > intf)" >=20 > Regards, > Song Jiale >=20 > > -----Original Message----- > > From: Tu, Lijuan > > Sent: Monday, October 25, 2021 11:52 AM > > To: Jiale, SongX ; dts@dpdk.org > > Cc: Jiale, SongX > > Subject: RE: [dts] [PATCH V2] tests/link_status_interrupt: close nic > > link-down-on-close off > > > > > > > > > -----Original Message----- > > > From: dts On Behalf Of Jiale Song > > > Sent: 2021=1B$BG/=1B(B10=1B$B7n=1B(B11=1B$BF|=1B(B 11:42 > > > To: dts@dpdk.org > > > Cc: Jiale, SongX > > > Subject: [dts] [PATCH V2] tests/link_status_interrupt: close nic > > > link-down-on- close off > > > > > > some nics do not support this detection function, delete the check > > > and directly close nic link-down-on-close > > > > > > > The check have deal with the situation that some nics might be not supp= ort it. > > So I don't think there is any need for your patch. > > > > > Signed-off-by: Jiale Song > > > --- > > > tests/TestSuite_link_status_interrupt.py | 19 ++----------------- > > > 1 file changed, 2 insertions(+), 17 deletions(-) > > > > > > diff --git a/tests/TestSuite_link_status_interrupt.py > > > b/tests/TestSuite_link_status_interrupt.py > > > index 5590d94..861ca50 100755 > > > --- a/tests/TestSuite_link_status_interrupt.py > > > +++ b/tests/TestSuite_link_status_interrupt.py > > > @@ -70,22 +70,6 @@ class TestLinkStatusInterrupt(TestCase): > > > self.basic_intr_mode =3D ["msix", "legacy"] > > > if self.drivername =3D=3D "vfio-pci": > > > self.basic_intr_mode.append("msi") > > > - self.intfs =3D [self.tester.get_interface(self.tester.get_lo= cal_port(i)) for i > > in > > > self.dut_ports] > > > - # check link-down-on-close flag > > > - self.flag =3D "link-down-on-close" > > > - for intf in self.intfs: > > > - check_flag =3D "ethtool --show-priv-flags %s" % intf > > > - set_flag =3D "ethtool --set-priv-flags %s %s on" % (intf= , self.flag) > > > - out =3D self.tester.send_expect(check_flag, "#") > > > - p =3D re.compile('%s\s+:\s+(\w+)' % self.flag) > > > - res =3D re.search(p, out).group(1) > > > - if res =3D=3D "off": > > > - self.tester.send_expect(set_flag, "#") > > > - time.sleep(0.5) > > > - out =3D self.tester.send_expect(check_flag, "#") > > > - self.verify(re.search(p, out).group(1) =3D=3D "on", = "set %s %s > > on failed" % > > > (intf, self.flag)) > > > - elif not res: > > > - self.logger.info("NIC %s might not support this case= " % > > intf) > > > > > > def set_link_status_and_verify(self, dutPort, status): > > > """ > > > @@ -209,6 +193,7 @@ class TestLinkStatusInterrupt(TestCase): > > > """ > > > Run after each test suite. > > > """ > > > + self.intfs =3D > > > + [self.tester.get_interface(self.tester.get_local_port(i)) for i in > > > + self.dut_ports] > > > if self.dut.get_os_type() !=3D 'freebsd': > > > for intf in self.intfs: > > > - self.tester.send_expect("ethtool --set-priv-flags %s= %s > > off" % (intf, > > > self.flag), "#", 10) > > > + self.tester.send_expect("ethtool --set-priv-flags > > > + %s link-down-on-close off" % intf, "# ") > > > -- > > > 2.17.1 > > >=20