[dpdk-dev,v3] examples/vhost: reduce number of hugepages needed
Commit Message
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.
Changes in v3:
Added #ifndef MAX_QUEUES line before #define MAX_QUEUES 128
Changes in v2:
remove comment added before #define MAX_QUEUES in v1 patch.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
examples/vhost/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Thursday, December 10, 2015 3:49 PM
> To: dev@dpdk.org
> Cc: Xie, Huawei; yuanhan.liu@linux.intel.com; Ananyev, Konstantin; Iremonger, Bernard
> Subject: [PATCH v3] 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.
>
> Changes in v3:
> Added #ifndef MAX_QUEUES line before #define MAX_QUEUES 128
>
> Changes in v2:
> remove comment added before #define MAX_QUEUES in v1 patch.
>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
> examples/vhost/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index b30f1bd..2dcdacb 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
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.6.3
> > 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.
> >
> > Changes in v3:
> > Added #ifndef MAX_QUEUES line before #define MAX_QUEUES 128
> >
> > Changes in v2:
> > remove comment added before #define MAX_QUEUES in v1 patch.
> >
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied, thanks
@@ -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