From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79B09A04F7 for ; Wed, 25 Dec 2019 05:50:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA8941BF75; Wed, 25 Dec 2019 05:49:58 +0100 (CET) Received: from valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by dpdk.org (Postfix) with ESMTP id B3CE11B203 for ; Wed, 25 Dec 2019 05:49:57 +0100 (CET) Received: by valinux.co.jp (Postfix, from userid 1000) id 76115240D08; Wed, 25 Dec 2019 13:49:56 +0900 (JST) From: Itsuro Oda To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Wed, 25 Dec 2019 13:49:53 +0900 Message-Id: <20191225044954.3600-12-oda@valinux.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191225044954.3600-1-oda@valinux.co.jp> References: <20191223050036.30765-1-oda@valinux.co.jp> <20191225044954.3600-1-oda@valinux.co.jp> Subject: [spp] [PATCH v2 11/12] spp_nfv: exclude vhosts at process initialization X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" 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 --- 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