eal:ppc: fix incorrect ifdef for ppc_64
PATCH 1/1 eal:ppc: fix incorrect ifdef for ppc_64
An ifdef present in eal_memory.c references "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both the PPC_64 and non-PPC_64 versions of the code involved work, but the PPC_64 version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.
--- lib/librte_eal/linux/eal/eal_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/linux/eal/eal_memory.c +1 -1
@@ -688,7 +688,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)return -1 ; } -#ifdef RTE_ARCH_PPC64 +#ifdef RTE_ARCH_PPC_64 /* for PPC64 we go through the list backwards */ for (cur_page = seg_end -1 ; cur_page >= seg_start; cur_page--, ms_idx++) {
Signature · 1 line
2.18.1
Quoted 21 lines · David Christensen
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.Fixes 66cc45e ("mem: replace memseg with memseg lists")Cc Anatoly Burakov <[email protected]>Signed-off-by David Christensen <[email protected]>--- lib/librte_eal/linux/eal/eal_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_eal/linux/eal/eal_memory.c +0
-0
lib/librte_eal/linux/eal/eal_memory.c remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end) · line 694
Quoted 8 lines
lib/librte_eal/linux/eal/eal_memory.c +1
-1@@ -688,7 +688,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)return -1 ; } -#ifdef RTE_ARCH_PPC64 +#ifdef RTE_ARCH_PPC_64 /* for PPC64 we go through the list backwards */ for (cur_page = seg_end -1 ; cur_page >= seg_start; cur_page--, ms_idx++) {
David Marchand
AppliedQuoted 9 lines · Ferruh Yigit
Quoted 8 lines · David Christensen
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.Fixes 66cc45e ("mem: replace memseg with memseg lists")
Quoted 3 lines
Quoted 2 lines
Signed-off-by David Christensen <[email protected]>Reviewed-by Ferruh Yigit <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand
Quoted 7 lines · David Christensen
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.
The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?
Quoted 2 lines
Fixes 66cc45e ("mem: replace memseg with memseg lists")
Fixes sha1 should be on 12 digits.
Should we copy stable ?
Quoted 21 lines
Cc Anatoly Burakov <[email protected]>Signed-off-by David Christensen <[email protected]>--- lib/librte_eal/linux/eal/eal_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_eal/linux/eal/eal_memory.c +1
-2@@ -688,7 +688,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)return -1 ; } -#ifdef RTE_ARCH_PPC64 +#ifdef RTE_ARCH_PPC_64 /* for PPC64 we go through the list backwards */ for (cur_page = seg_end -1 ; cur_page >= seg_start; cur_page--, ms_idx++) { --
Quoted 2 lines
2.18.1
Thanks.
Signature · 1 line
David Marchand
Quoted 11 lines
Quoted 6 lines
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?
As far as I can tell there is no impact on any applications. The old code, which walked through the list in a forward direction, worked perfectly well with testpmd and DPDK pktgen applications on Power systems.
With the ifdef fixed, the core walks the list in the reverse direction as intended, the code still worked (i.e. no errors or problems were observed in the same test applications).
I'm not completely familiar with why memseg lists must be traversed in the reverse direction for Power systems. It might be something specific to Power 8 systems which I'm not actually supporting on DPDK, only the Power 9 systems that I use for for development and testing.
Dave
Quoted 12 lines · David Christensen
Quoted 11 lines
Quoted 6 lines
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?
Quoted 8 lines
As far as I can tell there is no impact on any applications. The old code, which walked through the list in a forward direction, worked perfectly well with testpmd and DPDK pktgen applications on Power systems.
With the ifdef fixed, the core walks the list in the reverse direction as intended, the code still worked (i.e. no errors or problems were observed in the same test applications).
I'm not completely familiar with why memseg lists must be traversed in the reverse direction for Power systems. It might be something specific to Power 8 systems which I'm not actually supporting on DPDK, only the Power 9 systems that I use for for development and testing.
Dave
If the code makes no difference anyway, should we just take it out so?
Signature · 2 lines
Thanks, Anatoly
Quoted 27 lines · Anatoly
Quoted 25 lines · David Christensen
Quoted 11 lines
Quoted 6 lines
An ifdef present in
eal_memory.creferences "RTE_ARCH_PPC64" when it should actually use "RTE_ARCH_PPC_64". Simple testing revealed that both thePPC_64and non-PPC_64 versions of the code involved work, but thePPC_64version of the code is retained to be consistent with other instances in the same file where mmapped memory is accessed in reverse order on Power platforms.The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?As far as I can tell there is no impact on any applications. The old code, which walked through the list in a forward direction, worked perfectly well with testpmd and DPDK pktgen applications on Power systems.
With the ifdef fixed, the core walks the list in the reverse direction as intended, the code still worked (i.e. no errors or problems were observed in the same test applications).
I'm not completely familiar with why memseg lists must be traversed in the reverse direction for Power systems. It might be something specific to Power 8 systems which I'm not actually supporting on DPDK, only the Power 9 systems that I use for for development and testing.
Quoted 4 lines
Quoted 2 lines
Dave
If the code makes no difference anyway, should we just take it out so?
+1 :-)
Signature · 1 line
David Marchand
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines
The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?As far as I can tell there is no impact on any applications. The old code, which walked through the list in a forward direction, worked perfectly well with testpmd and DPDK pktgen applications on Power systems.
With the ifdef fixed, the core walks the list in the reverse direction as intended, the code still worked (i.e. no errors or problems were observed in the same test applications).
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
I'm not completely familiar with why memseg lists must be traversed in the reverse direction for Power systems. It might be something specific to Power 8 systems which I'm not actually supporting on DPDK, only the Power 9 systems that I use for for development and testing.
If the code makes no difference anyway, should we just take it out so?
+1 :-)
I think there's a need for a larger review of Power8 vs. Power9 support.
You currently need to specify Power8 as the DPDK build target (e.g.
ppc_64-power8-linux-gcc) but all of our internal development and testing efforts are targeting Power9 systems. My preference would be to drop Power8 support all together but I'm reluctant to make such a potentially large change so close to an LTS release target, and not without soliciting some community comment on the idea. As a result, I'd prefer to keep the change "as is" for this release.
Dave
Quoted 23 lines · David Christensen
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
The change itself is not that scary, but just reading this commitlog I fail to see the impact for an application.
Can you share some light?As far as I can tell there is no impact on any applications. The old code, which walked through the list in a forward direction, worked perfectly well with testpmd and DPDK pktgen applications on Power systems.
With the ifdef fixed, the core walks the list in the reverse direction as intended, the code still worked (i.e. no errors or problems were observed in the same test applications).
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
I'm not completely familiar with why memseg lists must be traversed in the reverse direction for Power systems. It might be something specific to Power 8 systems which I'm not actually supporting on DPDK, only the Power 9 systems that I use for for development and testing.
If the code makes no difference anyway, should we just take it out so?
+1 :-)
Quoted 8 lines
I think there's a need for a larger review of Power8 vs. Power9 support.
You currently need to specify Power8 as the DPDK build target (e.g.
ppc_64-power8-linux-gcc) but all of our internal development and testing efforts are targeting Power9 systems. My preference would be to drop Power8 support all together but I'm reluctant to make such a potentially large change so close to an LTS release target, and not without soliciting some community comment on the idea. As a result, I'd prefer to keep the change "as is" for this release.
Ok, I will take it as is, but please do investigate this. The lesser special cases like these, the better.
Signature · 1 line
David Marchand