[spp] [PATCH v3 11/12] spp_nfv: exclude vhosts at process initialization

Itsuro Oda oda at valinux.co.jp
Fri Jan 10 00:10:25 CET 2020


A vhost device is shared among the primary process and secondary
processes. When a secodary process starts it recognizes vhost
devices if they are used by processes already started. It is not
appropriate to include to port information as PHY devices.

Signed-off-by: Itsuro Oda <oda at valinux.co.jp>
---
 src/nfv/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/nfv/main.c b/src/nfv/main.c
index 513a98d..f2c6bfc 100644
--- a/src/nfv/main.c
+++ b/src/nfv/main.c
@@ -211,7 +211,12 @@ main(int argc, char *argv[])
 		if (port_type == PHY) {
 			port_id = nof_phy_port;
 			nof_phy_port++;
-		}
+		} else if (port_type == VHOST)
+			continue;
+		/* NOTE: vhost may be used another process. even if no
+		 * process uses, it is necessary to "add vhost" explicitly.
+		 * not display to avoid confusion.
+		 */
 
 		/* Update ports_fwd_array with phy port. */
 		ports_fwd_array[i].in_port_id = i;
-- 
2.17.1



More information about the spp mailing list