On 07/30/2015 03:00 PM, Yang Hongyang wrote: > On 07/30/2015 01:13 PM, Jason Wang wrote: > [...] >>> + if (sender->info->type == NET_CLIENT_OPTIONS_KIND_NIC) { >>> + /* we only buffer guest output packets */ >>> + qemu_net_queue_append(queue, sender, flags, data, size, >>> + packet_send_completed); >> >> This may brings some confusion for user. Since the name is 'netbuffer'. >> Maybe we can change the filter to be ingress or out or both? Like: >> >> -device virtio-net-pci,id=virtio0 >> -netfilter buffer,id=filter0,dev=virtio0,interval=1000,type=out >> >> Then we can just try to enqueue the packet when virtio-net-pci is >> sender? > > A good idea, I also thought about this, but a question, should we make > this type option a mandatory to netfilter object or optional? if it's > optional, the default will be "all"
Yes, this should work.