From: Jan Viktorin <vikto...@rehivetech.com> Support --enable-soc. SoC support is disabled by default.
Signed-off-by: Jan Viktorin <viktorin at rehivetech.com> [Shreyansh: Change --no-soc to --enable-soc; disabled by default] Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com> --- doc/guides/testpmd_app_ug/run_app.rst | 4 ++++ lib/librte_eal/common/eal_common_options.c | 5 +++++ lib/librte_eal/common/eal_internal_cfg.h | 1 + lib/librte_eal/common/eal_options.h | 2 ++ 4 files changed, 12 insertions(+) diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index d7c5120..4dafe5f 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -156,6 +156,10 @@ See the DPDK Getting Started Guides for more information on these options. Use malloc instead of hugetlbfs. +* ``--enable-soc`` + + Enable SoC framework support + Testpmd Command-line Options ---------------------------- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 6ca8af1..2156ab3 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -75,6 +75,7 @@ const struct option eal_long_options[] = { {OPT_BASE_VIRTADDR, 1, NULL, OPT_BASE_VIRTADDR_NUM }, {OPT_CREATE_UIO_DEV, 0, NULL, OPT_CREATE_UIO_DEV_NUM }, + {OPT_ENABLE_SOC, 0, NULL, OPT_ENABLE_SOC_NUM }, {OPT_FILE_PREFIX, 1, NULL, OPT_FILE_PREFIX_NUM }, {OPT_HELP, 0, NULL, OPT_HELP_NUM }, {OPT_HUGE_DIR, 1, NULL, OPT_HUGE_DIR_NUM }, @@ -843,6 +844,10 @@ eal_parse_common_option(int opt, const char *optarg, break; /* long options */ + case OPT_ENABLE_SOC_NUM: + conf->enable_soc = 1; + break; + case OPT_HUGE_UNLINK_NUM: conf->hugepage_unlink = 1; break; diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h index 5f1367e..2a6e3ea 100644 --- a/lib/librte_eal/common/eal_internal_cfg.h +++ b/lib/librte_eal/common/eal_internal_cfg.h @@ -67,6 +67,7 @@ struct internal_config { unsigned hugepage_unlink; /**< true to unlink backing files */ volatile unsigned xen_dom0_support; /**< support app running on Xen Dom0*/ volatile unsigned no_pci; /**< true to disable PCI */ + volatile unsigned enable_soc; /**< true to enable SoC */ volatile unsigned no_hpet; /**< true to disable HPET */ volatile unsigned vmware_tsc_map; /**< true to use VMware TSC mapping * instead of native TSC */ diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index a881c62..6e679c3 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -49,6 +49,8 @@ enum { OPT_BASE_VIRTADDR_NUM, #define OPT_CREATE_UIO_DEV "create-uio-dev" OPT_CREATE_UIO_DEV_NUM, +#define OPT_ENABLE_SOC "enable-soc" + OPT_ENABLE_SOC_NUM, #define OPT_FILE_PREFIX "file-prefix" OPT_FILE_PREFIX_NUM, #define OPT_HUGE_DIR "huge-dir" -- 2.7.4