diff mbox series

[V5,2/3] net/filter: Optimize transfer protocol for filter-rewriter

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

Commit Message

Zhang Chen Oct. 28, 2021, 9:05 a.m. UTC
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(-)
diff mbox series

Patch

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;
 }