netmap: strict check for zero copy mode

Netmap does not guarantees that mmap'ed regions for different interfaces would be the same.
pull/1606/head
Aleksey Katargin 10 years ago committed by Victor Julien
parent 5104b02f32
commit 823167bde2

@ -578,8 +578,15 @@ static TmEcode ReceiveNetmapThreadInit(ThreadVars *tv, void *initdata, void **da
char const *active_runmode = RunmodeGetActive();
if (active_runmode && !strcmp("workers", active_runmode)) {
ntv->flags |= NETMAP_FLAG_ZERO_COPY;
SCLogInfo("Enabling zero copy mode");
if (likely(ntv->ifsrc->mem == ntv->ifdst->mem)) {
ntv->flags |= NETMAP_FLAG_ZERO_COPY;
SCLogInfo("Enabling zero copy mode for %s->%s",
aconf->iface, aconf->out_iface);
} else {
SCLogInfo("Unable to set zero copy mode for %s->%s",
aconf->iface, aconf->out_iface);
}
}
if (aconf->bpf_filter) {

Loading…
Cancel
Save