[EXTERNAL] [RFC v3 3/3] examples: add lcore topology API calls
Pavan Nikhilesh Bhagavatula
pbhagavatula at marvell.com
Wed Oct 30 12:49:24 CET 2024
> Enhance example code to allow topology based lcores API, while
> retaining default behaviour.
>
> - helloworld: allow lcoes to send hello to lcores in selected topology.
> - l2fwd: allow use of IO lcores topology.
> - skeleton: choose the lcore from IO topology which has more ports.
>
> v3 changes:
> - fix typo from SE_NO_TOPOLOGY to USE_NO_TOPOLOGY
>
> Signed-off-by: Vipin Varghese <vipin.varghese at amd.com>
> ---
I see compilation failure on ARM platforms due to missing header include.
../examples/helloworld/main.c: In function 'parse_topology':
../examples/helloworld/main.c:83:13: error: implicit declaration of function 'strtoul'; did you mean 'strtok'? [-Wimplicit-function-declaration]
83 | n = strtoul(q_arg, &end, 10);
| ^~~~~~~
| strtok
../examples/helloworld/main.c:83:13: warning: nested extern declaration of 'strtoul' [-Wnested-externs]
../examples/helloworld/main.c: In function 'helloworld_parse_args':
../examples/helloworld/main.c:115:42: error: 'EXIT_FAILURE' undeclared (first use in this function)
115 | rte_exit(EXIT_FAILURE, "Invalid Topology selection\n");
| ^~~~~~~~~~~~
../examples/helloworld/main.c:13:1: note: 'EXIT_FAILURE' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
12 | #include <rte_memory.h>
+++ |+#include <stdlib.h>
13 | #include <rte_launch.h>
../examples/helloworld/main.c:115:42: note: each undeclared identifier is reported only once for each function it appears in
115 | rte_exit(EXIT_FAILURE, "Invalid Topology selection\n");
| ^~~~~~~~~~~~
../examples/helloworld/main.c: In function 'main':
../examples/helloworld/main.c:153:26: error: 'EXIT_FAILURE' undeclared (first use in this function)
153 | rte_exit(EXIT_FAILURE, "Invalid arguments\n");
| ^~~~~~~~~~~~
../examples/helloworld/main.c:153:26: note: 'EXIT_FAILURE' is defined in header '<stdlib.h>'; thi
Below header include should fix it.
diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
index 9845c3775c3a..f49bd0108f74 100644
--- a/examples/helloworld/main.c
+++ b/examples/helloworld/main.c
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
More information about the dev
mailing list