From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id 314DD8DA8 for ; Mon, 19 Oct 2015 06:17:50 +0200 (CEST) Received: by pabrc13 with SMTP id rc13so178002069pab.0 for ; Sun, 18 Oct 2015 21:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=RRsRdCYYVLD7lAhXszz8Irtp+8hqnIgb7dJDurf9wz4=; b=O3usR+QBeXyjkOKwcR64m875eG37B9kHcUsikGkWIHQFRmZNa4CzhejI7wxCUztSHQ bhuf/oeOnlymo+Xbjwif1ryKciC9TPvkRyawXhWqGb5CP5nLh301Y8BbLreHYyt4oqjS l3nAXerUfklTnCROcWMM9sgorxvNBYEbqHI99NAy+8RVYYTVe71dHd4fZqgvKc+ebQcr xu+bzG7xXUJSXv3XwSMqDtDsneL3xQQCK5liVfmLBbTql1tigMixgZse8JfU0Xjc6K/i J/Wzl8KUVDvCHPDENV98Z8fBb/eHwCGuGfB7K0Ojt3WtnHQjaizOgnsdgWQYH0VFkH3Y 6GFA== X-Gm-Message-State: ALoCoQleNgt/k9jy1Gj8BYD4m6abcOPwvR8YxJnwQLnwtcJtrSPXJ88WmqRpSADsYeLfgBVc5iMm X-Received: by 10.68.143.4 with SMTP id sa4mr31728363pbb.111.1445228269424; Sun, 18 Oct 2015 21:17:49 -0700 (PDT) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id u10sm33414251pbs.63.2015.10.18.21.17.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 21:17:49 -0700 (PDT) Date: Sun, 18 Oct 2015 21:18:00 -0700 From: Stephen Hemminger To: Huawei Xie Message-ID: <20151018211800.30f4900c@xeon-e3> In-Reply-To: <1445149744-3217-7-git-send-email-huawei.xie@intel.com> References: <1443537953-23917-1-git-send-email-huawei.xie@intel.com> <1445149744-3217-1-git-send-email-huawei.xie@intel.com> <1445149744-3217-7-git-send-email-huawei.xie@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 04:17:50 -0000 On Sun, 18 Oct 2015 14:29:03 +0800 Huawei Xie wrote: > + > + for (i = 1; i < VIRTIO_TX_FREE_NR; i++) { > + m = (struct rte_mbuf *)vq->vq_descx[desc_idx++].cookie; > + if (likely(m->pool == free[0]->pool)) > + free[nb_free++] = m; > + else { > + rte_mempool_put_bulk(free[0]->pool, (void **)free, > + nb_free); > + free[0] = m; > + nb_free = 1; > + } > + } This assumes all transmits are from the same pool, which is not necessarily true.