qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter


From: Yang Hongyang
Subject: Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter
Date: Wed, 22 Jul 2015 23:06:54 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0



On 07/22/2015 09:05 PM, Thomas Huth wrote:
On 22/07/15 12:55, Yang Hongyang wrote:
This patch add a net filter between network backend and NIC devices.
All packets will pass by this filter.
TODO:
  multiqueue support.
  plugin support.

               +--------------+       +-------------+
+----------+  |    filter    |       |frontend(NIC)|
| real     |  |              |       |             |
| network  <--+backend       <-------+             |
| backend  |  |         peer +-------> peer        |
+----------+  +--------------+       +-------------+

Usage:
-netdev tap,id=bn0  # you can use whatever backend as needed
-netdev filter,id=f0,backend=bn0,plugin=dump
-device e1000,netdev=f0

That's basically a neat idea... however, one question remains: Will
there be other filters beside the "dump" filter that you mentioned in
your example? Do you already have something in mind?

Yes, one usecase I can think of is a netbuffer plugin, which simply
buffer the packets, and then release the packets on demand, this can
be used by vm ft solutions like microcheckpoiting, will simplify the
network configuration of MC, currently MC network replication needs
kernel support and some extra configuration.
Another use case could be COLO ft solution, it needs to capture packets
from both primary/secondary and compare them to decide whether we
should start a checkpoint.


If not, I think this is likely not worth the effort - and we likely
should keep it simple and implement the dump option as suggested with my
patches instead.

diff --git a/net/filter.c b/net/filter.c
new file mode 100644
index 0000000..006c64a
--- /dev/null
+++ b/net/filter.c
@@ -0,0 +1,200 @@
+/*
+ * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
+ * (a.k.a. Fault Tolerance or Continuous Replication)

This looks like a bad copy-n-paste comment... ?

+ * Copyright (c) 2015 HUAWEI TECHNOLOGIES CO., LTD.
+ * Copyright (c) 2015 FUJITSU LIMITED
+ * Copyright (c) 2015 Intel Corporation
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later.  See the COPYING file in the top-level directory.
+ */
...

  Thomas





--
Thanks,
Yang.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]