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 D09731B16C for ; Mon, 8 Jan 2018 14:06:49 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 70E2E20D96; Mon, 8 Jan 2018 08:06:49 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 08 Jan 2018 08:06:49 -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=m5zMDRqaXw/TXWHrxtwJN1e902F1vVOE1R/LWXOGn9A=; b=L1azdi4t uOpyfp0ZC6rriSxR9DJZvYl+vYN6dsRxvC9cmWw9zQDVF6a2qL6C8WUocGj4BTvX DdXKJJf1N6qk2imASxz8Q9iIEF2y6Sby4E47fyFypTvMqbIKS8rkk0c5ds/8z3OG Zo6B6NLI9U3RvVpBoAi1M6Z72kSuIm8nOLwarSopT/o3Ahj0SYJGwVpquBRofOxT 7GS5knovmovcxJGHMgDQXlZtzovYvFD/SANXTR5M00WC3Cnx9ems5mTPUIjW5Bwb OZKh/STaA9SOJKJ0sf3RdVMgWAzpYjkjJlwBtjbhM1SO3DWTopYSnyDWcZhiIzV+ NaQda2+IgBftLQ== 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=m5zMDRqaXw/TXWHrxtwJN1e902F1v VOE1R/LWXOGn9A=; b=GclCzJYj7S3SbgIaZnr5+xFPGz1Djiaw02idu7QzRHqp3 QGAjCDvKrI3tITUSRY8s7Uj1GFhy86g27Il7ufUvG2qwIMWSEWNCgrgJXmhtLix1 5f85uydElzJP+LrIMlXzAz29rwsWMR9yfdYeHx1B6XG/Oh2kJFySy1KvCNDhtEot gqcKKtjHI/VcweNiACVpPwpON9O5TzE/WqrtsqEMWJo7+e+hyEWlmZW/+TA1njHQ zW87zkp8vFxTw6TD0IXTeOzEtme62wJ5FvZwgtztemSq80nqT5C+6u9jvu1BKIoL FnMQ4P6tpwfUkLSBezLMdpn5eXK98lBhHfrljU6WQ== X-ME-Sender: Received: from yliu-mob (unknown [115.150.10.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B8E57E3D4; Mon, 8 Jan 2018 08:06:47 -0500 (EST) Date: Mon, 8 Jan 2018 21:06:41 +0800 From: Yuanhan Liu To: Xiao Wang Cc: tiwei.bie@intel.com, dev@dpdk.org, stephen@networkplumber.org 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 Content-Disposition: inline In-Reply-To: <20180107120513.142196-2-xiao.w.wang@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v6 1/3] net/virtio: make control queue thread-safe 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:06:50 -0000 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