]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
netmap: remove workers zero copy mode restriction between interfaces
authorgureedo <gureedo@intersvyaz.net>
Mon, 21 Mar 2016 09:38:53 +0000 (14:38 +0500)
committergureedo <gureedo@intersvyaz.net>
Mon, 21 Mar 2016 09:38:53 +0000 (14:38 +0500)
Rationale: https://github.com/luigirizzo/netmap/issues/126

src/source-netmap.c

index 061635b647687603f92b3aaf93edfee78dd7afd1..f5b82e276e8bb79be8af9484543acbc245f43641 100644 (file)
@@ -632,14 +632,9 @@ static TmEcode ReceiveNetmapThreadInit(ThreadVars *tv, void *initdata, void **da
     char const *active_runmode = RunmodeGetActive();
     if ((aconf->copy_mode != NETMAP_COPY_MODE_NONE) && active_runmode
             && !strcmp("workers", active_runmode)) {
-        if (likely(ntv->ifsrc->mem == ntv->ifdst->mem)) {
-            ntv->flags |= NETMAP_FLAG_ZERO_COPY;
-            SCLogInfo("Enabling zero copy mode for %s->%s",
-                      aconf->iface_name, aconf->out_iface_name);
-        } else {
-            SCLogInfo("Unable to set zero copy mode for %s->%s",
-                      aconf->iface_name, aconf->out_iface_name);
-        }
+        ntv->flags |= NETMAP_FLAG_ZERO_COPY;
+        SCLogInfo("Enabling zero copy mode for %s->%s",
+                  aconf->iface_name, aconf->out_iface_name);
     }
 
     if (aconf->bpf_filter) {