diff --git a/src/runmode-dpdk.c b/src/runmode-dpdk.c index 04eae0138c..3e46984288 100644 --- a/src/runmode-dpdk.c +++ b/src/runmode-dpdk.c @@ -451,7 +451,7 @@ static int ConfigSetThreads(DPDKIfaceConfig *iconf, const char *entry_str) SCReturnInt(0); } - if (StringParseInt32(&iconf->threads, 10, 0, entry_str) < 0) { + if (StringParseUint16(&iconf->threads, 10, 0, entry_str) < 0) { SCLogError("Threads entry for interface %s contain non-numerical characters - \"%s\"", iconf->iface, entry_str); SCReturnInt(-EINVAL); diff --git a/src/source-dpdk.c b/src/source-dpdk.c index 6977300336..e85c322371 100644 --- a/src/source-dpdk.c +++ b/src/source-dpdk.c @@ -123,7 +123,7 @@ typedef struct DPDKThreadVars_ { uint16_t capture_dpdk_ierrors; uint16_t capture_dpdk_tx_errs; unsigned int flags; - int threads; + uint16_t threads; /* for IPS */ DpdkCopyModeEnum copy_mode; uint16_t out_port_id; diff --git a/src/source-dpdk.h b/src/source-dpdk.h index 7c2e980343..070d569fe2 100644 --- a/src/source-dpdk.h +++ b/src/source-dpdk.h @@ -55,8 +55,7 @@ typedef struct DPDKIfaceConfig_ { char iface[RTE_ETH_NAME_MAX_LEN]; uint16_t port_id; int32_t socket_id; - /* number of threads - zero means all available */ - int threads; + uint16_t threads; /* IPS mode */ DpdkCopyModeEnum copy_mode; const char *out_iface;