From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 887D458F7 for ; Thu, 15 Jan 2015 17:54:16 +0100 (CET) Received: by mail-pd0-f175.google.com with SMTP id g10so17264103pdj.6 for ; Thu, 15 Jan 2015 08:54:15 -0800 (PST) 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=h17SL79n6YgDz89tUH8RBPGR+1xhgzsBcpBMbfev5a8=; b=CSyJxteIeXrHEGkyf68rGVf2ikNbOn3fYrtVgx2/EIWQc8564n85Fv1PEcMC56y/hO 82dzeBTAt1XqVArQ/QFQRudXTgBvRYTGxpEobCokw6VEoAXixwZYA7diIsD8/chGOk2V kxQrZoqA+GOPYubjk4gC49pvGAr+y0mdwomwbF7VEVbPxxTB0qiux/aYxnfw84UCiusk gB5P6s0Q1UZYc8sKUoSvhhmxjFnQsVnO3/9wOg3bAXSkCy3QAGHJW1YEfebu/psF+MNt olTRWaJv0Gm32fdFYekM4wdZgR7g/u02eMOLf7IbA0KC7Axs5Uy6K0WJokU9Jl2iapsc Ykcw== X-Gm-Message-State: ALoCoQnyn7NmEytUZSj/HJQQ+PH2RKfmc5akP2O1JjCZav+x8cOywgJ2p1ydPvPiOuhBZq0UCzJw X-Received: by 10.68.212.229 with SMTP id nn5mr15528421pbc.52.1421340855775; Thu, 15 Jan 2015 08:54:15 -0800 (PST) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id c9sm1910027pdj.52.2015.01.15.08.54.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 08:54:15 -0800 (PST) Date: Thu, 15 Jan 2015 08:54:02 -0800 From: Stephen Hemminger To: Ouyang Changchun Message-ID: <20150115085402.4f418084@urahara> In-Reply-To: <1421298930-15210-19-git-send-email-changchun.ouyang@intel.com> References: <1421298930-15210-1-git-send-email-changchun.ouyang@intel.com> <1421298930-15210-19-git-send-email-changchun.ouyang@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 18/22] virtio: Fix descriptor index issue 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: Thu, 15 Jan 2015 16:54:17 -0000 On Thu, 15 Jan 2015 13:15:26 +0800 Ouyang Changchun wrote: > It should use vring descriptor index instead of used_ring index to index vq_descx. > > Signed-off-by: Changchun Ouyang > --- > lib/librte_pmd_virtio/virtio_rxtx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c b/lib/librte_pmd_virtio/virtio_rxtx.c > index 12c2310..2529dc4 100644 > --- a/lib/librte_pmd_virtio/virtio_rxtx.c > +++ b/lib/librte_pmd_virtio/virtio_rxtx.c > @@ -144,9 +144,9 @@ virtio_xmit_cleanup(struct virtqueue *vq, uint16_t num) > > used_idx = (uint16_t)(vq->vq_used_cons_idx & (vq->vq_nentries - 1)); > uep = &vq->vq_ring.used->ring[used_idx]; > - dxp = &vq->vq_descx[used_idx]; > > desc_idx = (uint16_t) uep->id; > + dxp = &vq->vq_descx[desc_idx]; > vq->vq_used_cons_idx++; > vq_ring_free_chain(vq, desc_idx); > Rather than patching a code added by earlier patch in series, why not just fix/merge the two patches?