net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len
commit4b39bdced59708cc9475cc555b8a232da4ea01af
authorZhang Chen <zhangchen.fnst@cn.fujitsu.com>
Tue, 4 Jul 2017 06:53:55 +0000 (4 14:53 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 17 Jul 2017 12:13:53 +0000 (17 20:13 +0800)
tree93efda1a54df4b20b13b9aed25afcc59f87c1d02
parentd63b366a26b46bd8109a64bf4a2ecc5e16242a8b
net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len

We add the vnet_hdr_support option for filter-rewriter, default is disabled.
If you use virtio-net-pci or other driver needs vnet_hdr, please enable it.
You can use it for example:
-object filter-rewriter,id=rew0,netdev=hn0,queue=all,vnet_hdr_support

We get the vnet_hdr_len from NetClientState that make us
parse net packet correctly.

Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/filter-rewriter.c
qemu-options.hx