Currently dpdk lcore args for DPDK EAL init can be generated or
they can be written directly by the user through dpdk-extra.

If dpdk-extra does not contain '-l' or '-c', a '-l' argument with
a core list for DPDK EAL init will be generated.

The '--lcores' argument should also be checked, as if it is used in
dpdk-extra, currently a '-l' is still generated and that causes
DPDK EAL init to fail:

|00009|dpdk|INFO|EAL ARGS: ovs-vswitchd --lcores 0@18 --in-memory -l 0.
|00012|dpdk|ERR|EAL: Option -l is ignored, because (--lcore) is set!

Add check for '--lcores' in dpdk-extra config and don't generate '-l'
if it is detected:

|00009|dpdk|INFO|EAL ARGS: ovs-vswitchd --lcores 0@8 --in-memory.

Fixes: 543342a41cbc ("DPDK: add support for v2.0.0")
Signed-off-by: Kevin Traynor <[email protected]>
Reviewed-by: David Marchand <[email protected]>
---
v2: Correct the Fixes: tag
---
 lib/dpdk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/dpdk.c b/lib/dpdk.c
index d76d53f8f..940c43c07 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -338,5 +338,7 @@ dpdk_init__(const struct smap *ovs_other_config)
 #endif
 
-    if (args_contains(&args, "-c") || args_contains(&args, "-l")) {
+    if (args_contains(&args, "-c") ||
+        args_contains(&args, "-l") ||
+        args_contains(&args, "--lcores")) {
         auto_determine = false;
     }
-- 
2.45.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to