From patchwork Mon Apr 30 09:35:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 39164 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 5DA7CFFA; Mon, 30 Apr 2018 11:36:09 +0200 (CEST) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id B9F6BDD2; Mon, 30 Apr 2018 11:36:04 +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 3D338401DEA7; Mon, 30 Apr 2018 09:36:04 +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 09BCD111DCE5; Mon, 30 Apr 2018 09:36:02 +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:22 +0200 Message-Id: <20180430093523.12495-2-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.6]); Mon, 30 Apr 2018 09:36:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 30 Apr 2018 09:36:04 +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 1/2] examples/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. Coverity issue: 277240 Fixes: 82c93a567d3b ("examples/vhost: move to safe GPA translation API") Signed-off-by: Maxime Coquelin --- examples/vhost/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c index 5a965a346..8ea6b36d5 100644 --- a/examples/vhost/virtio_net.c +++ b/examples/vhost/virtio_net.c @@ -103,7 +103,7 @@ enqueue_pkt(struct vhost_dev *dev, struct rte_vhost_vring *vr, remain -= len; guest_addr += len; - dst += len; + src += len; } desc_chunck_len = desc->len - dev->hdr_len;