From: Bernard Iremonger Date: Thu, 10 Dec 2015 15:49:17 +0000 (+0000) Subject: examples/vhost: reduce number of hugepages needed X-Git-Tag: spdx-start~7794 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f17eb179046962fdc29c3609b1c9bd46bfefa4f5;p=dpdk.git examples/vhost: reduce number of hugepages needed Add #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed. Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages required by the vhost-switch program. To change MAX_QUEUES add '-D MAX_QUEUES=512' to the EXTRA_CFLAGS variable, before building the application. Signed-off-by: Bernard Iremonger Acked-by: Konstantin Ananyev --- diff --git a/examples/vhost/main.c b/examples/vhost/main.c index b30f1bd5d0..2dcdacbef7 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,9 @@ #include "main.h" -#define MAX_QUEUES 512 +#ifndef MAX_QUEUES +#define MAX_QUEUES 128 +#endif /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1