From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 07F072C3F for ; Thu, 30 Nov 2017 03:59:23 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id k134so2419847pga.3 for ; Wed, 29 Nov 2017 18:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XAp/i9dHnOPv6lyani/e1ED58kVQtGSfpgsaGmNRbdI=; b=Pk6jSeO2VwKsdN0Agl/cNllGCdnrjMhVDv/fob4M23Gf7c0iSRvbPRIGfNKTK0GtSS uGt3Is6LzKaULqwnuw+kkNg58iku+Nt8FAORPaFxhYMP7jjHApttByXS5MkEMNUYmife R9D3BhGLi4+l/qcT2pcHQqJZ7LTNZTPex3Ok2yyUGabnPMZdECYxC3PNKH+g6PxMwBRu qqp+Weo3xamoEMYtgSvY00WhOF11PnX7CGjhMu7zLY3q6zT6Ki/L0kyyJwNKjRCBxh6G PS/hYPs6rNE63WvZxQP+awrhtArfJ2X/cVnY+7oLT6dWCd54A76UNq4wm29oEoS1yWnh NI1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XAp/i9dHnOPv6lyani/e1ED58kVQtGSfpgsaGmNRbdI=; b=cwnE3Qq9zPilD9WSM6HRm/NovWJTQIHQrgal3TpPQU1A5jbHpyufa3SuhxXazY+Aee 3m6BP2ZivTveZ5SpDYsMAfvSjvNKkiOi/bDp2r5jNECzjEsCIhLLTk26FX33p0SLsdSt sfr4xU5owQs1EP0hyBkjEm9rZXJe75LqDtAADYHA7Mco/xf7xVcsW0kxVJaKxWHUW+iK ITv3aVN8zVDiS0PGiWLPGGq+ISa6fDsBCg3q989kGvQo5DyOurl6CbHZNyUpKr+V8SOV obx2ygEyFPPbAr6amJ4LoqaUFAZfxW/QZ3ehAXkju4KFRqVXiJCJldwvDgQIMHMujTLy 32Ag== X-Gm-Message-State: AJaThX46Fyuztk4erzMJf86JMv9HphfQOMHPqYH81tuqCkq3HRBB6v4C Ta9qKwY8wa5JSLBAQfCiQYA/xg== X-Google-Smtp-Source: AGs4zMaBJpvGUyTsgHWPY2bMKopjEQF0BAXpyKtuzMQH5le2aQARgXGq7K+fnIp2Urwp8seljSdK/w== X-Received: by 10.101.98.83 with SMTP id q19mr959925pgv.71.1512010762194; Wed, 29 Nov 2017 18:59:22 -0800 (PST) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id 140sm4569535pgd.85.2017.11.29.18.59.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Nov 2017 18:59:21 -0800 (PST) Date: Wed, 29 Nov 2017 18:59:14 -0800 From: Stephen Hemminger To: Xiao Wang Cc: dev@dpdk.org, yliu@fridaylinux.org Message-ID: <20171129185914.58c4d3b3@xeon-e3> In-Reply-To: <1511521440-57724-2-git-send-email-xiao.w.wang@intel.com> References: <1511521440-57724-1-git-send-email-xiao.w.wang@intel.com> <1511521440-57724-2-git-send-email-xiao.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Thu, 30 Nov 2017 02:59:23 -0000 On Fri, 24 Nov 2017 03:03:59 -0800 Xiao Wang wrote: > @@ -184,8 +186,10 @@ struct rte_virtio_xstats_name_off { > "vq->hw->cvq = %p vq = %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)) { You ndon't need so many paranthesis. if (vq->vq_free_cnt < pkt_num + 2 || pkt_num < 1)