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 611C8A04F7 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 C388F1BE90; 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 B74221BE85 for ; Wed, 25 Dec 2019 05:49:57 +0100 (CET) Received: by valinux.co.jp (Postfix, from userid 1000) id 94809240D0D; 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:54 +0900 Message-Id: <20191225044954.3600-13-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 12/12] spp_vf, spp_mirror: 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/shared/secondary/spp_worker_th/cmd_utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c index 010a4b6..69d7222 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.c +++ b/src/shared/secondary/spp_worker_th/cmd_utils.c @@ -437,8 +437,12 @@ init_host_port_info(void) p_iface_info->phy[port_id].ethdev_port_id = port_id; break; case VHOST: - p_iface_info->vhost[port_id].iface_type = port_type; - p_iface_info->vhost[port_id].ethdev_port_id = port_id; + /* NOTE: a vhost can be used by one process. + * even if it exists, it is necessary to do + * add_vhost_pmd to setup the device. + * note that it is user responsibility to prevent + * multipul processes use a vhost at the same time. + */ break; case RING: p_iface_info->ring[port_id].iface_type = port_type; -- 2.17.1