@@ -34,7 +34,6 @@ struct RewriterState {
NetQueue *incoming_queue;
/* hashtable to save connection */
GHashTable *connection_track_table;
- bool vnet_hdr;
bool failover_mode;
};
@@ -266,9 +265,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
iov_to_buf(iov, iovcnt, 0, buf, size);
- if (s->vnet_hdr) {
- vnet_hdr_len = nf->netdev->vnet_hdr_len;
- }
+ vnet_hdr_len = nf->netdev->vnet_hdr_len;
pkt = packet_new_nocopy(buf, size, vnet_hdr_len);
@@ -395,27 +392,10 @@ static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
}
-static bool filter_rewriter_get_vnet_hdr(Object *obj, Error **errp)
-{
- RewriterState *s = FILTER_REWRITER(obj);
-
- return s->vnet_hdr;
-}
-
-static void filter_rewriter_set_vnet_hdr(Object *obj,
- bool value,
- Error **errp)
-{
- RewriterState *s = FILTER_REWRITER(obj);
-
- s->vnet_hdr = value;
-}
-
static void filter_rewriter_init(Object *obj)
{
RewriterState *s = FILTER_REWRITER(obj);
- s->vnet_hdr = false;
s->failover_mode = FAILOVER_MODE_OFF;
}
@@ -423,10 +403,6 @@ static void colo_rewriter_class_init(ObjectClass *oc, void *data)
{
NetFilterClass *nfc = NETFILTER_CLASS(oc);
- object_class_property_add_bool(oc, "vnet_hdr_support",
- filter_rewriter_get_vnet_hdr,
- filter_rewriter_set_vnet_hdr);
-
nfc->setup = colo_rewriter_setup;
nfc->cleanup = colo_rewriter_cleanup;
nfc->receive_iov = colo_rewriter_receive_iov;
@@ -4958,12 +4958,12 @@ SRST
id can not be the same. we can just use indev or outdev, but at
least one of indev or outdev need to be specified.
- ``-object filter-rewriter,id=id,netdev=netdevid,queue=all|rx|tx,[vnet_hdr_support][,position=head|tail|id=<id>][,insert=behind|before]``
+ ``-object filter-rewriter,id=id,netdev=netdevid,queue=all|rx|tx[,position=head|tail|id=<id>][,insert=behind|before]``
Filter-rewriter is a part of COLO project.It will rewrite tcp
packet to secondary from primary to keep secondary tcp
connection,and rewrite tcp packet to primary from secondary make
- tcp packet can be handled by client.if it has the
- vnet\_hdr\_support flag, we can parse packet with vnet header.
+ tcp packet can be handled by client. Filter-rewriter support
+ parse packet with vnet header.
usage: colo secondary: -object
filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0 -object
Make the vnet header a necessary part of filter transfer protocol. So we need remove the module switch here. Signed-off-by: Zhang Chen <chen.zhang@intel.com> --- net/filter-rewriter.c | 26 +------------------------- qemu-options.hx | 6 +++--- 2 files changed, 4 insertions(+), 28 deletions(-)