config/x86: config support for AMD EPYC processors

Message ID 20231220071046.2263-1-sivaprasad.tummala@amd.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series config/x86: config support for AMD EPYC processors |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Sivaprasad Tummala Dec. 20, 2023, 7:10 a.m. UTC
  On x86 platforms, max lcores are limited to 128 by default.

On AMD EPYC processors, this limit was adjusted for native
builds in the previous patch.
https://patches.dpdk.org/project/dpdk/patch/
20230925151027.558546-1-sivaprasad.tummala@amd.com/

As agreed earlier in mailing list, this patch adjusts the limit
for specific AMD EPYC target/cross builds.

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
---
 config/x86/meson.build | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
  

Comments

Morten Brørup Dec. 20, 2023, 7:27 a.m. UTC | #1
> From: Sivaprasad Tummala [mailto:sivaprasad.tummala@amd.com]
> Sent: Wednesday, 20 December 2023 08.11
> 
> On x86 platforms, max lcores are limited to 128 by default.
> 
> On AMD EPYC processors, this limit was adjusted for native
> builds in the previous patch.
> https://patches.dpdk.org/project/dpdk/patch/
> 20230925151027.558546-1-sivaprasad.tummala@amd.com/
> 
> As agreed earlier in mailing list, this patch adjusts the limit
> for specific AMD EPYC target/cross builds.
> 
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> ---

[...]

> +    foreach m:epyc_zen_cores.keys()
> +        if m.contains(cpu_instruction_set)
> +            dpdk_conf.set('RTE_MAX_LCORE', epyc_zen_cores[m])
> +	    break

The indentation of "break" uses a mix of tab and spaces, and should be fixed.

Acked-by: Morten Brørup <mb@smartsharesystems.com>
  
Sivaprasad Tummala Dec. 20, 2023, 9:22 a.m. UTC | #2
[AMD Official Use Only - General]

Hi Morten,

> -----Original Message-----
> From: Morten Brørup <mb@smartsharesystems.com>
> Sent: Wednesday, December 20, 2023 12:58 PM
> To: Tummala, Sivaprasad <Sivaprasad.Tummala@amd.com>;
> david.marchand@redhat.com; ktraynor@redhat.com; thomas@monjalon.net;
> konstantin.ananyev@huawei.com; konstantin.v.ananyev@yandex.ru;
> bruce.richardson@intel.com; maxime.coquelin@redhat.com;
> aconole@redhat.com; Yigit, Ferruh <Ferruh.Yigit@amd.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] config/x86: config support for AMD EPYC processors
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> > From: Sivaprasad Tummala [mailto:sivaprasad.tummala@amd.com]
> > Sent: Wednesday, 20 December 2023 08.11
> >
> > On x86 platforms, max lcores are limited to 128 by default.
> >
> > On AMD EPYC processors, this limit was adjusted for native builds in
> > the previous patch.
> > https://patches.dpdk.org/project/dpdk/patch/
> > 20230925151027.558546-1-sivaprasad.tummala@amd.com/
> >
> > As agreed earlier in mailing list, this patch adjusts the limit for
> > specific AMD EPYC target/cross builds.
> >
> > Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> > ---
>
> [...]
>
> > +    foreach m:epyc_zen_cores.keys()
> > +        if m.contains(cpu_instruction_set)
> > +            dpdk_conf.set('RTE_MAX_LCORE', epyc_zen_cores[m])
> > +         break
>
> The indentation of "break" uses a mix of tab and spaces, and should be fixed.
Thanks for spotting this. Will fix this in v2.
>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
  

Patch

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 5355731cef..f2df4c2003 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -91,13 +91,21 @@  epyc_zen_cores = {
     '__znver1__':128
     }
 
-if get_option('platform') == 'native'
+cpu_instruction_set = get_option('cpu_instruction_set')
+if cpu_instruction_set == 'native'
     foreach m:epyc_zen_cores.keys()
         if cc.get_define(m, args: machine_args) != ''
             dpdk_conf.set('RTE_MAX_LCORE', epyc_zen_cores[m])
             break
         endif
     endforeach
+else
+    foreach m:epyc_zen_cores.keys()
+        if m.contains(cpu_instruction_set)
+            dpdk_conf.set('RTE_MAX_LCORE', epyc_zen_cores[m])
+	    break
+        endif
+    endforeach
 endif
 
 dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)