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 1F60942363 for ; Thu, 12 Oct 2023 15:50:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19AB240695; Thu, 12 Oct 2023 15:50:19 +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 658A64064C for ; Thu, 12 Oct 2023 15:50:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697118615; 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: in-reply-to:in-reply-to:references:references; bh=ccmc/h+fIEqe3b6beQ7tnmSHUxLKuEtEARQUiJOcSdk=; b=BeDJ5fofMt3f7RAb1I4YDMo2clgz5wugYWYbUmfvXqDKrf0XTxhaj71g3dZowak3PVc37D GLM7GgwltNOR3LMaWg8043Sf4J9KutMc7MdM0muFTOh6Kz1BqeZLdyUNLqhnINqku2gq8+ 9eyoWiU3I9nih5KJOi8+0geV2aCxAYM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-332-L-SaTY6hPUyvyZf9WbMB8g-1; Thu, 12 Oct 2023 09:50:12 -0400 X-MC-Unique: L-SaTY6hPUyvyZf9WbMB8g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A09B800C7F; Thu, 12 Oct 2023 13:50:12 +0000 (UTC) Received: from [10.39.208.36] (unknown [10.39.208.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8251A25C0; Thu, 12 Oct 2023 13:50:10 +0000 (UTC) Message-ID: <57c9fad5-8338-c6c4-4a8d-ec064b219b0a@redhat.com> Date: Thu, 12 Oct 2023 15:50:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] net/virtio: fix descriptors buffer addresses on 32 bits builds To: dev@dpdk.org, rmelton@cisco.com, davejo@cisco.com, speechu@cisco.com, chenbo.xia@outlook.com, mbumgard@cisco.com, cbrezove@cisco.com, david.marchand@redhat.com Cc: stable@dpdk.org References: <20230920130147.1567735-1-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: <20230920130147.1567735-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 9/20/23 15:01, Maxime Coquelin wrote: > With Virtio-user, the Virtio descriptor buffer address is the > virtual address of the mbuf's buffer. On 32 bits builds, it is > expected to be 32 bits. > > With Virtio-PCI, the Virtio descriptor buffer address is the > physical address of the mbuf's buffer. On 32 bits builds running > on 64 bits kernel, it is expected to be up to 64 bits. > > This patch introduces a new mask field in virtqueue's struct to > filter our the upper 4 bytes of the address only when necessary. > An optimization is introduced for 64 bits builds to remove the > masking, as the address is always 64 bits wide. > > Fixes: ba55c94a7ebc ("net/virtio: revert forcing IOVA as VA mode for virtio-user") > Cc: stable@dpdk.org > > Reported-by: Sampath Peechu > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtqueue.c | 2 ++ > drivers/net/virtio/virtqueue.h | 18 ++++++++++++++---- > 2 files changed, 16 insertions(+), 4 deletions(-) > Applied to nex-virtio/for-next-net. Thanks, Maxime