From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 16BDC7F2C for ; Wed, 8 Oct 2014 20:50:49 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by orsmga101.jf.intel.com with ESMTP; 08 Oct 2014 11:57:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,679,1406617200"; d="scan'208";a="482860701" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by azsmga001.ch.intel.com with ESMTP; 08 Oct 2014 11:57:47 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id s98Ivk5u023453; Thu, 9 Oct 2014 02:57:46 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s98IvhJL004540; Thu, 9 Oct 2014 02:57:45 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s98IvhIW004536; Thu, 9 Oct 2014 02:57:43 +0800 From: Huawei Xie To: dev@dpdk.org Date: Thu, 9 Oct 2014 02:54:58 +0800 Message-Id: <1412794499-4332-25-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1412794499-4332-1-git-send-email-huawei.xie@intel.com> References: <1412794499-4332-1-git-send-email-huawei.xie@intel.com> Subject: [dpdk-dev] [PATCH v6 24/25] lib/librte_vhost: add TODO/FIXME for identified issues. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2014 18:50:52 -0000 1) FIXME:concurrent calls to vhost set mem table from different guests could cause mem_temp to be overrided. 2) TODO:cmpset cost quite some cpu cyles. allow app to disable this feature if there is no contention in real workload. 3) FIXME:fix scatter gather mbuf copy to vhost vring chained buffers Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 1 + lib/librte_vhost/vhost_rxtx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index e5875eb..91ff0d8 100644 --- a/lib/librte_vhost/vhost-net-cdev.c +++ b/lib/librte_vhost/vhost-net-cdev.c @@ -214,6 +214,7 @@ vhost_net_ioctl(fuse_req_t req, int cmd, void *arg, break; case VHOST_SET_MEM_TABLE: + /*TODO fix race condition.*/ LOG_DEBUG(VHOST_CONFIG, "(%"PRIu64") IOCTL: VHOST_SET_MEM_TABLE\n", ctx.fh); static struct vhost_memory mem_temp; diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index 2a1171a..84ec0e8 100644 --- a/lib/librte_vhost/vhost_rxtx.c +++ b/lib/librte_vhost/vhost_rxtx.c @@ -93,6 +93,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, res_end_idx = res_base_idx + count; /* vq->last_used_idx_res is atomically updated. */ + /* TODO: Allow to disable cmpset if no concurrency in application. */ success = rte_atomic16_cmpset(&vq->last_used_idx_res, res_base_idx, res_end_idx); } while (unlikely(success == 0)); @@ -146,6 +147,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, vq->used->ring[res_cur_idx & (vq->size - 1)].len = packet_len; /* Copy mbuf data to buffer */ + /* FIXME for sg mbuf and the case that desc couldn't hold the mbuf data */ rte_memcpy((void *)(uintptr_t)buff_addr, rte_pktmbuf_mtod(buff, const void *), rte_pktmbuf_data_len(buff)); -- 1.8.1.4