From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 3/4] spp_nfv: enable to add and del memif
Date: Mon, 27 Jan 2020 03:45:32 +0900 [thread overview]
Message-ID: <20200126184533.10762-4-yasufum.o@gmail.com> (raw)
In-Reply-To: <20200126184533.10762-1-yasufum.o@gmail.com>
This update is to enable spp_nfv to add and del while running.
Signed-off-by: Yasufumi Ogawa <yasufum.o@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
next prev parent reply other threads:[~2020-01-26 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-26 18:45 [spp] [PATCH 0/4] Add memif allocation for spp_primary adn spp_nfv Yasufumi Ogawa
2020-01-26 18:45 ` [spp] [PATCH 1/4] shared/sec: add function add_memif Yasufumi Ogawa
2020-01-26 18:45 ` [spp] [PATCH 2/4] spp_primary: enable to add and del memif Yasufumi Ogawa
2020-01-26 18:45 ` Yasufumi Ogawa [this message]
2020-01-26 18:45 ` [spp] [PATCH 4/4] cli: add completion for adding memif Yasufumi Ogawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200126184533.10762-4-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).