[dpdk-dev,v3,04/15] eal: introduce --no-soc option

Message ID 1473410639-10367-5-git-send-email-shreyansh.jain@nxp.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Shreyansh Jain Sept. 9, 2016, 8:43 a.m. UTC
  This option has the same meaning for the SoC infra as the --no-pci
for the PCI infra.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 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 ++
 3 files changed, 8 insertions(+)
  

Comments

Jan Viktorin Sept. 16, 2016, 11:36 a.m. UTC | #1
Hello Shreyansh,

there was an objection to reverse this option from negative
to positive semantics:

http://dpdk.org/ml/archives/dev/2016-May/038953.html

As SoC infrastructure would to be experimental for some time,
I think it is a good idea to disable it as default.

Regards
Jan

On Fri, 9 Sep 2016 14:13:48 +0530
Shreyansh Jain <shreyansh.jain@nxp.com> wrote:

> This option has the same meaning for the SoC infra as the --no-pci
> for the PCI infra.
> 
> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  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 ++
>  3 files changed, 8 insertions(+)
> 
> diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
> index 1a1bab3..d97cf0a 100644
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -85,6 +85,7 @@ eal_long_options[] = {
>  	{OPT_NO_HPET,           0, NULL, OPT_NO_HPET_NUM          },
>  	{OPT_NO_HUGE,           0, NULL, OPT_NO_HUGE_NUM          },
>  	{OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },
> +	{OPT_NO_SOC,            0, NULL, OPT_NO_SOC_NUM           },
>  	{OPT_NO_SHCONF,         0, NULL, OPT_NO_SHCONF_NUM        },
>  	{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },
>  	{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },
> @@ -855,6 +856,10 @@ eal_parse_common_option(int opt, const char *optarg,
>  		conf->no_pci = 1;
>  		break;
>  
> +	case OPT_NO_SOC_NUM:
> +		conf->no_soc = 1;
> +		break;
> +
>  	case OPT_NO_HPET_NUM:
>  		conf->no_hpet = 1;
>  		break;
> diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
> index 5f1367e..3a98e94 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 no_soc;         /**< true to disable 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..ba1e704 100644
> --- a/lib/librte_eal/common/eal_options.h
> +++ b/lib/librte_eal/common/eal_options.h
> @@ -69,6 +69,8 @@ enum {
>  	OPT_NO_HUGE_NUM,
>  #define OPT_NO_PCI            "no-pci"
>  	OPT_NO_PCI_NUM,
> +#define OPT_NO_SOC            "no-soc"
> +	OPT_NO_SOC_NUM,
>  #define OPT_NO_SHCONF         "no-shconf"
>  	OPT_NO_SHCONF_NUM,
>  #define OPT_SOCKET_MEM        "socket-mem"
  
Shreyansh Jain Sept. 16, 2016, 11:55 a.m. UTC | #2
Hello Jan,

On Friday 16 September 2016 05:06 PM, Jan Viktorin wrote:
> Hello Shreyansh,
>
> there was an objection to reverse this option from negative
> to positive semantics:
>
> http://dpdk.org/ml/archives/dev/2016-May/038953.html

Ok. I wasn't aware of this. Sounds reasonable as SoC is experimental for 
some time.

>
> As SoC infrastructure would to be experimental for some time,
> I think it is a good idea to disable it as default.

Agree - I will update this in v4. Thanks for bringing it to notice.

>
> Regards
> Jan
>
> On Fri, 9 Sep 2016 14:13:48 +0530
> Shreyansh Jain <shreyansh.jain@nxp.com> wrote:
>
>> This option has the same meaning for the SoC infra as the --no-pci
>> for the PCI infra.
>>
>> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>>  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 ++
>>  3 files changed, 8 insertions(+)
>>
>> diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
>> index 1a1bab3..d97cf0a 100644
>> --- a/lib/librte_eal/common/eal_common_options.c
>> +++ b/lib/librte_eal/common/eal_common_options.c
>> @@ -85,6 +85,7 @@ eal_long_options[] = {
>>  	{OPT_NO_HPET,           0, NULL, OPT_NO_HPET_NUM          },
>>  	{OPT_NO_HUGE,           0, NULL, OPT_NO_HUGE_NUM          },
>>  	{OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },
>> +	{OPT_NO_SOC,            0, NULL, OPT_NO_SOC_NUM           },
>>  	{OPT_NO_SHCONF,         0, NULL, OPT_NO_SHCONF_NUM        },
>>  	{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },
>>  	{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },
>> @@ -855,6 +856,10 @@ eal_parse_common_option(int opt, const char *optarg,
>>  		conf->no_pci = 1;
>>  		break;
>>
>> +	case OPT_NO_SOC_NUM:
>> +		conf->no_soc = 1;
>> +		break;
>> +
>>  	case OPT_NO_HPET_NUM:
>>  		conf->no_hpet = 1;
>>  		break;
>> diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
>> index 5f1367e..3a98e94 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 no_soc;         /**< true to disable 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..ba1e704 100644
>> --- a/lib/librte_eal/common/eal_options.h
>> +++ b/lib/librte_eal/common/eal_options.h
>> @@ -69,6 +69,8 @@ enum {
>>  	OPT_NO_HUGE_NUM,
>>  #define OPT_NO_PCI            "no-pci"
>>  	OPT_NO_PCI_NUM,
>> +#define OPT_NO_SOC            "no-soc"
>> +	OPT_NO_SOC_NUM,
>>  #define OPT_NO_SHCONF         "no-shconf"
>>  	OPT_NO_SHCONF_NUM,
>>  #define OPT_SOCKET_MEM        "socket-mem"
>
>
>

-
Shreyansh
  

Patch

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 1a1bab3..d97cf0a 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -85,6 +85,7 @@  eal_long_options[] = {
 	{OPT_NO_HPET,           0, NULL, OPT_NO_HPET_NUM          },
 	{OPT_NO_HUGE,           0, NULL, OPT_NO_HUGE_NUM          },
 	{OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },
+	{OPT_NO_SOC,            0, NULL, OPT_NO_SOC_NUM           },
 	{OPT_NO_SHCONF,         0, NULL, OPT_NO_SHCONF_NUM        },
 	{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },
 	{OPT_PCI_WHITELIST,     1, NULL, OPT_PCI_WHITELIST_NUM    },
@@ -855,6 +856,10 @@  eal_parse_common_option(int opt, const char *optarg,
 		conf->no_pci = 1;
 		break;
 
+	case OPT_NO_SOC_NUM:
+		conf->no_soc = 1;
+		break;
+
 	case OPT_NO_HPET_NUM:
 		conf->no_hpet = 1;
 		break;
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index 5f1367e..3a98e94 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 no_soc;         /**< true to disable 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..ba1e704 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -69,6 +69,8 @@  enum {
 	OPT_NO_HUGE_NUM,
 #define OPT_NO_PCI            "no-pci"
 	OPT_NO_PCI_NUM,
+#define OPT_NO_SOC            "no-soc"
+	OPT_NO_SOC_NUM,
 #define OPT_NO_SHCONF         "no-shconf"
 	OPT_NO_SHCONF_NUM,
 #define OPT_SOCKET_MEM        "socket-mem"