From: Victor Julien Date: Thu, 2 Jun 2016 09:01:29 +0000 (+0200) Subject: netmap: get correct RSS queues on Linux as well X-Git-Tag: suricata-3.1RC1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2133%2Fhead;p=thirdparty%2Fsuricata.git netmap: get correct RSS queues on Linux as well --- diff --git a/src/runmode-netmap.c b/src/runmode-netmap.c index dc3833abe6..fcd2a0bd70 100644 --- a/src/runmode-netmap.c +++ b/src/runmode-netmap.c @@ -255,7 +255,12 @@ static void *ParseNetmapConfig(const char *iface_name) finalize: if (aconf->threads == 0) { - aconf->threads = NetmapGetRSSCount(aconf->iface); + /* As NetmapGetRSSCount is broken on Linux, first run + * GetIfaceRSSQueuesNum. If that fails, run NetmapGetRSSCount */ + aconf->threads = GetIfaceRSSQueuesNum(aconf->iface); + if (aconf->threads == 0) { + aconf->threads = NetmapGetRSSCount(aconf->iface); + } } if (aconf->threads <= 0) { aconf->threads = 1;