From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v6 1/3] net/virtio: make control queue thread-safe Date: Mon, 8 Jan 2018 21:06:41 +0800 Message-ID: <20180108130641.GO8818@yliu-mob> References: <20180107120513.142196-1-xiao.w.wang@intel.com> <20180107120513.142196-2-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 D09731B16C for ; Mon, 8 Jan 2018 14:06:49 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180107120513.142196-2-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:11AM -0800, Xiao Wang wrote: > diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h > index 54f1e849b..71b5798b0 100644 > --- a/drivers/net/virtio/virtio_rxtx.h > +++ b/drivers/net/virtio/virtio_rxtx.h > @@ -84,6 +84,7 @@ struct virtnet_ctl { > rte_iova_t virtio_net_hdr_mem; /**< hdr for each xmit packet */ > uint16_t port_id; /**< Device port identifier. */ > const struct rte_memzone *mz; /**< mem zone to populate CTL ring. */ > + rte_spinlock_t sl; /**< spinlock for control queue. */ It's weird to name it "sl". The typical naming is just "lock". --yliu