From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3269A0032; Tue, 12 Jul 2022 12:05:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CA7741109; Tue, 12 Jul 2022 12:05:01 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0718E410EF for ; Tue, 12 Jul 2022 12:04:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657620299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6SU1ElXwpibNDYYX9vk/BXhBaO3D1NuLa0zEsCovVWc=; b=Kqhg2B4THte2kLa040vbhli6cmH1MK1PllRNH8dZH1qRNOUVoE64JwD1mSsmhYKBMqVly+ KJXTZw06Tr9ymEiAl3lI6xiOprBijlDbM8YWQ5GANaiN2Oj8Fuj3XxYcGfTHGd7SyEw2+a EH0AvkN36Ds68v4rvURgzCAjHURk4tU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-rxQ21bUFMRu7vO2yxj2X1Q-1; Tue, 12 Jul 2022 06:04:50 -0400 X-MC-Unique: rxQ21bUFMRu7vO2yxj2X1Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 392F429ABA11; Tue, 12 Jul 2022 10:04:50 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07DB72166B26; Tue, 12 Jul 2022 10:04:48 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, yux.jiang@intel.com, thomas@monjalon.net, david.marchand@redhat.com Cc: Maxime Coquelin Subject: [PATCH] vhost: fix missing copy length in batched copies Date: Tue, 12 Jul 2022 12:04:47 +0200 Message-Id: <20220712100447.104162-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch fixes missing the assignement of the copy length when doing batched copies in the sync dequeue path. Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging") Suggested-by: Chenbo Xia Signed-off-by: Maxime Coquelin --- lib/vhost/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 12b7fbe7f9..35fa4670fd 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -1127,13 +1127,13 @@ sync_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq, batch_copy[vq->batch_copy_nb_elems].src = rte_pktmbuf_mtod_offset(m, void *, mbuf_offset); batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova; - batch_copy[vq->batch_copy_nb_elems].len = cpy_len; } else { batch_copy[vq->batch_copy_nb_elems].dst = rte_pktmbuf_mtod_offset(m, void *, mbuf_offset); batch_copy[vq->batch_copy_nb_elems].src = (void *)((uintptr_t)(buf_addr)); } + batch_copy[vq->batch_copy_nb_elems].len = cpy_len; vq->batch_copy_nb_elems++; } } -- 2.35.3