]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
netmap: don't set more than 1 thread on sw ring
authorVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 10:28:09 +0000 (12:28 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 10:28:09 +0000 (12:28 +0200)
src/runmode-netmap.c

index ff2e803ab8f6646b052feab41edc2dfc60b84163..8403d0843ebff0c2985e13446c6e12bc19a83a5e 100644 (file)
@@ -253,7 +253,10 @@ static void *ParseNetmapConfig(const char *iface_name)
 
 finalize:
 
-    if (aconf->threads == 0) {
+    if (aconf->iface_sw) {
+        /* just one thread per interface supported */
+        aconf->threads = 1;
+    } else if (aconf->threads == 0) {
         /* As NetmapGetRSSCount is broken on Linux, first run
          * GetIfaceRSSQueuesNum. If that fails, run NetmapGetRSSCount */
         aconf->threads = GetIfaceRSSQueuesNum(aconf->iface);