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 58B59A0C45; Mon, 25 Oct 2021 05:52:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F7F2407FF; Mon, 25 Oct 2021 05:52:18 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E46064003E for ; Mon, 25 Oct 2021 05:52:16 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10147"; a="290395864" X-IronPort-AV: E=Sophos;i="5.87,179,1631602800"; d="scan'208";a="290395864" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2021 20:52:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,179,1631602800"; d="scan'208";a="577781420" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 24 Oct 2021 20:52:15 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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 20:52:14 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) 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 11:52:13 +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 11:52:13 +0800 From: "Tu, Lijuan" To: "Jiale, SongX" , "dts@dpdk.org" CC: "Jiale, SongX" Thread-Topic: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off Thread-Index: AQHXvlAWb+zm4Kr/t0KcS4m8OQXDbKvjKlIw Date: Mon, 25 Oct 2021 03:52:12 +0000 Message-ID: <3a41dc8eff0b4f84beb30256714448bf@intel.com> References: <1633923720-95214-1-git-send-email-songx.jiale@intel.com> In-Reply-To: <1633923720-95214-1-git-send-email-songx.jiale@intel.com> 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: 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-dow= n-on- > close off >=20 > some nics do not support this detection function, delete the check and di= rectly > close nic link-down-on-close >=20 The check have deal with the situation that some nics might be not support = 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(-) >=20 > 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_local_= 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, se= lf.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) >=20 > 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