From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6D6CD20C14; Mon, 8 Jan 2018 08:03:53 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 08 Jan 2018 08:03:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=+VpBI6vdyZyTRyTPsrsch+L9LPbE/+c/scv0z2lE9Ok=; b=nk3TPKWI VZ24tG7xvOxYRCdsj7ALcMzI6wXjZGX7OQR0o7TkZ8sWg7CT0v8O1ohideRtcByU DzSfSj5VJPiB6rxv4aPXxHL8FPvQV3hEuivTtAYFKiel73a6mx2AYXtRNZgsgBzZ EHV9jXYZXoROswp/Xv7t+z5I0elPp+iTMZMtMfGWcrtsXrMrcwdGqD/GOtNmxFYY 7hS9KJ6MvPt1vzDYBfSxksNkvM3L9WCEJxTnGYOTmVqW5Qj179xVjLv7Kjw+hzh7 wrYazP12nct8XGCfaVAWdoMB6Vxse/lBZQmqHM7Sd+7oeurvJ8M2OqE7AHLDPUNe XyqSwU4zWEmxZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=+VpBI6vdyZyTRyTPsrsch+L9LPbE/ +c/scv0z2lE9Ok=; b=iPgHV5zoU7cA2ch8AsTCd2NBVtm3GbRiCCCaXlKbsMFfc kjLU2y1fi9as4ymFE1mqXZiFYkFflaUMsvPVeHZ3g9FoMnrpuSgY2KKSKs2UpSwr zEF9f/9ECL9DP0suNnIfGeTogSQ/EdKOtaNaTL0MId2nk2ooB/HcZIqrCgzW9zVS X5eyoUzEHf3SrGVckTNN0iesGB4akzYYFguvTW0fAZHS2TImqgMVtwQUeZbqDeO7 CW6zK2BqHTLB8Q/ndqlTYJ/zEwpMyPkHnmoYsp44R+1NZeob6nqSr5LSGCEfHMZq AyIbvJ+aPi4GojUbQJ9Tv5pSJtdALCQSLiVWF8Arw== X-ME-Sender: Received: from yliu-mob (unknown [115.150.10.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 01A4424600; Mon, 8 Jan 2018 08:03:49 -0500 (EST) Date: Mon, 8 Jan 2018 21:03:34 +0800 From: Yuanhan Liu To: Xiao Wang Cc: tiwei.bie@intel.com, dev@dpdk.org, stephen@networkplumber.org 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 Content-Disposition: inline In-Reply-To: <20180107120513.142196-3-xiao.w.wang@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v6 2/3] net/virtio: add packet injection method 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: Mon, 08 Jan 2018 13:03:54 -0000 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; > };