From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CB6501B327 for ; Wed, 14 Feb 2018 15:53:38 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 06:53:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,512,1511856000"; d="scan'208";a="17661426" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by fmsmga007.fm.intel.com with ESMTP; 14 Feb 2018 06:53:36 -0800 From: Zhiyong Yang To: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, jianfeng.tan@intel.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dong1.wang@intel.com, Zhiyong Yang Date: Wed, 14 Feb 2018 22:53:28 +0800 Message-Id: <20180214145330.4679-3-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180214145330.4679-1-zhiyong.yang@intel.com> References: <20180214145330.4679-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 2/4] net/virtio-user: add data members to support server mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 14:53:39 -0000 Add data members so as to support server mode. Signed-off-by: Zhiyong Yang --- drivers/net/virtio/virtio_user/virtio_user_dev.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h index 64467b4f9..e640a3438 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.h +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h @@ -6,13 +6,21 @@ #define _VIRTIO_USER_DEV_H #include +#include #include "../virtio_pci.h" #include "../virtio_ring.h" #include "vhost.h" +#include "fd_man.h" struct virtio_user_dev { /* for vhost_user backend */ int vhostfd; + int listenfd; /* listening fd */ + bool connected; /* connection status */ + + /* support for server/clinet mode */ + bool is_server; + struct fdset fdset; /* for vhost_kernel backend */ char *ifname; -- 2.13.3