[v3,1/3] config/x86: add support for AMD platform

Message ID 20211026155645.246783-1-aman.kumar@vvdntech.in (mailing list archive)
State Superseded, archived
Headers
Series [v3,1/3] config/x86: add support for AMD platform |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Aman Kumar Oct. 26, 2021, 3:56 p.m. UTC
  -Dcpu_instruction_set=znverX meson option can be used
to build dpdk for AMD platform. Supported options are
znver1, znver2 and znver3.

Signed-off-by: Aman Kumar <aman.kumar@vvdntech.in>
---
 config/x86/meson.build | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Comments

Thomas Monjalon Oct. 26, 2021, 4:01 p.m. UTC | #1
26/10/2021 17:56, Aman Kumar:
> -Dcpu_instruction_set=znverX meson option can be used
> to build dpdk for AMD platform. Supported options are
> znver1, znver2 and znver3.

OK that approach looks good.

> +# AMD platform support
> +if get_option('cpu_instruction_set') == 'znver3'
> +    dpdk_conf.set('RTE_MAX_LCORE', 512)
> +elif get_option('cpu_instruction_set') == 'znver2'
> +    dpdk_conf.set('RTE_MAX_LCORE', 512)
> +elif get_option('cpu_instruction_set') == 'znver1'
> +    dpdk_conf.set('RTE_MAX_LCORE', 256)
> +endif

Maybe sort it in the reverse order, starting with 1?
  
Aman Kumar Oct. 27, 2021, 6:26 a.m. UTC | #2
On Tue, Oct 26, 2021 at 9:31 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 26/10/2021 17:56, Aman Kumar:
> > -Dcpu_instruction_set=znverX meson option can be used
> > to build dpdk for AMD platform. Supported options are
> > znver1, znver2 and znver3.
>
> OK that approach looks good.
>
> > +# AMD platform support
> > +if get_option('cpu_instruction_set') == 'znver3'
> > +    dpdk_conf.set('RTE_MAX_LCORE', 512)
> > +elif get_option('cpu_instruction_set') == 'znver2'
> > +    dpdk_conf.set('RTE_MAX_LCORE', 512)
> > +elif get_option('cpu_instruction_set') == 'znver1'
> > +    dpdk_conf.set('RTE_MAX_LCORE', 256)
> > +endif
>
> Maybe sort it in the reverse order, starting with 1?
>
> OK. Will update this.
  

Patch

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 29f3dea181..abb1bafb6e 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -72,3 +72,12 @@  endif
 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 dpdk_conf.set('RTE_MAX_LCORE', 128)
 dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
+
+# AMD platform support
+if get_option('cpu_instruction_set') == 'znver3'
+    dpdk_conf.set('RTE_MAX_LCORE', 512)
+elif get_option('cpu_instruction_set') == 'znver2'
+    dpdk_conf.set('RTE_MAX_LCORE', 512)
+elif get_option('cpu_instruction_set') == 'znver1'
+    dpdk_conf.set('RTE_MAX_LCORE', 256)
+endif