patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/8] fbarray: fix detach in noshconf mode
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
@ 2018-08-23 16:59     ` Anatoly Burakov
  2018-08-23 16:59     ` [dpdk-stable] [PATCH 2/8] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2018-08-23 16:59 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.

Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 43caf3ced..ba6c4ae39 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -878,6 +878,10 @@ rte_fbarray_destroy(struct rte_fbarray *arr)
 	if (ret)
 		return ret;
 
+	/* with no shconf, there were never any files to begin with */
+	if (internal_config.no_shconf)
+		return 0;
+
 	/* try deleting the file */
 	eal_get_fbarray_path(path, sizeof(path), arr->name);
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH 2/8] eal: don't allow legacy mode with in-memory mode
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
  2018-08-23 16:59     ` [dpdk-stable] [PATCH 1/8] fbarray: fix detach in noshconf mode Anatoly Burakov
@ 2018-08-23 16:59     ` Anatoly Burakov
  2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
  2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2018-08-23 16:59 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In-memory mode was never meant to support legacy mode, because we
cannot sort anonymous pages anyway.

Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index dd5f97402..873099acc 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config *internal_cfg)
 			"--"OPT_HUGE_UNLINK"\n");
 		return -1;
 	}
+	if (internal_cfg->legacy_mem &&
+			internal_cfg->in_memory) {
+		RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
+				"with --"OPT_IN_MEMORY"\n");
+		return -1;
+	}
 
 	return 0;
 }
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v2 1/9] fbarray: fix detach in noshconf mode
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
  2018-08-23 16:59     ` [dpdk-stable] [PATCH 1/8] fbarray: fix detach in noshconf mode Anatoly Burakov
  2018-08-23 16:59     ` [dpdk-stable] [PATCH 2/8] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
@ 2018-09-04 15:01     ` Anatoly Burakov
  2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2018-09-04 15:01 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.

Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 43caf3ced..ba6c4ae39 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -878,6 +878,10 @@ rte_fbarray_destroy(struct rte_fbarray *arr)
 	if (ret)
 		return ret;
 
+	/* with no shconf, there were never any files to begin with */
+	if (internal_config.no_shconf)
+		return 0;
+
 	/* try deleting the file */
 	eal_get_fbarray_path(path, sizeof(path), arr->name);
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v2 2/9] eal: don't allow legacy mode with in-memory mode
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
                       ` (2 preceding siblings ...)
  2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
@ 2018-09-04 15:01     ` Anatoly Burakov
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2018-09-04 15:01 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In-memory mode was never meant to support legacy mode, because we
cannot sort anonymous pages anyway.

Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index dd5f97402..873099acc 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config *internal_cfg)
 			"--"OPT_HUGE_UNLINK"\n");
 		return -1;
 	}
+	if (internal_cfg->legacy_mem &&
+			internal_cfg->in_memory) {
+		RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
+				"with --"OPT_IN_MEMORY"\n");
+		return -1;
+	}
 
 	return 0;
 }
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v3 1/9] fbarray: fix detach in noshconf mode
       [not found] ` <cover.1536072550.git.anatoly.burakov@intel.com>
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
@ 2018-09-04 15:15   ` Anatoly Burakov
  2018-09-13 13:00     ` Maxime Coquelin
  2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
  2 siblings, 1 reply; 9+ messages in thread
From: Anatoly Burakov @ 2018-09-04 15:15 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.

Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 43caf3ced..ba6c4ae39 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -878,6 +878,10 @@ rte_fbarray_destroy(struct rte_fbarray *arr)
 	if (ret)
 		return ret;
 
+	/* with no shconf, there were never any files to begin with */
+	if (internal_config.no_shconf)
+		return 0;
+
 	/* try deleting the file */
 	eal_get_fbarray_path(path, sizeof(path), arr->name);
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode
       [not found] ` <cover.1536072550.git.anatoly.burakov@intel.com>
       [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
  2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
@ 2018-09-04 15:15   ` Anatoly Burakov
  2018-09-13 13:06     ` Maxime Coquelin
  2 siblings, 1 reply; 9+ messages in thread
From: Anatoly Burakov @ 2018-09-04 15:15 UTC (permalink / raw)
  To: dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, maxime.coquelin,
	kuralamudhan.ramakrishnan, stable

In-memory mode was never meant to support legacy mode, because we
cannot sort anonymous pages anyway.

Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index dd5f97402..873099acc 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config *internal_cfg)
 			"--"OPT_HUGE_UNLINK"\n");
 		return -1;
 	}
+	if (internal_cfg->legacy_mem &&
+			internal_cfg->in_memory) {
+		RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
+				"with --"OPT_IN_MEMORY"\n");
+		return -1;
+	}
 
 	return 0;
 }
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [PATCH v3 1/9] fbarray: fix detach in noshconf mode
  2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
@ 2018-09-13 13:00     ` Maxime Coquelin
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2018-09-13 13:00 UTC (permalink / raw)
  To: Anatoly Burakov, dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, kuralamudhan.ramakrishnan, stable



On 09/04/2018 05:15 PM, Anatoly Burakov wrote:
> In noshconf mode, no shared files are created, but we're still trying
> to unlink them, resulting in detach/destroy failure even though it
> should have succeeded. Fix it by exiting early in noshconf mode.
> 
> Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>   lib/librte_eal/common/eal_common_fbarray.c | 4 ++++
>   1 file changed, 4 insertions(+)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode
  2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
@ 2018-09-13 13:06     ` Maxime Coquelin
  2018-09-17  9:49       ` Burakov, Anatoly
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Coquelin @ 2018-09-13 13:06 UTC (permalink / raw)
  To: Anatoly Burakov, dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, kuralamudhan.ramakrishnan, stable



On 09/04/2018 05:15 PM, Anatoly Burakov wrote:
> In-memory mode was never meant to support legacy mode, because we
> cannot sort anonymous pages anyway.
> 
> Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>   lib/librte_eal/common/eal_common_options.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
> index dd5f97402..873099acc 100644
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config *internal_cfg)
>   			"--"OPT_HUGE_UNLINK"\n");
>   		return -1;
>   	}
> +	if (internal_cfg->legacy_mem &&
> +			internal_cfg->in_memory) {
> +		RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
> +				"with --"OPT_IN_MEMORY"\n");

This is a general comment, as it is consistent with the style of the
file. I generally prefer not splitting error strings into multiple lines
even if it is longer than 80 chars, because it makes grepping for the 
error string more difficult.

> +		return -1;
> +	}
>   
>   	return 0;
>   }
> 

Other than that:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode
  2018-09-13 13:06     ` Maxime Coquelin
@ 2018-09-17  9:49       ` Burakov, Anatoly
  0 siblings, 0 replies; 9+ messages in thread
From: Burakov, Anatoly @ 2018-09-17  9:49 UTC (permalink / raw)
  To: Maxime Coquelin, dev
  Cc: tiwei.bie, ray.kinsella, zhihong.wang, kuralamudhan.ramakrishnan, stable

On 13-Sep-18 2:06 PM, Maxime Coquelin wrote:
> 
> 
> On 09/04/2018 05:15 PM, Anatoly Burakov wrote:
>> In-memory mode was never meant to support legacy mode, because we
>> cannot sort anonymous pages anyway.
>>
>> Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>>   lib/librte_eal/common/eal_common_options.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/lib/librte_eal/common/eal_common_options.c 
>> b/lib/librte_eal/common/eal_common_options.c
>> index dd5f97402..873099acc 100644
>> --- a/lib/librte_eal/common/eal_common_options.c
>> +++ b/lib/librte_eal/common/eal_common_options.c
>> @@ -1390,6 +1390,12 @@ eal_check_common_options(struct internal_config 
>> *internal_cfg)
>>               "--"OPT_HUGE_UNLINK"\n");
>>           return -1;
>>       }
>> +    if (internal_cfg->legacy_mem &&
>> +            internal_cfg->in_memory) {
>> +        RTE_LOG(ERR, EAL, "Option --"OPT_LEGACY_MEM" is not compatible "
>> +                "with --"OPT_IN_MEMORY"\n");
> 
> This is a general comment, as it is consistent with the style of the
> file. I generally prefer not splitting error strings into multiple lines
> even if it is longer than 80 chars, because it makes grepping for the 
> error string more difficult.

I agree in general, however in this particular case the string is 
ungreppable (it is a word now!) anyway because it's split into a few pieces.

> 
>> +        return -1;
>> +    }
>>       return 0;
>>   }
>>
> 
> Other than that:
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Thanks,
> Maxime
> 


-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-17  9:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1536073996.git.anatoly.burakov@intel.com>
     [not found] ` <cover.1536072550.git.anatoly.burakov@intel.com>
     [not found]   ` <cover.1535041359.git.anatoly.burakov@intel.com>
2018-08-23 16:59     ` [dpdk-stable] [PATCH 1/8] fbarray: fix detach in noshconf mode Anatoly Burakov
2018-08-23 16:59     ` [dpdk-stable] [PATCH 2/8] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
2018-09-04 15:01     ` [dpdk-stable] [PATCH v2 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 1/9] fbarray: fix detach in noshconf mode Anatoly Burakov
2018-09-13 13:00     ` Maxime Coquelin
2018-09-04 15:15   ` [dpdk-stable] [PATCH v3 2/9] eal: don't allow legacy mode with in-memory mode Anatoly Burakov
2018-09-13 13:06     ` Maxime Coquelin
2018-09-17  9:49       ` Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).