From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v6 2/3] net/virtio: add packet injection method Date: Mon, 8 Jan 2018 21:03:34 +0800 Message-ID: <20180108130334.GN8818@yliu-mob> References: <20180107120513.142196-1-xiao.w.wang@intel.com> <20180107120513.142196-3-xiao.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: tiwei.bie@intel.com, dev@dpdk.org, stephen@networkplumber.org To: Xiao Wang Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 005441B16A for ; Mon, 8 Jan 2018 14:03:53 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180107120513.142196-3-xiao.w.wang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Jan 07, 2018 at 04:05:12AM -0800, Xiao Wang wrote: > + /* > + * App management thread and virtio interrupt handler thread > + * both can change the 'started' flag, this lock is meant to > + * avoid such a contention. > + */ > + rte_spinlock_t state_lock; Why not turning the "started" to atomic type, so that you don't need the lock? --yliu > + struct rte_mbuf **inject_pkts; > > struct virtqueue **vqs; > };