From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 757BC1B040 for ; Mon, 8 Jan 2018 16:25:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2018 07:25:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,330,1511856000"; d="scan'208";a="17590563" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 08 Jan 2018 07:25:32 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 07:25:32 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 Jan 2018 07:25:31 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Mon, 8 Jan 2018 23:25:30 +0800 From: "Wang, Xiao W" To: Yuanhan Liu CC: "Bie, Tiwei" , "dev@dpdk.org" , "stephen@networkplumber.org" Thread-Topic: [PATCH v6 1/3] net/virtio: make control queue thread-safe Thread-Index: AQHTh2fG5BKWQNiZxE6e6PcY/FTW76NpbiCAgACsXJA= Date: Mon, 8 Jan 2018 15:25:29 +0000 Message-ID: References: <20180107120513.142196-1-xiao.w.wang@intel.com> <20180107120513.142196-2-xiao.w.wang@intel.com> <20180108130641.GO8818@yliu-mob> In-Reply-To: <20180108130641.GO8818@yliu-mob> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjc4NmNhYzEtYmVkOC00ODRhLTliMDUtM2E3MGQ2ZTMyNTE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJlMnhvZHMyK1NqNHNGNk9LXC83ZEg4NTY4R0h0V3haZ1JNbzZYUEhVWjIyQ0RJaUIwUlJLMWJ2ZHpYa0VTcHFnayJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 15:25:33 -0000 Hi, > -----Original Message----- > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > Sent: Monday, January 8, 2018 9:07 PM > To: Wang, Xiao W > Cc: Bie, Tiwei ; dev@dpdk.org; > stephen@networkplumber.org > Subject: Re: [PATCH v6 1/3] net/virtio: make control queue thread-safe >=20 > 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/virt= io_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. */ >=20 > It's weird to name it "sl". The typical naming is just "lock". >=20 > --yliu I'm open to the naming method, but you can see that: struct rte_mempool_ops_table also has a "sl" field. BRs, Xiao