test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: Jianbo Liu <jianbo.liu@linaro.org>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH] tests mac_filter: use scapy to send packets
Date: Fri, 2 Dec 2016 03:27:15 +0000	[thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6033532C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1480646757-13829-1-git-send-email-jianbo.liu@linaro.org>

Hi Jianbo,
Packet module is one abstract layer based on scapy. We abstracted this layer for monitoring scapy process and integrating sniff/configuration function. 
It should work the same as scapy command. I'm interesting in why your intended to use scapy replace of Packet module.

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
> Sent: Friday, December 02, 2016 10:46 AM
> To: dts@dpdk.org
> Cc: Jianbo Liu
> Subject: [dts] [PATCH] tests mac_filter: use scapy to send packets
> 
> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
> ---
>  tests/TestSuite_mac_filter.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py
> index 1c58b87..a06b812 100644
> --- a/tests/TestSuite_mac_filter.py
> +++ b/tests/TestSuite_mac_filter.py
> @@ -86,9 +86,10 @@ class TestWhitelist(TestCase):
>          Send 1 packet to portid.
>          """
>          itf =
> self.tester.get_interface(self.tester.get_local_port(portid))
> -        pkt = Packet(pkt_type='UDP')
> -        pkt.config_layer('ether', {'src': '52:00:00:00:00:00', 'dst':
> destMac})
> -        pkt.send_pkt(tx_port=itf)
> +        pkt = 'Ether(dst="%s",
> src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)' % destMac
> +        self.tester.send_expect("scapy", ">>> ")
> +        self.tester.scapy_append('sendp([%s], iface="%s")' % (pkt, itf))
> +        self.tester.scapy_execute()
> 
>      def test_add_remove_mac_address(self):
>          """
> --
> 1.9.1

  reply	other threads:[~2016-12-02  3:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  2:45 Jianbo Liu
2016-12-02  3:27 ` Liu, Yong [this message]
2016-12-02  3:45   ` Jianbo Liu
2016-12-02  5:44     ` Liu, Yong
2016-12-02  6:06       ` Jianbo Liu
2016-12-02  6:13         ` Liu, Yong
2016-12-02  6:32           ` Jianbo Liu

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=86228AFD5BCD8E4EBFD2B90117B5E81E6033532C@SHSMSX103.ccr.corp.intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    --cc=jianbo.liu@linaro.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).