[spp] [PATCH 3/4] spp_nfv: enable to add and del memif
Yasufumi Ogawa
yasufum.o at gmail.com
Sun Jan 26 19:45:32 CET 2020
This update is to enable spp_nfv to add and del while running.
Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
src/nfv/commands.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/nfv/commands.h b/src/nfv/commands.h
index 7e50c8c..e5b25be 100644
--- a/src/nfv/commands.h
+++ b/src/nfv/commands.h
@@ -41,6 +41,12 @@ do_del(char *p_type, int p_id)
return -1;
dev_detach_by_port_id(port_id);
+ } else if (!strcmp(p_type, "memif")) {
+ port_id = find_port_id(p_id, MEMIF);
+ if (port_id == PORT_RESET)
+ return -1;
+ dev_detach_by_port_id(port_id);
+
} else if (!strcmp(p_type, "nullpmd")) {
port_id = find_port_id(p_id, NULLPMD);
if (port_id == PORT_RESET)
@@ -78,6 +84,10 @@ do_add(char *p_type, int p_id)
type = PCAP;
res = add_pcap_pmd(p_id);
+ } else if (!strcmp(p_type, "memif")) {
+ type = MEMIF;
+ res = add_memif_pmd(p_id);
+
} else if (!strcmp(p_type, "nullpmd")) {
type = NULLPMD;
res = add_null_pmd(p_id);
--
2.17.1
More information about the spp
mailing list