All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>
Cc: Li Zhijian <lizhijian@cn.fujitsu.com>,
	Gui jianfeng <guijianfeng@cn.fujitsu.com>,
	"eddie.dong" <eddie.dong@intel.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: Re: [Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit test for filter-redirector
Date: Wed, 2 Mar 2016 14:47:09 +0800	[thread overview]
Message-ID: <56D68C6D.30800@redhat.com> (raw)
In-Reply-To: <1456748635-1912-4-git-send-email-zhangchen.fnst@cn.fujitsu.com>



On 02/29/2016 08:23 PM, Zhang Chen wrote:
> In this unit test,we will test the filter redirector function.
>
> Start qemu with:
>
>         "-netdev tap,id=qtest-bn0 "

Please don't use tap since it needs

- CAP_NET_ADMIN
- if-up script

Neither of above could not be true for a qtest environment.

>         "-device rtl8139,netdev=qtest-bn0,id=qtest-e0 "
>         "-chardev socket,id=redirector0,path=%s,server,nowait "
>         "-chardev socket,id=redirector1,path=%s,server,nowait "
>         "-object filter-redirector,id=qtest-f1,netdev=qtest-bn0,"
>         "queue=tx,indev=redirector1 "
>         "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
>         "queue=tx,outdev=redirector0 "
>
> We inject packet to -chardev redirector1,then filter-redirector
> will pass it to filter, another filter-redirector get it and
> redirect it to redirector0,we read packet from redirector0
> and compare to what we inject.

Looks correct but I think queue='rx' should also be tested here. How about:

- using backend
- redirect tx traffic to a chardev, then inject packet from socket and
read it from chardev
- redirect from another chardev to rx traffic, then inject packet from
chardev and read if from socket?

  reply	other threads:[~2016-03-02  6:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 12:23 [Qemu-devel] [PATCH V2 0/3] Introduce filter-redirector Zhang Chen
2016-02-29 12:23 ` [Qemu-devel] [PATCH V2 1/3] net/filter-traffic: add filter-traffic.h Zhang Chen
2016-03-01  3:02   ` Li Zhijian
2016-03-01  6:56     ` Zhang Chen
2016-03-02  6:19   ` Jason Wang
2016-03-02  7:25     ` Zhang Chen
2016-03-03  6:48       ` Jason Wang
2016-03-03  7:20         ` Zhang Chen
2016-03-03  7:24           ` Jason Wang
2016-03-03  8:19             ` Zhang Chen
2016-02-29 12:23 ` [Qemu-devel] [PATCH V2 2/3] net/filter-redirector:Add filter-redirector Zhang Chen
2016-03-01  3:27   ` Li Zhijian
2016-03-02  6:31   ` Jason Wang
2016-03-02  7:31     ` Zhang Chen
2016-02-29 12:23 ` [Qemu-devel] [PATCH V2 3/3] tests/test-filter-redirector: Add unit test for filter-redirector Zhang Chen
2016-03-02  6:47   ` Jason Wang [this message]
2016-03-04  6:18     ` Li Zhijian

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=56D68C6D.30800@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhangchen.fnst@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.