Skip to contentSkip to conversation

lib/power: add turbo functions to version.map

PATCH Superseded David Hunt 2 participants 9 messages Oct 2, 2017 – Oct 3, 2017

lore
Share & tools
lore

David Hunt

author
#0 lore raw

PATCH 1/1 lib/power: add turbo functions to version.map

allows vm_power_manager example to be built against shared libraries

---
 lib/librte_power/rte_power_version.map | 9 +++++++++
 1 file changed, 9 insertions(+)
lib/librte_power/rte_power_version.map +9 -0
index db75ff3..9a2bb36 100644
@@ -16,3 +16,12 @@ DPDK_2.0 {
 
 	local: *;
 };
+
+DPDK_17.11 {
+	global:
+
+	rte_power_acpi_turbo_status;
+	rte_power_freq_disable_turbo;
+	rte_power_freq_enable_turbo;
+};
+
Signature · 1 line
2.7.4
#1 lore raw

Hi,
I have some comments about the API scope and some formatting.

Suggested title:
power: add turbo functions to map file

02/10/2017 14:20, David Hunt:

Quoted 1 line

allows vm_power_manager example to be built against shared libraries

Fixes 94608a0f7f45 ("power: add per-core turbo boost API")
Quoted 1 line

[...]

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 23

Quoted 4 lines
lib/librte_power/rte_power_version.map +4 -0
+DPDK_17.11 {
+	global:
+
+	rte_power_acpi_turbo_status;

Is it really the function you want to expose?
rte_power_turbo_status seems more generic.

More comments about what is part of the API:
If you do not want to expose ACPI and VM implementations, it should not be part of the rte_* include files.

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 27

Quoted 4 lines
lib/librte_power/rte_power_version.map +4 -0
+	rte_power_freq_disable_turbo;
+	rte_power_freq_enable_turbo;
+};
+

This is a trailing new line.

#2 lore raw

Hi Thomas

Quoted 9 lines · Thomas Monjalon

Hi,
I have some comments about the API scope and some formatting.

Suggested title:
power: add turbo functions to map file

02/10/2017 14:20, David Hunt:

Quoted 1 line

allows vm_power_manager example to be built against shared libraries

Fixes 94608a0f7f45 ("power: add per-core turbo boost API")

Sure, I'll address this in next version.

Quoted 8 lines
Quoted 1 line

[...]

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 23

Quoted 4 lines
lib/librte_power/rte_power_version.map +4 -0
+DPDK_17.11 {
+	global:
+
+	rte_power_acpi_turbo_status;

Is it really the function you want to expose?
rte_power_turbo_status seems more generic.

Not really, it was in there for completeness, but users should be able to keep track of the turbo'd cores, so not really needed.

Quoted 11 lines

More comments about what is part of the API:
If you do not want to expose ACPI and VM implementations, it should not be part of the rte_* include files.

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 27

Quoted 4 lines
lib/librte_power/rte_power_version.map +4 -0
+	rte_power_freq_disable_turbo;
+	rte_power_freq_enable_turbo;
+};
+

This is a trailing new line.

I'll address the above comments in the next version.

Regards,
Dave.

#3 lore raw

02/10/2017 17:06, Hunt, David:

Quoted 8 lines · Thomas Monjalon
Quoted 6 lines

+DPDK_17.11 {

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 23

Quoted 3 lines
lib/librte_power/rte_power_version.map +3 -0
+	global:
+
+	rte_power_acpi_turbo_status;

Is it really the function you want to expose?
rte_power_turbo_status seems more generic.

Quoted 8 lines

Not really, it was in there for completeness, but users should be able to keep track of the turbo'd cores, so not really needed.

Quoted 3 lines

More comments about what is part of the API:
If you do not want to expose ACPI and VM implementations, it should not be part of the rte_* include files.

I'll address the above comments in the next version.

You did not address the comment about what is rte_*.h. If you do not want to expose everything, you should move it to another .h file.

Files starting with rte_ are included in doxygen API doc. Only rte_power.h is installed.
The installed include, the doxygen doc and the map file should all expose the same API consistently.

I think a cleanup is needed.

#4 lore raw

Hi Thomas,

Quoted 19 lines · Thomas Monjalon

02/10/2017 17:06, Hunt, David:

Quoted 7 lines · Thomas Monjalon
Quoted 6 lines

+DPDK_17.11 {

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 23

Quoted 3 lines
lib/librte_power/rte_power_version.map +3 -0
+	global:
+
+	rte_power_acpi_turbo_status;

Is it really the function you want to expose?
rte_power_turbo_status seems more generic.

Quoted 7 lines

Not really, it was in there for completeness, but users should be able to keep track of the turbo'd cores, so not really needed.

Quoted 3 lines

More comments about what is part of the API:
If you do not want to expose ACPI and VM implementations, it should not be part of the rte_* include files.

I'll address the above comments in the next version.

You did not address the comment about what is rte_*.h. If you do not want to expose everything, you should move it to another .h file.

Quoted 6 lines

Files starting with rte_ are included in doxygen API doc. Only rte_power.h is installed.
The installed include, the doxygen doc and the map file should all expose the same API consistently.

I think a cleanup is needed.

While I agree a cleanup is needed, this small patch is only intended to fix the priority issue of the shared library builds, which are broken at the moment.
The initial patch should have had rte_power_turbo_status, not rte_power_acpi_turbo_status.
Rather than moving code around at this stage, I propose having the three exposed functions in the map file (with the correct names).
Then, later on, I can do an ABI breakage notification for the next release to rename all the other rte*.h files, as some consumers of DPDK may be using those directly, at which stage we will be down to just exporting the functions in rte_power.h. Does that sound OK with you?
Regards,
Dave.

#5 lore raw

02/10/2017 18:25, Hunt, David:

Quoted 31 lines

Hi Thomas,

Quoted 20 lines · Thomas Monjalon

02/10/2017 17:06, Hunt, David:

Quoted 7 lines · Thomas Monjalon
Quoted 6 lines

+DPDK_17.11 {

lib/librte_power/rte_power_version.map DPDK_2.0 { · line 23

Quoted 3 lines
lib/librte_power/rte_power_version.map +3 -0
+	global:
+
+	rte_power_acpi_turbo_status;

Is it really the function you want to expose?
rte_power_turbo_status seems more generic.

Quoted 7 lines

Not really, it was in there for completeness, but users should be able to keep track of the turbo'd cores, so not really needed.

Quoted 3 lines

More comments about what is part of the API:
If you do not want to expose ACPI and VM implementations, it should not be part of the rte_* include files.

I'll address the above comments in the next version.

You did not address the comment about what is rte_*.h. If you do not want to expose everything, you should move it to another .h file.

Quoted 6 lines

Files starting with rte_ are included in doxygen API doc. Only rte_power.h is installed.
The installed include, the doxygen doc and the map file should all expose the same API consistently.

I think a cleanup is needed.

Quoted 7 lines

While I agree a cleanup is needed, this small patch is only intended to fix the priority issue of the shared library builds, which are broken at the moment.
The initial patch should have had rte_power_turbo_status, not rte_power_acpi_turbo_status.
Rather than moving code around at this stage, I propose having the three exposed functions in the map file (with the correct names).

OK, so we need a v3 (v2 has only 2 functions).

Quoted 5 lines

Then, later on, I can do an ABI breakage notification for the next release to rename all the other rte*.h files, as some consumers of DPDK may be using those directly, at which stage we will be down to just exporting the functions in rte_power.h.
Does that sound OK with you?

OK, thanks

author
#6 lore raw

PATCH v2 1/1 power: add turbo functions to map file

In reply to David Hunt
Fixes 94608a0f7f45 ("power: add per-core turbo boost API")
---
 lib/librte_power/rte_power_version.map | 7 +++++++
 1 file changed, 7 insertions(+)
lib/librte_power/rte_power_version.map +7 -0
index db75ff3..ec512ea 100644
@@ -16,3 +16,10 @@ DPDK_2.0 {
 
 	local: *;
 };
+
+DPDK_17.11 {
+	global:
+
+	rte_power_freq_disable_turbo;
+	rte_power_freq_enable_turbo;
+} DPDK_2.0;
\ No newline at end of file
Signature · 1 line
2.7.4
author
#7 lore raw

PATCH v3 1/1 power: add turbo functions to map file

Fixes 94608a0f7f45 ("power: add per-core turbo boost API")
---
 lib/librte_power/rte_power_version.map | 9 +++++++++
 1 file changed, 9 insertions(+)
lib/librte_power/rte_power_version.map +9 -0
index db75ff3..9ae0627 100644
@@ -16,3 +16,12 @@ DPDK_2.0 {
 
 	local: *;
 };
+
+DPDK_17.11 {
+	global:
+
+	rte_power_freq_disable_turbo;
+	rte_power_freq_enable_turbo;
+	rte_power_turbo_status;
+
+} DPDK_2.0;
\ No newline at end of file
Signature · 1 line
2.7.4
#8 lore raw

Re: [PATCH v3] power: add turbo functions to map file

03/10/2017 09:22, David Hunt:

Quoted 3 lines
Fixes 94608a0f7f45 ("power: add per-core turbo boost API")

Applied, thanks