|
|
|
@ -227,13 +227,16 @@ void *ParseAFPConfig(const char *iface)
|
|
|
|
aconf->flags |= AFP_RING_MODE;
|
|
|
|
aconf->flags |= AFP_RING_MODE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default, "mmap-locked", (int *)&boolval);
|
|
|
|
if (aconf->flags & AFP_RING_MODE) {
|
|
|
|
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default,
|
|
|
|
|
|
|
|
"mmap-locked", (int *)&boolval);
|
|
|
|
if (boolval) {
|
|
|
|
if (boolval) {
|
|
|
|
SCLogInfo("Enabling locked memory for mmap on iface %s",
|
|
|
|
SCLogInfo("Enabling locked memory for mmap on iface %s",
|
|
|
|
aconf->iface);
|
|
|
|
aconf->iface);
|
|
|
|
aconf->flags |= AFP_MMAP_LOCKED;
|
|
|
|
aconf->flags |= AFP_MMAP_LOCKED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default, "tpacket-v3", (int *)&boolval);
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default,
|
|
|
|
|
|
|
|
"tpacket-v3", (int *)&boolval);
|
|
|
|
if (boolval) {
|
|
|
|
if (boolval) {
|
|
|
|
if (strcasecmp(RunmodeGetActive(), "workers") == 0) {
|
|
|
|
if (strcasecmp(RunmodeGetActive(), "workers") == 0) {
|
|
|
|
#ifdef HAVE_TPACKET_V3
|
|
|
|
#ifdef HAVE_TPACKET_V3
|
|
|
|
@ -251,12 +254,14 @@ void *ParseAFPConfig(const char *iface)
|
|
|
|
aconf->flags |= AFP_RING_MODE;
|
|
|
|
aconf->flags |= AFP_RING_MODE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default, "use-emergency-flush", (int *)&boolval);
|
|
|
|
(void)ConfGetChildValueBoolWithDefault(if_root, if_default,
|
|
|
|
|
|
|
|
"use-emergency-flush", (int *)&boolval);
|
|
|
|
if (boolval) {
|
|
|
|
if (boolval) {
|
|
|
|
SCLogInfo("Enabling ring emergency flush on iface %s",
|
|
|
|
SCLogInfo("Enabling ring emergency flush on iface %s",
|
|
|
|
aconf->iface);
|
|
|
|
aconf->iface);
|
|
|
|
aconf->flags |= AFP_EMERGENCY_MODE;
|
|
|
|
aconf->flags |= AFP_EMERGENCY_MODE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
aconf->copy_mode = AFP_COPY_MODE_NONE;
|
|
|
|
aconf->copy_mode = AFP_COPY_MODE_NONE;
|
|
|
|
|