eal: change init macro as exec environment specific
PATCH 1/1 eal: change init macro as exec environment specific
baremetal execution environments may have a different method to enable RTE_INIT instead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.h
app/test-eventdev/evt_test.h +1 -1
@@ -37,7 +37,7 @@#include <stdbool.h> #include <sys/queue.h> -#include <rte_eal.h> +#include <exec-env/rte_eal.h> enum evt_test_result {EVT_TEST_SUCCESS ,
lib/librte_eal/bsdapp/eal/Makefile +1 -1
@@ -107,7 +107,7 @@ CFLAGS_eal_thread.o += -Wno-return-type CFLAGS_eal_hpet.o += -Wno-return-type endif -INC := rte_interrupts.h +INC := rte_interrupts.h rte_eal.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_BSDAPP)-include/exec-env := \ $(addprefix include/exec-env/,$(INC))
lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h new file +51 -0
51 lines not on this page · raw message
lib/librte_eal/common/eal_common_log.c +2 -0
@@ -43,6 +43,8 @@#include <rte_log.h> #include <rte_per_lcore.h> +#include <exec-env/rte_eal.h> +#include "eal_private.h" /* global log structure */
lib/librte_eal/common/include/rte_bus.h +2 -0
@@ -52,6 +52,8 @@ extern "C" {#include <rte_log.h> #include <rte_dev.h> +#include <exec-env/rte_eal.h> +/** Double linked list of buses */ TAILQ_HEAD (rte_bus_list, rte_bus);
lib/librte_eal/common/include/rte_eal.h +0 -6
@@ -287,12 +287,6 @@ static inline int rte_gettid(void)return RTE_PER_LCORE (_thread_id); } -#define RTE_INIT (func) \ -static void __attribute__((constructor, used)) func(void) - -#define RTE_INIT_PRIO (func, prio) \ -static void __attribute__((constructor(prio), used)) func(void) - #ifdef __cplusplus }#endif
lib/librte_eal/common/include/rte_tailq.h +2 -0
@@ -48,6 +48,8 @@ extern "C" {#include <stdio.h> #include <rte_debug.h> +#include <exec-env/rte_eal.h> +/** dummy structure type used by the rte_tailq APIs */ struct rte_tailq_entry {TAILQ_ENTRY (rte_tailq_entry) next;/**< Pointer entries for a tailq list */
lib/librte_eal/linuxapp/eal/Makefile +1 -1
@@ -130,7 +130,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) CFLAGS_eal_thread.o += -Wno-return-type endif -INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h +INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h rte_eal.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_LINUXAPP)-include/exec-env := \ $(addprefix include/exec-env/,$(INC))
lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.h new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.14.0
07/08/2017 14:04, Jerin Jacob:
Quoted 6 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <[email protected]>
Quoted 13 lines
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.h
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some bare metal environments.
-----Original Message-----
Quoted 28 lines
Date: Wed, 11 Oct 2017 15:02:51 +0200
From: Thomas Monjalon <[email protected]>
To: Jerin Jacob <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [dpdk-dev] [PATCH] eal: change init macro as exec environment
specific07/08/2017 14:04, Jerin Jacob:
Quoted 6 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <[email protected]>Quoted 13 lines
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.h
Quoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some bare metal environments.
IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment shows things are already in place and may need minor changes like this to accommodate a bare metal execution environment(accounting the latest changes of moving pci to driver/pci/..)
If no one care about need for such abstraction then we could drop this patch. We can always keep local copy of such patches in our internal tree. I thought to upstream it as it may be useful for someone else and it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ and drivers/*/
Quoted 49 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
-----Original Message-----
Quoted 28 lines
Date: Wed, 11 Oct 2017 15:02:51 +0200
From: Thomas Monjalon <thomas at monjalon.net>
To: Jerin Jacob <jerin.jacob at caviumnetworks.com>
Cc: dev at dpdk.org, bruce.richardson at intel.com
Subject: Re: [dpdk-dev] [PATCH] eal: change init macro as exec environment
specific07/08/2017 14:04, Jerin Jacob:
Quoted 6 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <jerin.jacob at caviumnetworks.com>Quoted 13 lines
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.hQuoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some bare metal environments.IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment shows things are already in place and may need minor changes like this to accommodate a bare metal execution environment(accounting the latest changes of moving pci to driver/pci/..)
Quoted 5 lines
If no one care about need for such abstraction then we could drop this patch. We can always keep local copy of such patches in our internal tree. I thought to upstream it as it may be useful for someone else and it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ and
drivers/*/
Hi Jerin, Thomas,
This is an old patch, the abstraction seems good idea but it comes with a duplication.
Is there an intention to continue the work? Are we waiting for any decision? Any objection to mark it as rejected?
Thanks,
ferruh
Quoted 55 lines · Ferruh Yigit
Quoted 49 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
-----Original Message-----
Quoted 28 lines
Date: Wed, 11 Oct 2017 15:02:51 +0200
From: Thomas Monjalon <thomas at monjalon.net>
To: Jerin Jacob <jerin.jacob at caviumnetworks.com>
Cc: dev at dpdk.org, bruce.richardson at intel.com
Subject: Re: [dpdk-dev] [PATCH] eal: change init macro as exec environment
specific07/08/2017 14:04, Jerin Jacob:
Quoted 6 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <jerin.jacob at caviumnetworks.com>Quoted 13 lines
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.hQuoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some bare metal environments.IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment shows things are already in place and may need minor changes like this to accommodate a bare metal execution environment(accounting the latest changes of moving pci to driver/pci/..)
Quoted 5 lines
If no one care about need for such abstraction then we could drop this patch. We can always keep local copy of such patches in our internal tree. I thought to upstream it as it may be useful for someone else and it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ and
drivers/*/
Quoted 7 lines
Hi Jerin, Thomas,
This is an old patch, the abstraction seems good idea but it comes with a duplication.
Is there an intention to continue the work? Are we waiting for any decision? Any objection to mark it as rejected?
For reference, mentioned patch:
https://patches.dpdk.org/patch/27474/
Quoted 4 lines
Thanks,
ferruh
01/03/2019 18:05, Ferruh Yigit:
Quoted 48 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
Quoted 42 lines
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 21 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 6 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <jerin.jacob at caviumnetworks.com>Quoted 13 lines
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec-env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_eal.hQuoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some bare metal environments.IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment shows things are already in place and may need minor changes like this to accommodate a bare metal execution environment(accounting the latest changes of moving pci to driver/pci/..)
Quoted 5 lines
If no one care about need for such abstraction then we could drop this patch. We can always keep local copy of such patches in our internal tree. I thought to upstream it as it may be useful for someone else and it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ and
drivers/*/
Quoted 7 lines
Hi Jerin, Thomas,
This is an old patch, the abstraction seems good idea but it comes with a duplication.
Is there an intention to continue the work? Are we waiting for any decision? Any objection to mark it as rejected?
I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re-consider.
Quoted 71 lines · Thomas Monjalon
External Email
-------------------------------------------------------------------
---
01/03/2019 18:05, Ferruh Yigit:Quoted 66 lines
Quoted 50 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 26 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 23 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec- env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-Quoted 1 line
env/rte_eal.hQuoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some
bare metal environments.IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment
shows things are already in place and may need minor changes like this to
accommodate a bare metal execution environment(accounting the latest
changes of moving pci to driver/pci/..)Quoted 8 lines
If no one care about need for such abstraction then we could drop this
patch. We can always keep local copy of such patches in our internal
tree. I thought to upstream it as it may be useful for someone else and
it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ anddrivers/*/Hi Jerin, Thomas,
This is an old patch, the abstraction seems good idea but it comes with a
duplication.
Quoted 7 lines
Quoted 3 lines
Is there an intention to continue the work? Are we waiting for any decision?
Any objection to mark it as rejected?I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re-consider.
Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card), May not need to waste one core for Linux. Specially Smart NIC market has less number of cores.
On the endpoint side, It treats as FW so customer may not have access to so nobdoy cares it is Linux or baremetal so may need to waste one core for Linux
# VM case, it possible to have bare metal guest just to save one a logical core for Linux
# Some of the RTOS like Zephyr already provide TCP/IP stack and good subsystems for specific usecases.
# We are using DPDK for pre silicon validation for SoC mode. Bringing up linux on emulator takes ages, Baremetal can be used for Harware verification too.
IMO, As long as it not limiting the a feature of Linux app, Why not to allow baremetal? I agree with code duplication. I think, it can be fixed easily, Other than that, Is there any concern?
Jerin
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 95 lines · Thomas Monjalon
Quoted 71 lines
External Email
-------------------------------------------------------------------
---
01/03/2019 18:05, Ferruh Yigit:Quoted 66 lines
Quoted 50 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 26 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 23 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++ 9 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 lib/librte_eal/bsdapp/eal/include/exec- env/rte_eal.h create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-Quoted 1 line
env/rte_eal.hQuoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
Quoted 5 lines
I feel it would be easier to think about the split when adding a new environment.
It is also an open question whether we want to support (again) some
bare metal environments.IMO, A factor could be, how much we are OK to change?
Our internal prototype implementation for a bare metal environment
shows things are already in place and may need minor changes like this to
accommodate a bare metal execution environment(accounting the latest
changes of moving pci to driver/pci/..)Quoted 8 lines
If no one care about need for such abstraction then we could drop this
patch. We can always keep local copy of such patches in our internal
tree. I thought to upstream it as it may be useful for someone else and
it is easy for us maintain if changes are in lib/librte_eal/<new environment>/eal/ anddrivers/*/Hi Jerin, Thomas,
This is an old patch, the abstraction seems good idea but it comes with a
duplication.Quoted 7 lines
Quoted 3 lines
Is there an intention to continue the work? Are we waiting for any decision?
Any objection to mark it as rejected?I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re-consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card), May not need to waste one core for Linux. Specially Smart NIC market has less number of cores.
On the endpoint side, It treats as FW so customer may not have access to so nobdoy cares it is Linux or baremetal so may need to waste one core for Linux# VM case, it possible to have bare metal guest just to save one a logical core for Linux
# Some of the RTOS like Zephyr already provide TCP/IP stack and good subsystems for specific usecases.
Quoted 8 lines
# We are using DPDK for pre silicon validation for SoC mode. Bringing up linux on emulator takes ages, Baremetal can be used for Harware verification too.
IMO, As long as it not limiting the a feature of Linux app, Why not to allow baremetal? I agree with code duplication. I think, it can be fixed easily, Other than that, Is there any concern?
The concern is about the effort required. Which libc to use? Which dependency is acceptable?
Quoted 52 lines · Thomas Monjalon
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 51 lines · Thomas Monjalon
Quoted 15 lines
External Email
---------------------------------------------------------------
----
---
01/03/2019 18:05, Ferruh Yigit:Quoted 9 lines
Quoted 7 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 6 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 5 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re-consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card), May
not need to waste one core for Linux. Specially Smart NIC market has
less number of cores.
On the endpoint side, It treats as FW so customer may not have access
to so nobdoy cares it is Linux or baremetal so may need to waste one
core for Linux# VM case, it possible to have bare metal guest just to save one a logical core for Linux
# Some of the RTOS like Zephyr already provide TCP/IP stack and good
subsystems for specific usecases.# We are using DPDK for pre silicon validation for SoC mode. Bringing
up linux on emulator takes ages, Baremetal can be used for Harware verification too.
Quoted 7 lines
Quoted 4 lines
IMO, As long as it not limiting the a feature of Linux app, Why not to
allow baremetal? I agree with code duplication. I think, it can be fixed easily, Other than that, Is there any concern?The concern is about the effort required. Which libc to use? Which dependency is acceptable?
# It should be like FreeBSD or Windows EAL port(Where changes should be in lib/librte_eal/xxxxxx/)
# Baremetal libc can be newlibc or musl.
# IMO, If bare metal code is open source then the dependency does not matter
# if RTOS supports POSIX wrappers, the common code changes will be very minimal. # In house, We have baremetal support as PoC, where 95% of changes are in lib/librte_eal/xxxxxx/ with POSIX wrappers.
Quoted 2 lines
13/03/2019 09:02, Jerin Jacob Kollanukkaran:
Quoted 61 lines · Thomas Monjalon
Quoted 47 lines
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 46 lines · Thomas Monjalon
Quoted 10 lines
01/03/2019 18:05, Ferruh Yigit:
Quoted 9 lines
Quoted 7 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 6 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 5 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re-consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card), May
not need to waste one core for Linux. Specially Smart NIC market has
less number of cores.
On the endpoint side, It treats as FW so customer may not have access
to so nobdoy cares it is Linux or baremetal so may need to waste one
core for Linux# VM case, it possible to have bare metal guest just to save one a logical core for Linux
# Some of the RTOS like Zephyr already provide TCP/IP stack and good
subsystems for specific usecases.# We are using DPDK for pre silicon validation for SoC mode. Bringing
up linux on emulator takes ages, Baremetal can be used for Harware verification too.Quoted 7 lines
Quoted 4 lines
IMO, As long as it not limiting the a feature of Linux app, Why not to
allow baremetal? I agree with code duplication. I think, it can be fixed easily, Other than that, Is there any concern?The concern is about the effort required. Which libc to use? Which dependency is acceptable?
# It should be like FreeBSD or Windows EAL
port(Where changes should be in lib/librte_eal/xxxxxx/)
# Baremetal libc can be newlibc or musl.
# IMO, If bare metal code is open source then the dependency does not matter
Quoted 4 lines
# if RTOS supports POSIX wrappers, the common code changes will be very minimal. # In house, We have baremetal support as PoC, where 95% of changes are in lib/librte_eal/xxxxxx/ with POSIX wrappers.
Then maybe you should send your patches so we can decide if it is maintainable enough or not.
Quoted 80 lines · Thomas Monjalon
13/03/2019 09:02, Jerin Jacob Kollanukkaran:
Quoted 72 lines · Thomas Monjalon
Quoted 61 lines
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 53 lines · Thomas Monjalon
Quoted 16 lines
01/03/2019 18:05, Ferruh Yigit:
Quoted 10 lines
Quoted 7 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 6 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 5 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---Quoted 4 lines
I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re- consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card),
May
not need to waste one core for Linux. Specially Smart NIC market
has
less number of cores.
On the endpoint side, It treats as FW so customer may not have access
to so nobdoy cares it is Linux or baremetal so may need to waste
one
core for Linux# VM case, it possible to have bare metal guest just to save one a
logical core for Linux# Some of the RTOS like Zephyr already provide TCP/IP stack and good
subsystems for specific usecases.# We are using DPDK for pre silicon validation for SoC mode. Bringing
up linux on emulator takes ages, Baremetal can be used for Harware
verification too.Quoted 6 lines
IMO, As long as it not limiting the a feature of Linux app, Why not
to
allow baremetal? I agree with code duplication. I think, it can be
fixed easily, Other than that, Is there any concern?Quoted 2 lines
The concern is about the effort required. Which libc to use? Which dependency is acceptable?
# It should be like FreeBSD or Windows EAL port(Where changes should be
inlib/librte_eal/xxxxxx/)
# Baremetal libc can be newlibc or musl.
# IMO, If bare metal code is open source then the dependency does not
matterQuoted 6 lines
# if RTOS supports POSIX wrappers, the common code changes will be very minimal. # In house, We have baremetal support as PoC, where 95% of changes are in lib/librte_eal/xxxxxx/ with POSIX wrappers.
Quoted 2 lines
Then maybe you should send your patches so we can decide if it is maintainable enough or not.
The __attribute__((constructor)) only stuff we have issue to support. The common code changes are related to adapt __attribute__((constructor)) scheme.
This patch will fix that issue. Other than that there is no common code changes.i.e everything emulated under lib/librte_eal/new_port/
Quoted 2 lines
Quoted 92 lines · Jerin Jacob
Quoted 88 lines · Thomas Monjalon
13/03/2019 09:02, Jerin Jacob Kollanukkaran:
Quoted 78 lines · Thomas Monjalon
Quoted 67 lines
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 57 lines · Thomas Monjalon
Quoted 18 lines
01/03/2019 18:05, Ferruh Yigit:
Quoted 12 lines
Quoted 9 lines · jerin.jacob at caviumnetworks.com (Jerin Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 8 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 7 lines
baremetal execution environments may have a different
method to enableRTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by: Jerin Jacob <jerin.jacob at
caviumnetworks.com>
---Quoted 4 lines
I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re- consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card),
May
not need to waste one core for Linux. Specially Smart NIC market
has
less number of cores.
On the endpoint side, It treats as FW so customer may not have
access
to so nobdoy cares it is Linux or baremetal so may need to waste
one
core for Linux# VM case, it possible to have bare metal guest just to save one a
logical core for Linux# Some of the RTOS like Zephyr already provide TCP/IP stack and
good
subsystems for specific usecases.# We are using DPDK for pre silicon validation for SoC mode. Bringing
up linux on emulator takes ages, Baremetal can be used for Harware
verification too.Quoted 8 lines
IMO, As long as it not limiting the a feature of Linux app, Why
not
to
allow baremetal? I agree with code duplication. I think, it can
be
fixed easily, Other than that, Is there any concern?Quoted 2 lines
The concern is about the effort required. Which libc to use? Which dependency is acceptable?
# It should be like FreeBSD or Windows EAL port(Where changes should be
inlib/librte_eal/xxxxxx/)
# Baremetal libc can be newlibc or musl.
# IMO, If bare metal code is open source then the dependency does not
matterQuoted 8 lines
# if RTOS supports POSIX wrappers, the common code changes will be very minimal. # In house, We have baremetal support as PoC, where 95% of changes are in lib/librte_eal/xxxxxx/ with POSIX wrappers.Quoted 2 lines
Then maybe you should send your patches so we can decide if it is maintainable enough or not.
Quoted 8 lines
The __attribute__((constructor)) only stuff we have issue to support.
The common code changes are related to adapt __attribute__((constructor)) scheme.This patch will fix that issue. Other than that there is no common code
changes.i.e everything emulated underlib/librte_eal/new_port/
Thomas,
I explained the use case and changes required. Let me know, do you need any other change on this patch to get this patch accepted?
Quoted 4 lines
Quoted 4 lines
Quoted 108 lines · Jerin Jacob Kollanukkaran
Quoted 98 lines · Jerin Jacob
Quoted 94 lines · Thomas Monjalon
13/03/2019 09:02, Jerin Jacob Kollanukkaran:
Quoted 84 lines · Thomas Monjalon
Quoted 72 lines
12/03/2019 20:25, Jerin Jacob Kollanukkaran:
Quoted 62 lines · Thomas Monjalon
Quoted 21 lines
01/03/2019 18:05, Ferruh Yigit:
Quoted 19 lines
On 10/11/2017 3:33 PM, jerin.jacob at
caviumnetworks.com
(JerinQuoted 15 lines · Jacob)
From: Thomas Monjalon <thomas at monjalon.net>
Quoted 14 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 13 lines
baremetal execution environments may have a
different
method to enableRTE_INITinstead of using
compiler
constructor scheme. Move RTE_INIT* definition
under
exec-env to support different execution
environments.Signed-off-by: Jerin Jacob <jerin.jacob at
caviumnetworks.com>
---Quoted 4 lines
I am not sure there is a real desire to make DPDK ready for bare-metal (back again).
If any of you are aware of a real use-case, we can re- consider.Some of the usecases:
# PCIe endpoint mode aka Smart NIC(Where DPDK runs on PCIe card),
May
not need to waste one core for Linux. Specially Smart NIC market
has
less number of cores.
On the endpoint side, It treats as FW so customer may not have
access
to so nobdoy cares it is Linux or baremetal so may need to waste
one
core for Linux# VM case, it possible to have bare metal guest just to save
one a
logical core for Linux# Some of the RTOS like Zephyr already provide TCP/IP stack and
good
subsystems for specific usecases.# We are using DPDK for pre silicon validation for SoC mode.
Bringing
up linux on emulator takes ages, Baremetal can be used for Harware
verification too.Quoted 8 lines
IMO, As long as it not limiting the a feature of Linux app, Why
not
to
allow baremetal? I agree with code duplication. I think, it can
be
fixed easily, Other than that, Is there any concern?Quoted 2 lines
The concern is about the effort required. Which libc to use? Which dependency is acceptable?
# It should be like FreeBSD or Windows EAL port(Where changes should be
inlib/librte_eal/xxxxxx/)
# Baremetal libc can be newlibc or musl.
# IMO, If bare metal code is open source then the dependency does
not
matterQuoted 8 lines
# if RTOS supports POSIX wrappers, the common code changes will be very minimal. # In house, We have baremetal support as PoC, where 95% of changes are in lib/librte_eal/xxxxxx/ with POSIX wrappers.Quoted 2 lines
Then maybe you should send your patches so we can decide if it is maintainable enough or not.
Quoted 8 lines
The __attribute__((constructor)) only stuff we have issue to support.
The common code changes are related to adapt __attribute__((constructor)) scheme.This patch will fix that issue. Other than that there is no common code
changes.i.e everything emulated underlib/librte_eal/new_port/
Quoted 5 lines
Thomas,
I explained the use case and changes required. Let me know, do you need
any other change on this patch to get this patch accepted?
Ping?
Quoted 5 lines
Quoted 5 lines
02/04/2019 03:15, Jerin Jacob Kollanukkaran:
Quoted 15 lines · Jerin Jacob Kollanukkaran
Quoted 14 lines · Jerin Jacob
Quoted 12 lines · Thomas Monjalon
Quoted 2 lines
Then maybe you should send your patches so we can decide if it is maintainable enough or not.
The __attribute__((constructor)) only stuff we have issue to support.
The common code changes are related to adapt __attribute__((constructor)) scheme.This patch will fix that issue. Other than that there is no common code
changes.i.e everything emulated underlib/librte_eal/new_port/
Quoted 7 lines
Quoted 5 lines
Thomas,
I explained the use case and changes required. Let me know, do you need
any other change on this patch to get this patch accepted?Ping?
This patch needs to be refreshed.
And I have some comments, sending in another email with better context.
11/10/2017 16:33, Jerin Jacob:
Quoted 12 lines
From: Thomas Monjalon <[email protected]>
Quoted 11 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 10 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <[email protected]>--- app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++
I sent a patch to flatten the hierarchy, removing exec-env. And I'm not sure about the file name rte_eal.h.
Please could you move it to lib/librte_eal/<os>/eal/include/rte_exec_env.h or another better name? Note that Windows is introducing rte_os.h.
PS: I'm not sure about the intent of rte_os.h. Should it be rte_libc.h?
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++
Quoted 6 lines
Quoted 4 lines
I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
OK. This is doable.
After some thoughts about Windows port, I think we need to consider a better split.
The constructors are the same for Linux, BSD and Windows, isn't it? Is it related to splitting between POSIX libc and others?
Quoted 18 lines · Thomas Monjalon
11/10/2017 16:33, Jerin Jacob:
Quoted 12 lines
From: Thomas Monjalon <[email protected]>
Quoted 11 lines
07/08/2017 14:04, Jerin Jacob:
Quoted 10 lines
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor scheme. Move RTE_INIT* definition under exec-env to support different execution environments.Signed-off-by Jerin Jacob <[email protected]>---
app/test-eventdev/evt_test.h | 2 +- lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++
Quoted 5 lines
I sent a patch to flatten the hierarchy, removing exec-env. And I'm not sure about the file name
rte_eal.h.
Please could you move it to lib/librte_eal/<os>/eal/include/rte_exec_env.h or another better name? Note that Windows is introducingrte_os.h.
PS: I'm not sure about the intent ofrte_os.h. Should it berte_libc.h?
I agree here unless the rte_os.h or (rte_libc.h) is really a header to just include rte_windows_libc.h, rte_linux_libc.h or rte_<OS>_libc.h to simplify including OS specific headers and differences in libc designs.
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 7 lines
lib/librte_eal/common/eal_common_log.c | 2 + lib/librte_eal/common/include/rte_bus.h | 2 + lib/librte_eal/common/include/rte_eal.h | 6 --- lib/librte_eal/common/include/rte_tailq.h | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 +- .../linuxapp/eal/include/exec-env/rte_eal.h | 51 ++++++++++++++++++++++I am not a big fan of duplicating code for Linux and BSD.
Maybe we should have different splits and include a common file in Linux and BSD?
Quoted 9 lines
Quoted 1 line
OK. This is doable.
After some thoughts about Windows port, I think we need to consider a better split.
The constructors are the same for Linux, BSD and Windows, isn't it? Is it related to splitting between POSIX libc and others?
Regards,
Keith
PATCH v2 1/1 eal: change init macro as exec environment specific
In reply to Jerin JacobFrom: Jerin Jacob <[email protected]>
baremetal execution environments may have a different method to enable RTE_INIT instead of using compiler constructor and/or OS specific linker scheme. Allow an option to override RTE_INIT* macros using rte_os.h or appropriate header file.
---
v2:
- Leverage the rte_os.h created by Windows port to override RTE_INIT* macro if needed.
- Removed the exec environment specific librte_eal/<OS>/eal/include/exec-env/rte_exec-env.h file creation
- Removed the duplication of RTE_INIT_* definition on each rte_exec-env.h file as it is common for Linux,FreeBSD and Windows port
--- lib/librte_eal/common/include/rte_common.h | 4 ++++ 1 file changed, 4 insertions(+)
lib/librte_eal/common/include/rte_common.h +4 -0
@@ -106,8 +106,10 @@ typedef uint16_t unaligned_uint16_t;* Priority number must be above 100. * Lowest number is the first to run. */ +#ifndef RTE_INIT_PRIO /* Allow to override from eal */ #define RTE_INIT_PRIO (func, prio) \ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) +#endif /** * Run function before main() with low priority.
@@ -129,8 +131,10 @@ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void)* Priority number must be above 100. * Lowest number is the last to run. */ +#ifndef RTE_FINI_PRIO /* Allow to override from eal */ #define RTE_FINI_PRIO (func, prio) \ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +#endif /** * Run after main() with high priority.
Signature · 1 line
2.21.0
03/04/2019 21:28, Jerin Jacob Kollanukkaran:
Quoted 21 lines
From: Jerin Jacob <[email protected]>
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor and/or OS specific linker scheme. Allow an option to override RTE_INIT* macros usingrte_os.hor appropriate header file.Signed-off-by Jerin Jacob <[email protected]>---
v2:
- Leverage therte_os.hcreated by Windows port to override RTE_INIT* macro if needed.
- Removed the exec environment specific librte_eal/<OS>/eal/include/exec-env/rte_exec-env.h file creation
- Removed the duplication of RTE_INIT_* definition on eachrte_exec-env.hfile as it is common for Linux,FreeBSD and Windows port
lib/librte_eal/common/include/rte_common.h typedef uint16_t unaligned_uint16_t; · line 112
Quoted 7 lines
lib/librte_eal/common/include/rte_common.h +2
-0@@ -106,8 +106,10 @@ typedef uint16_t unaligned_uint16_t;* Priority number must be above 100. * Lowest number is the first to run. */ +#ifndef RTE_INIT_PRIO /* Allow to override from eal */ #define RTE_INIT_PRIO (func, prio) \ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) +#endif
I did not think about such #ifndef, it's a lot simpler :)
As a nit, I would just fix eal to uppercase EAL in the above comment. I may do it on apply.
Thomas Monjalon
Applied03/04/2019 22:07, Thomas Monjalon:
Quoted 9 lines
03/04/2019 21:28, Jerin Jacob Kollanukkaran:
Quoted 8 lines
From: Jerin Jacob <[email protected]>
baremetal execution environments may have a different method to enable
RTE_INITinstead of using compiler constructor and/or OS specific linker scheme. Allow an option to override RTE_INIT* macros usingrte_os.hor appropriate header file.
Quoted 3 lines
Quoted 1 line
Signed-off-by Jerin Jacob <[email protected]>Acked-by Thomas Monjalon <[email protected]>
Applied, thanks