power/amd_uncore: add e-smi installation instructions
Checks
Commit Message
Added section for installing and building the E-SMI library
for AMD EPYC Uncore support and version requirements.
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
---
doc/guides/prog_guide/power_man.rst | 32 +++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Comments
29/11/2024 05:32, Sivaprasad Tummala:
> Added section for installing and building the E-SMI library
> for AMD EPYC Uncore support and version requirements.
>
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> ---
> doc/guides/prog_guide/power_man.rst | 32 +++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
> index 74039e5786..d367a81596 100644
> --- a/doc/guides/prog_guide/power_man.rst
> +++ b/doc/guides/prog_guide/power_man.rst
> @@ -249,6 +249,38 @@ Additionally, the EPYC System Management Interface In-band Library for Linux
> offers essential API, enabling user-space software
> to effectively manage system functions.
>
> +E-SMI Installation
> +------------------
> +
> +To build DPDK with AMD EPYC Uncore the user is required to download the e-smi
> +library from `here <https://github.com/amd/esmi_ib_library>`_
> +and compile it on their user system before building DPDK.
> +
> +.. code-block:: console
> +
> + cd esmi_ib_library
> + cmake .
> + sudo make install
> + cp /opt/e-sms/e_smi/lib/* /usr/local/lib/*
> + cp /opt/e-sms/e_smi/include/* /usr/local/include/*
Why copying the files?
You can specify the directories in an environment variable.
There is no pkg-config file?
> +
> +Library file, header and tool are installed at /opt/e-sms.
> +
> +Note: Library is dependent on amd_hsmp.h header and without this, compilation will break.
Yes, it does not compile on my machine (with Linux 6.12):
e_smi.c:566:27: error: ‘HSMP_GET_RAPL_UNITS’ undeclared
What should I do?
> +
> +The library requires CMake (v3.5.0) to be built.
> +
> +As a reference, the following table shows a mapping between the DPDK versions
> +and the E-SMI library and kernel version supported by them:
> +
> +.. table:: DPDK and E-SMI library and kernel version compatibility
> +
> + ============== ============== =====================
> + DPDK version E-SMI version Linux Kernel version
> + ============== ============== =====================
> + 24.11+ 4.0.0 6.7+
> + ============== ============== =====================
On Fri, 29 Nov 2024 04:32:07 +0000
Sivaprasad Tummala <sivaprasad.tummala@amd.com> wrote:
> Added section for installing and building the E-SMI library
> for AMD EPYC Uncore support and version requirements.
>
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> ---
> doc/guides/prog_guide/power_man.rst | 32 +++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
> index 74039e5786..d367a81596 100644
> --- a/doc/guides/prog_guide/power_man.rst
> +++ b/doc/guides/prog_guide/power_man.rst
> @@ -249,6 +249,38 @@ Additionally, the EPYC System Management Interface In-band Library for Linux
> offers essential API, enabling user-space software
> to effectively manage system functions.
>
> +E-SMI Installation
> +------------------
> +
> +To build DPDK with AMD EPYC Uncore the user is required to download the e-smi
> +library from `here <https://github.com/amd/esmi_ib_library>`_
> +and compile it on their user system before building DPDK.
> +
> +.. code-block:: console
> +
> + cd esmi_ib_library
> + cmake .
> + sudo make install
> + cp /opt/e-sms/e_smi/lib/* /usr/local/lib/*
> + cp /opt/e-sms/e_smi/include/* /usr/local/include/*
> +
> +Library file, header and tool are installed at /opt/e-sms.
The DPDK should always recommend users use the packages provided by
their distro. This project should work with distros to package this like any
other library.
Build instructions belong in the project, not in DPDK. The project will
change its build instructions and DPDK will get out of date.
> +
> +Note: Library is dependent on amd_hsmp.h header and without this, compilation will break.
> +
> +The library requires CMake (v3.5.0) to be built.
> +
> +As a reference, the following table shows a mapping between the DPDK versions
> +and the E-SMI library and kernel version supported by them:
> +
> +.. table:: DPDK and E-SMI library and kernel version compatibility
> +
> + ============== ============== =====================
> + DPDK version E-SMI version Linux Kernel version
> + ============== ============== =====================
> + 24.11+ 4.0.0 6.7+
> + ============== ============== =====================
The library needs to have stable API's and work in any kernel that supports
the system calls it uses. But that is for it to learn.
DPDK should just say (in the programmer's guide) to use E-SMI 4.0 or later.
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, November 29, 2024 4:04 PM
> To: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Tummala, Sivaprasad
> <Sivaprasad.Tummala@amd.com>
> Cc: david.hunt@intel.com; anatoly.burakov@intel.com; jerinj@marvell.com;
> radu.nicolau@intel.com; gakhil@marvell.com; cristian.dumitrescu@intel.com;
> konstantin.ananyev@huawei.com; dev@dpdk.org
> Subject: Re: [PATCH] power/amd_uncore: add e-smi installation instructions
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 29/11/2024 05:32, Sivaprasad Tummala:
> > Added section for installing and building the E-SMI library for AMD
> > EPYC Uncore support and version requirements.
> >
> > Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> > ---
> > doc/guides/prog_guide/power_man.rst | 32
> > +++++++++++++++++++++++++++++
> > 1 file changed, 32 insertions(+)
> >
> > diff --git a/doc/guides/prog_guide/power_man.rst
> > b/doc/guides/prog_guide/power_man.rst
> > index 74039e5786..d367a81596 100644
> > --- a/doc/guides/prog_guide/power_man.rst
> > +++ b/doc/guides/prog_guide/power_man.rst
> > @@ -249,6 +249,38 @@ Additionally, the EPYC System Management
> > Interface In-band Library for Linux offers essential API, enabling
> > user-space software to effectively manage system functions.
> >
> > +E-SMI Installation
> > +------------------
> > +
> > +To build DPDK with AMD EPYC Uncore the user is required to download
> > +the e-smi library from `here
> > +<https://github.com/amd/esmi_ib_library>`_
> > +and compile it on their user system before building DPDK.
> > +
> > +.. code-block:: console
> > +
> > + cd esmi_ib_library
> > + cmake .
> > + sudo make install
> > + cp /opt/e-sms/e_smi/lib/* /usr/local/lib/*
> > + cp /opt/e-sms/e_smi/include/* /usr/local/include/*
>
> Why copying the files?
> You can specify the directories in an environment variable.
> There is no pkg-config file?
Currently, there isn't a pkg-config file available.
However, we are actively working on adding support for it in an upcoming release.
>
> > +
> > +Library file, header and tool are installed at /opt/e-sms.
> > +
> > +Note: Library is dependent on amd_hsmp.h header and without this, compilation
> will break.
>
> Yes, it does not compile on my machine (with Linux 6.12):
>
> e_smi.c:566:27: error: ‘HSMP_GET_RAPL_UNITS’ undeclared
>
> What should I do?
It appears there is a compatibility issue with the current version of the amd_hsmp.h header file. https://github.com/amd/amd_hsmp/blob/master/amd_hsmp.h
To resolve this, could you please try replacing the existing version with an older amd_hsmp.h header file?
This should allow the build process to work with the older kernels.
>
> > +
> > +The library requires CMake (v3.5.0) to be built.
> > +
> > +As a reference, the following table shows a mapping between the DPDK
> > +versions and the E-SMI library and kernel version supported by them:
> > +
> > +.. table:: DPDK and E-SMI library and kernel version compatibility
> > +
> > + ============== ============== =====================
> > + DPDK version E-SMI version Linux Kernel version
> > + ============== ============== =====================
> > + 24.11+ 4.0.0 6.7+
> > + ============== ============== =====================
>
>
01/12/2024 05:55, Tummala, Sivaprasad:
> [AMD Official Use Only - AMD Internal Distribution Only]
Please remove this.
> Hi Thomas,
>
> From: Thomas Monjalon <thomas@monjalon.net>
> > 29/11/2024 05:32, Sivaprasad Tummala:
> > > Added section for installing and building the E-SMI library for AMD
> > > EPYC Uncore support and version requirements.
> > >
> > > Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> > > ---
> > > doc/guides/prog_guide/power_man.rst | 32
> > > +++++++++++++++++++++++++++++
> > > 1 file changed, 32 insertions(+)
> > >
> > > diff --git a/doc/guides/prog_guide/power_man.rst
> > > b/doc/guides/prog_guide/power_man.rst
> > > index 74039e5786..d367a81596 100644
> > > --- a/doc/guides/prog_guide/power_man.rst
> > > +++ b/doc/guides/prog_guide/power_man.rst
> > > @@ -249,6 +249,38 @@ Additionally, the EPYC System Management
> > > Interface In-band Library for Linux offers essential API, enabling
> > > user-space software to effectively manage system functions.
> > >
> > > +E-SMI Installation
> > > +------------------
> > > +
> > > +To build DPDK with AMD EPYC Uncore the user is required to download
> > > +the e-smi library from `here
> > > +<https://github.com/amd/esmi_ib_library>`_
> > > +and compile it on their user system before building DPDK.
> > > +
> > > +.. code-block:: console
> > > +
> > > + cd esmi_ib_library
> > > + cmake .
> > > + sudo make install
> > > + cp /opt/e-sms/e_smi/lib/* /usr/local/lib/*
> > > + cp /opt/e-sms/e_smi/include/* /usr/local/include/*
> >
> > Why copying the files?
> > You can specify the directories in an environment variable.
> > There is no pkg-config file?
> Currently, there isn't a pkg-config file available.
> However, we are actively working on adding support for it in an upcoming release.
> >
> > > +
> > > +Library file, header and tool are installed at /opt/e-sms.
> > > +
> > > +Note: Library is dependent on amd_hsmp.h header and without this, compilation
> > will break.
> >
> > Yes, it does not compile on my machine (with Linux 6.12):
> >
> > e_smi.c:566:27: error: ‘HSMP_GET_RAPL_UNITS’ undeclared
> >
> > What should I do?
> It appears there is a compatibility issue with the current version of the amd_hsmp.h header file. https://github.com/amd/amd_hsmp/blob/master/amd_hsmp.h
> To resolve this, could you please try replacing the existing version with an older amd_hsmp.h header file?
> This should allow the build process to work with the older kernels.
No I will wait for the library to be fixed.
It doesn't look mature enough, this support should not have been merged.
@@ -249,6 +249,38 @@ Additionally, the EPYC System Management Interface In-band Library for Linux
offers essential API, enabling user-space software
to effectively manage system functions.
+E-SMI Installation
+------------------
+
+To build DPDK with AMD EPYC Uncore the user is required to download the e-smi
+library from `here <https://github.com/amd/esmi_ib_library>`_
+and compile it on their user system before building DPDK.
+
+.. code-block:: console
+
+ cd esmi_ib_library
+ cmake .
+ sudo make install
+ cp /opt/e-sms/e_smi/lib/* /usr/local/lib/*
+ cp /opt/e-sms/e_smi/include/* /usr/local/include/*
+
+Library file, header and tool are installed at /opt/e-sms.
+
+Note: Library is dependent on amd_hsmp.h header and without this, compilation will break.
+
+The library requires CMake (v3.5.0) to be built.
+
+As a reference, the following table shows a mapping between the DPDK versions
+and the E-SMI library and kernel version supported by them:
+
+.. table:: DPDK and E-SMI library and kernel version compatibility
+
+ ============== ============== =====================
+ DPDK version E-SMI version Linux Kernel version
+ ============== ============== =====================
+ 24.11+ 4.0.0 6.7+
+ ============== ============== =====================
+
Uncore API Overview
~~~~~~~~~~~~~~~~~~~