Message ID | 20211028090556.3168043-3-chen.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | net/filter: Optimize filters vnet_hdr support | expand |
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index cb3a96cde1..70fa71583a 100644 --- a/net/filter-rewriter.c +++ b/net/filter-rewriter.c @@ -266,9 +266,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); @@ -415,7 +413,7 @@ static void filter_rewriter_init(Object *obj) { RewriterState *s = FILTER_REWRITER(obj); - s->vnet_hdr = false; + s->vnet_hdr = true; s->failover_mode = FAILOVER_MODE_OFF; }
Make the vnet header a necessary part of filter transfer protocol. Signed-off-by: Zhang Chen <chen.zhang@intel.com> --- net/filter-rewriter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)