From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2127FA328D for ; Tue, 22 Oct 2019 11:11:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 080E51BE98; Tue, 22 Oct 2019 11:11:27 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 91C7C1BE95 for ; Tue, 22 Oct 2019 11:11:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 02:11:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="227633356" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 22 Oct 2019 02:11:24 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:11:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:11:23 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX151.ccr.corp.intel.com ([10.239.6.50]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 17:11:22 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V2] tests/bonding: fix save pcapfile method and path Thread-Index: AQHVhLz3pfTMr417SEqCR3P0TGxTkadmZ88w Date: Tue, 22 Oct 2019 09:11:20 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB44F46@SHSMSX101.ccr.corp.intel.com> References: <1571297390-82545-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1571297390-82545-1-git-send-email-qimaix.xiao@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.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTM5NmFlMTUtMDM4Yy00Y2RhLThkZjgtN2FkMmUyZjg1N2E4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWURlWjh1VzNaSlFPbXlKcERlVjQ2UW5JVVwvQ0UrVnNoYlFtaThvWENsOEU1UHNmQ3NrR1wvcStEWjlXYzJmYmdRIn0= 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 V2] tests/bonding: fix save pcapfile method and path 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied,thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai > Sent: Thursday, October 17, 2019 3:30 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V2] tests/bonding: fix save pcapfile method and pat= h >=20 > fix save pcapfile method to new api >=20 > Signed-off-by: Xiao Qimai > --- > tests/bonding.py | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/tests/bonding.py b/tests/bonding.py index fb2a69e..6c136a3 > 100644 > --- a/tests/bonding.py > +++ b/tests/bonding.py > @@ -36,7 +36,7 @@ import struct > import socket > from socket import htonl >=20 > -from packet import Packet > +from packet import Packet, TMP_PATH > from scapy.sendrecv import sendp > from scapy.utils import wrpcap >=20 > @@ -181,14 +181,14 @@ class PmdBonding(object): > # create packet > streams =3D [] > # keep a copy of pcap for debug > - savePath =3D os.sep.join([self.target_source, > + savePath =3D os.sep.join([TMP_PATH, > "pkt_{0}.pcap".format(pkt_name)]) > pkt_type =3D pkt_config.get('type') > pkt_layers =3D pkt_config.get('pkt_layers') > pkt =3D Packet(pkt_type=3Dpkt_type.upper()) > for layer in pkt_layers.keys(): > pkt.config_layer(layer, pkt_layers[layer]) > - pkt.pktgen.write_pcap(savePath) > + pkt.save_pcapfile(filename=3DsavePath) > streams.append(pkt.pktgen.pkt) >=20 > return streams > @@ -228,14 +228,14 @@ class PmdBonding(object): > streams =3D [] > for values in pkt_configs: > # keep a copy of pcap for debug > - savePath =3D os.sep.join([self.target_source, > + savePath =3D os.sep.join([TMP_PATH, > "pkt_{0}.pcap".format(stm_name)]) > pkt_type =3D values.get('type') > pkt_layers =3D values.get('pkt_layers') > pkt =3D Packet(pkt_type=3Dpkt_type.upper()) > for layer in pkt_layers.keys(): > pkt.config_layer(layer, pkt_layers[layer]) > - pkt.pktgen.write_pcap(savePath) > + pkt.save_pcapfile(filename=3DsavePath) > streams.append(pkt.pktgen.pkt) >=20 > return streams > -- > 1.8.3.1