From 6b809649650c367ea0458928434600ca064206c1 Mon Sep 17 00:00:00 2001 From: Paul Barrette Date: Fri, 26 Apr 2019 17:41:04 -0300 Subject: [PATCH] STX: qemu: add -enable-dpdk runtime flag For Intel's dpdk openvswitch support, qemu takes a set of dpdk specific command line args. Qemu will dump and error if it doesn't recognize the CLI args. So, add a new runtime flag to tell qemu that it is using dpdk and then the main function can take the appropriate action. This way, qemu can take dpdk args or run normally without dpdk. Signed-off-by: Paul Barrette Signed-off-by: Jim Somerville [ Update qemu-options.hx struc ] Signed-off-by: Rafael Falcao [Rebased original changes to the qemu 7.2 version] Signed-off-by: david.liu --- qemu-options.hx | 7 +++++++ softmmu/vl.c | 1 + 2 files changed, 8 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 7f99d15b..fd6a45f1 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1147,6 +1147,13 @@ backend describes how QEMU handles the data. ERST +DEF("enable-dpdk", 0, QEMU_OPTION_enable_dpdk, + "-enable-dpdk initialized DPDK EAL environment\n", QEMU_ARCH_ALL) +SRST +``-enable-dpdk`` + Enable DPDK EAL environment at init time (expecting DPDK CLI params). +ERST + DEF("fda", HAS_ARG, QEMU_OPTION_fda, "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL) DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL) diff --git a/softmmu/vl.c b/softmmu/vl.c index 6c68f123..95fd30aa 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3552,6 +3552,7 @@ void qemu_init(int argc, char **argv) qsp_enable(); break; case QEMU_OPTION_nouserconfig: + case QEMU_OPTION_enable_dpdk: /* Nothing to be parsed here. Especially, do not error out below. */ break; default: -- 2.30.2