DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported
@ 2017-03-31 18:31 Aaron Conole
  2017-04-03  8:55 ` Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Aaron Conole @ 2017-03-31 18:31 UTC (permalink / raw)
  To: dev

It's likely that this function isn't used anywhere, but since it was part of
the public API, mark the function for deprecation for at least one release.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/bsdapp/eal/rte_eal_version.map        | 7 +++++++
 lib/librte_eal/common/arch/x86/rte_cpuflags.c        | 1 +
 lib/librte_eal/common/arch/x86/rte_spinlock.c        | 1 +
 lib/librte_eal/common/include/generic/rte_cpuflags.h | 3 ++-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map      | 7 +++++++
 5 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index 67f2ffb..82f0f9f 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -182,3 +182,10 @@ DPDK_17.02 {
 	rte_bus_unregister;
 
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global;
+
+	rte_cpu_is_supported;
+
+} DPDK_17.02;
diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 0138257..04f0852 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -31,6 +31,7 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "rte_common.h"
 #include "rte_cpuflags.h"
 
 #include <stdio.h>
diff --git a/lib/librte_eal/common/arch/x86/rte_spinlock.c b/lib/librte_eal/common/arch/x86/rte_spinlock.c
index c383e9f..f1b1a4e 100644
--- a/lib/librte_eal/common/arch/x86/rte_spinlock.c
+++ b/lib/librte_eal/common/arch/x86/rte_spinlock.c
@@ -33,6 +33,7 @@
 
 #include <stdint.h>
 
+#include "rte_common.h"
 #include "rte_cpuflags.h"
 
 uint8_t rte_rtm_supported; /* cache the flag to avoid the overhead
diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h
index f01624d..df66939 100644
--- a/lib/librte_eal/common/include/generic/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h
@@ -78,9 +78,10 @@ rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
  * This function checks that the currently used CPU supports the CPU features
  * that were specified at compile time. It is called automatically within the
  * EAL, so does not need to be used by applications.
+ * This version is replaced by rte_cpu_is_supported
  */
 void
-rte_cpu_check_supported(void);
+rte_cpu_check_supported(void) __rte_deprecated;
 
 /**
  * This function checks that the currently used CPU supports the CPU features
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 9c134b4..461f15d 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -186,3 +186,10 @@ DPDK_17.02 {
 	rte_bus_unregister;
 
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global;
+
+	rte_cpu_is_supported;
+
+} DPDK_17.02;
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported
  2017-03-31 18:31 [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported Aaron Conole
@ 2017-04-03  8:55 ` Bruce Richardson
  2017-04-04 13:26 ` Thomas Monjalon
  2017-04-04 15:38 ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Aaron Conole
  2 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2017-04-03  8:55 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev

On Fri, Mar 31, 2017 at 02:31:22PM -0400, Aaron Conole wrote:
> It's likely that this function isn't used anywhere, but since it was part of
> the public API, mark the function for deprecation for at least one release.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported
  2017-03-31 18:31 [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported Aaron Conole
  2017-04-03  8:55 ` Bruce Richardson
@ 2017-04-04 13:26 ` Thomas Monjalon
  2017-04-04 13:39   ` Aaron Conole
  2017-04-04 15:38 ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Aaron Conole
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2017-04-04 13:26 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev

2017-03-31 14:31, Aaron Conole:
> It's likely that this function isn't used anywhere, but since it was part of
> the public API, mark the function for deprecation for at least one release.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>
[...]
> --- a/lib/librte_eal/common/arch/x86/rte_spinlock.c
> +++ b/lib/librte_eal/common/arch/x86/rte_spinlock.c
> @@ -33,6 +33,7 @@
>  
>  #include <stdint.h>
>  
> +#include "rte_common.h"
>  #include "rte_cpuflags.h"

This include should be added in rte_cpuflags.h.
There are other C files which could need rte_common.h,
example: test/test/test_cpuflags.c

[...]
> --- a/lib/librte_eal/common/include/generic/rte_cpuflags.h
> +++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h
> @@ -78,9 +78,10 @@ rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
>   * This function checks that the currently used CPU supports the CPU features
>   * that were specified at compile time. It is called automatically within the
>   * EAL, so does not need to be used by applications.
> + * This version is replaced by rte_cpu_is_supported
>   */
>  void
> -rte_cpu_check_supported(void);
> +rte_cpu_check_supported(void) __rte_deprecated;

The deprecated flag must be moved before the function declaration.
Otherwise clangs throws an error.

[...]
> +DPDK_17.05 {
> +	global;
> +
> +	rte_cpu_is_supported;
> +
> +} DPDK_17.02;

Should not it be a separate patch?

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

* Re: [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported
  2017-04-04 13:26 ` Thomas Monjalon
@ 2017-04-04 13:39   ` Aaron Conole
  2017-04-04 14:01     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron Conole @ 2017-04-04 13:39 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Hi Thomas,

Thomas Monjalon <thomas.monjalon@6wind.com> writes:

> 2017-03-31 14:31, Aaron Conole:
>> It's likely that this function isn't used anywhere, but since it was part of
>> the public API, mark the function for deprecation for at least one release.
>> 
>> Signed-off-by: Aaron Conole <aconole@redhat.com>

Thanks so much for the review!  I'll make sure to fix these with v2.

> [...]
>> +DPDK_17.05 {
>> +	global;
>> +
>> +	rte_cpu_is_supported;
>> +
>> +} DPDK_17.02;
>
> Should not it be a separate patch?

I thought it made sense to keep it rolled in with this patch, but if you
prefer it separate, I will do that.  Expect it as 1/2 in v2, unless you
say otherwise.

-Aaron

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

* Re: [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported
  2017-04-04 13:39   ` Aaron Conole
@ 2017-04-04 14:01     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2017-04-04 14:01 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev

2017-04-04 09:39, Aaron Conole:
> Hi Thomas,
> 
> Thomas Monjalon <thomas.monjalon@6wind.com> writes:
> 
> > 2017-03-31 14:31, Aaron Conole:
> >> It's likely that this function isn't used anywhere, but since it was part of
> >> the public API, mark the function for deprecation for at least one release.
> >> 
> >> Signed-off-by: Aaron Conole <aconole@redhat.com>
> 
> Thanks so much for the review!  I'll make sure to fix these with v2.
> 
> > [...]
> >> +DPDK_17.05 {
> >> +	global;
> >> +
> >> +	rte_cpu_is_supported;
> >> +
> >> +} DPDK_17.02;
> >
> > Should not it be a separate patch?
> 
> I thought it made sense to keep it rolled in with this patch, but if you
> prefer it separate, I will do that.  Expect it as 1/2 in v2, unless you
> say otherwise.

Yes 2 patches in v2. Thanks

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

* [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map
  2017-03-31 18:31 [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported Aaron Conole
  2017-04-03  8:55 ` Bruce Richardson
  2017-04-04 13:26 ` Thomas Monjalon
@ 2017-04-04 15:38 ` Aaron Conole
  2017-04-04 15:38   ` [dpdk-dev] [PATCH 2/2] eal: deprecate rte_cpu_check_supported Aaron Conole
  2017-04-06 20:58   ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Thomas Monjalon
  2 siblings, 2 replies; 8+ messages in thread
From: Aaron Conole @ 2017-04-04 15:38 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

This function is now part of the public ABI, so should be
advertised as such.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   | 7 +++++++
 lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index 67f2ffb..82f0f9f 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -182,3 +182,10 @@ DPDK_17.02 {
 	rte_bus_unregister;
 
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global;
+
+	rte_cpu_is_supported;
+
+} DPDK_17.02;
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 9c134b4..461f15d 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -186,3 +186,10 @@ DPDK_17.02 {
 	rte_bus_unregister;
 
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global;
+
+	rte_cpu_is_supported;
+
+} DPDK_17.02;
-- 
2.9.3

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

* [dpdk-dev] [PATCH 2/2] eal: deprecate rte_cpu_check_supported
  2017-04-04 15:38 ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Aaron Conole
@ 2017-04-04 15:38   ` Aaron Conole
  2017-04-06 20:58   ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Thomas Monjalon
  1 sibling, 0 replies; 8+ messages in thread
From: Aaron Conole @ 2017-04-04 15:38 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

It's likely that this function isn't used anywhere, but since it was part
of the public API, mark the function for deprecation for at least one
release.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/common/include/generic/rte_cpuflags.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h
index f01624d..c1c5551 100644
--- a/lib/librte_eal/common/include/generic/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h
@@ -39,6 +39,7 @@
  * Architecture specific API to determine available CPU features at runtime.
  */
 
+#include "rte_common.h"
 #include <errno.h>
 
 /**
@@ -79,6 +80,7 @@ rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
  * that were specified at compile time. It is called automatically within the
  * EAL, so does not need to be used by applications.
  */
+__rte_deprecated
 void
 rte_cpu_check_supported(void);
 
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map
  2017-04-04 15:38 ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Aaron Conole
  2017-04-04 15:38   ` [dpdk-dev] [PATCH 2/2] eal: deprecate rte_cpu_check_supported Aaron Conole
@ 2017-04-06 20:58   ` Thomas Monjalon
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2017-04-06 20:58 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev

2017-04-04 11:38, Aaron Conole:
> This function is now part of the public ABI, so should be
> advertised as such.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>

Fixes: 37e97ad2c56a ("eal: do not panic when CPU is not supported")

Series applied, thanks

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

end of thread, other threads:[~2017-04-06 20:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 18:31 [dpdk-dev] [PATCH] eal: deprecate rte_cpu_check_supported Aaron Conole
2017-04-03  8:55 ` Bruce Richardson
2017-04-04 13:26 ` Thomas Monjalon
2017-04-04 13:39   ` Aaron Conole
2017-04-04 14:01     ` Thomas Monjalon
2017-04-04 15:38 ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Aaron Conole
2017-04-04 15:38   ` [dpdk-dev] [PATCH 2/2] eal: deprecate rte_cpu_check_supported Aaron Conole
2017-04-06 20:58   ` [dpdk-dev] [PATCH 1/2] eal: add rte_cpu_is_supported to map Thomas Monjalon

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).