From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9BA8F2BE9 for ; Fri, 1 Dec 2017 02:38:46 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 17:38:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,343,1508828400"; d="scan'208";a="8183866" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 30 Nov 2017 17:38:45 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 17:38:44 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 17:38:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Fri, 1 Dec 2017 09:38:42 +0800 From: "Wang, Xiao W" To: Stephen Hemminger CC: "dev@dpdk.org" , "yliu@fridaylinux.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] net/virtio: make control queue thread-safe Thread-Index: AQHTZMuqtT4vBHf1hUyEBSYjNtbPiaMrvrQAgAH/8NA= Date: Fri, 1 Dec 2017 01:38:42 +0000 Message-ID: References: <1511521440-57724-1-git-send-email-xiao.w.wang@intel.com> <1511521440-57724-2-git-send-email-xiao.w.wang@intel.com> <20171129185914.58c4d3b3@xeon-e3> In-Reply-To: <20171129185914.58c4d3b3@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzg0NzhmOTgtYTYwYy00M2U1LTg0YjktNzMzZWJlYjQxYWMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJNWHorYnM5azVucEl0cFlQRVNST1BGWnZCOEtpaFlPQWIwWE40aDdndm1EK3BKU3NwUE9Vd3R0OWlXSGhjWWRHIn0= 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 1/2] 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: Fri, 01 Dec 2017 01:38:47 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Thursday, November 30, 2017 10:59 AM > To: Wang, Xiao W > Cc: dev@dpdk.org; yliu@fridaylinux.org > Subject: Re: [dpdk-dev] [PATCH 1/2] net/virtio: make control queue thread= - > safe >=20 > On Fri, 24 Nov 2017 03:03:59 -0800 > Xiao Wang wrote: >=20 > > @@ -184,8 +186,10 @@ struct rte_virtio_xstats_name_off { > > "vq->hw->cvq =3D %p vq =3D %p", > > vq->vq_desc_head_idx, status, vq->hw->cvq, vq); > > > > - if ((vq->vq_free_cnt < ((uint32_t)pkt_num + 2)) || (pkt_num < 1)) > > + if ((vq->vq_free_cnt < ((uint32_t)pkt_num + 2)) || (pkt_num < 1)) { >=20 > You ndon't need so many paranthesis. > if (vq->vq_free_cnt < pkt_num + 2 || pkt_num < 1) Yes, it looks better. Will change it in v2. Thanks, Xiao