From patchwork Mon Apr 30 09:35:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 39165 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FD741DBC; Mon, 30 Apr 2018 11:36:12 +0200 (CEST) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 68573F3E; Mon, 30 Apr 2018 11:36:06 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01F39410FBB4; Mon, 30 Apr 2018 09:36:06 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A9D8111DCE5; Mon, 30 Apr 2018 09:36:04 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, jianfeng.tan@intel.com, tiwei.bie@intel.com, john.mcnamara@intel.com Cc: stable@dpdk.org, Maxime Coquelin Date: Mon, 30 Apr 2018 11:35:23 +0200 Message-Id: <20180430093523.12495-3-maxime.coquelin@redhat.com> In-Reply-To: <20180430093523.12495-1-maxime.coquelin@redhat.com> References: <20180430093523.12495-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 30 Apr 2018 09:36:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 30 Apr 2018 09:36:06 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: [dpdk-dev] [PATCH 2/2] vhost: fix header copy to discontiguous desc buffer 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In the loop to copy virtio-net header to the descriptor buffer, destination pointer was incremented instead of the source pointer. Fixes: fb3815cc614d ("vhost: handle virtually non-contiguous buffers in Rx-mrg") Fixes: 6727f5a739b6 ("vhost: handle virtually non-contiguous buffers in Rx") Cc: stable@dpdk.org Signed-off-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 5fdd4172b..eed6b0227 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -277,7 +277,7 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq, vhost_log_write(dev, guest_addr, len); remain -= len; guest_addr += len; - dst += len; + src += len; } } @@ -771,7 +771,7 @@ copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct vhost_virtqueue *vq, remain -= len; guest_addr += len; - dst += len; + src += len; } } else { PRINT_PACKET(dev, (uintptr_t)hdr_addr,