From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Chen, BoX C" <box.c.chen@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, BoX C" <box.c.chen@intel.com>
Subject: Re: [dts] [PATCH V1] tests/ddp_ppp_l2tp: change scapy/PPPoE sessionid
Date: Sun, 19 Jan 2020 08:34:39 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBAD528@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1579412582-114658-1-git-send-email-box.c.chen@intel.com>
applied
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Chen,Bo
> Sent: Sunday, January 19, 2020 1:43 PM
> To: dts@dpdk.org
> Cc: Chen, BoX C <box.c.chen@intel.com>
> Subject: [dts] [PATCH V1] tests/ddp_ppp_l2tp: change scapy/PPPoE sessionid
>
> Change scapy/PPPoE session_id to sessionid
>
> Signed-off-by: Chen,Bo <box.c.chen@intel.com>
> ---
> tests/TestSuite_ddp_ppp_l2tp.py | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/tests/TestSuite_ddp_ppp_l2tp.py
> b/tests/TestSuite_ddp_ppp_l2tp.py index dc011e4..e5a1977 100644
> --- a/tests/TestSuite_ddp_ppp_l2tp.py
> +++ b/tests/TestSuite_ddp_ppp_l2tp.py
> @@ -105,13 +105,13 @@ class TestDdpPppL2tp(TestCase):
> pkts = {'IPV4/L2TP': 'Ether(src="%s", dst="%s")/IP()/UDP(dport=1701,
> sport=1701)/L2TP(session_id=%s)/Raw("X"*20)'
> % (src_mac, dst_mac, session_id)}
> if flowtype == 28:
> - pkts = {'PPPOE/IPV4/UDP':
> 'Ether()/PPPoE(session_id=%s)/PPP(proto=0x21)/IP(src="%s",dst="%s")/UDP(
> sport=%d,dport=%d)/Raw("X"*20)'
> + pkts = {'PPPOE/IPV4/UDP':
> 'Ether()/PPPoE(sessionid=%s)/PPP(proto=0x21)/IP(src="%s",dst="%s")/UDP(s
> port=%d,dport=%d)/Raw("X"*20)'
> % (session_id, src_ip, dst_ip, sport, dport)}
> if flowtype == 29:
> - pkts = {'PPPOE/IPV6/UDP':
> 'Ether()/PPPoE(session_id=%s)/PPP(proto=0x57)/IPv6(src="%s",dst="%s")/UD
> P(sport=%d,dport=%d)/Raw("X"*20)'
> + pkts = {'PPPOE/IPV6/UDP':
> 'Ether()/PPPoE(sessionid=%s)/PPP(proto=0x57)/IPv6(src="%s",dst="%s")/UDP
> (sport=%d,dport=%d)/Raw("X"*20)'
> % (session_id, src_ipv6, dst_ipv6, sport, dport)}
> if flowtype == 30:
> - pkts = {'PPPOE': 'Ether(src="%s", dst="%s")/PPPoE(session_id=%s)'
> + pkts = {'PPPOE': 'Ether(src="%s", dst="%s")/PPPoE(sessionid=%s)'
> % (src_mac, dst_mac, session_id)}
> return pkts
>
> @@ -128,11 +128,11 @@ class TestDdpPppL2tp(TestCase):
> if flowtype == 26:
> a = Ether(dst="3C:FD:FE:A3:A0:01",
> src="4C:FD:FE:A3:A0:01")/IP()/UDP(dport=1701,
> sport=1701)/L2TP(session_id=0x7)/Raw("X"*20)
> if flowtype == 28:
> - a = Ether()/PPPoE(session_id=0x7)/PPP(proto=0x21)/IP(dst="1.1.1.1",
> src="2.2.2.2")/UDP(dport=4000, sport=8000)/Raw("X"*20)
> + a =
> + Ether()/PPPoE(sessionid=0x7)/PPP(proto=0x21)/IP(dst="1.1.1.1",
> + src="2.2.2.2")/UDP(dport=4000, sport=8000)/Raw("X"*20)
> if flowtype == 29:
> - a =
> Ether()/PPPoE(session_id=0x7)/PPP(proto=0x57)/IPv6(dst="1001:0db8:85a3:
> 0000:0000:8a2e:0370:0001",
> src="2001:0db8:85a3:0000:0000:8a2e:0370:0001")/UDP(dport=4000,
> sport=8000)/Raw("X"*20)
> + a =
> + Ether()/PPPoE(sessionid=0x7)/PPP(proto=0x57)/IPv6(dst="1001:0db8:85a3:
> + 0000:0000:8a2e:0370:0001",
> + src="2001:0db8:85a3:0000:0000:8a2e:0370:0001")/UDP(dport=4000,
> + sport=8000)/Raw("X"*20)
> if flowtype == 30:
> - a = Ether(dst="3C:FD:FE:A3:A0:01",
> src="4C:FD:FE:A3:A0:01")/PPPoE(session_id=0x7)
> + a = Ether(dst="3C:FD:FE:A3:A0:01",
> + src="4C:FD:FE:A3:A0:01")/PPPoE(sessionid=0x7)
> ba = bytearray(bytes(a))
> rawfile_src = '/tmp/test.raw'
> File = open("%s" % rawfile_src, "wb") @@ -159,10 +159,8 @@ class
> TestDdpPppL2tp(TestCase):
> qnum = self.element_strip(out, pattern)
> ptypes = packet_type.split('/')
> if flowtype in [23, 24, 26]:
> - layerparams = ['L3_', 'TUNNEL_',
> - 'INNER_L3_', 'INNER_L4_']
> - endparams = ['_EXT_UNKNOWN', '',
> - '_EXT_UNKNOWN', '']
> + layerparams = ['L3_', 'TUNNEL_']
> + endparams = ['_EXT_UNKNOWN', '']
> if flowtype in [28, 29, 30]:
> layerparams = ['L2_ETHER_', 'L3_', 'L4_']
> endparams = ['', '_EXT_UNKNOWN', '']
> --
> 2.17.2
prev parent reply other threads:[~2020-01-19 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 5:43 Chen,Bo
2020-01-19 6:41 ` Chen, BoX C
2020-01-19 8:34 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BBAD528@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=box.c.chen@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).