dpdk: Fix detection of vhost_cuse in dpdk rte_config.h
authorGary Mussar <gmussar@ciena.com>
Thu, 23 Jul 2015 17:48:53 +0000 (10:48 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Tue, 28 Jul 2015 21:00:54 +0000 (14:00 -0700)
commit693e11384088643e2dcf7822e392d9a7af1f94b8
tree459a820443eccb5ab49697f39ba11bbef60e58c3
parentadc48a5d252c28bd568bc1d13f0c2a4784f5a5e9
dpdk: Fix detection of vhost_cuse in dpdk rte_config.h

Dpdk allows users to create a config that includes other config files and
then override values.

Eg.
defconfig_x86_64-native_vhost_cuse-linuxapp-gcc:

CONFIG_RTE_BUILD_COMBINE_LIBS=y
CONFIG_RTE_BUILD_SHARED_LIB=n
CONFIG_RTE_LIBRTE_VHOST=y
CONFIG_RTE_LIBRTE_VHOST_USER=n

This allows you to have both a vhostuser and vhostcuse config in the same
source tree without the need to replicate everything in those config files
just to change a couple of settings. The resultant .config file has all of
the settings from the included files with the updated settings at the end.
The resultant rte_config.h contains multiple undefs and defines for the
overridden settings.

Eg.
  > grep RTE_LIBRTE_VHOST_USER x86_64-native_vhost_cuse-linuxapp-gcc/include/rte_config.h
  #undef RTE_LIBRTE_VHOST_USER
  #define RTE_LIBRTE_VHOST_USER 1
  #undef RTE_LIBRTE_VHOST_USER

The current mechanism to detect the RTE_LIBRTE_VHOST_USER setting merely
greps the rte_config.h file for the string "define RTE_LIBRTE_VHOST_USER 1"
rather than the final setting of RTE_LIBRTE_VHOST_USER. The following patch
changes this test to detect the final setting of RTE_LIBRTE_VHOST_USER.

Signed-off-by: Gary Mussar <gmussar@ciena.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com
acinclude.m4