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 0097D45610; Fri, 12 Jul 2024 13:30:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE6F340653; Fri, 12 Jul 2024 13:30:16 +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 26433402E5 for ; Fri, 12 Jul 2024 13:30:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720783814; 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=LMayaCSOHxWLUv5+jWr0/e9uVcQQpnIU26Glk6tJlAU=; b=Hf5/SsQffV700Pmv32ElKa+b9YuG2GAjxzS9N+0NAGOfJdh5ck7AGb0EKZWENRtteA4X+/ CoGLohnwea57m/asDs/U52zBj15RMbe4Gu5VLnALG7AnVl73fg9dtSfwC7K/XwbjPBwAfU /Ej8O5sOHGecKMYTRIRCO/7NMyOftQg= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-0mRweEJnPbaiFhB5xr8WfQ-1; Fri, 12 Jul 2024 07:30:13 -0400 X-MC-Unique: 0mRweEJnPbaiFhB5xr8WfQ-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-52ebdb0ef28so2683262e87.0 for ; Fri, 12 Jul 2024 04:30:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720783812; x=1721388612; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LMayaCSOHxWLUv5+jWr0/e9uVcQQpnIU26Glk6tJlAU=; b=YoPDF3NwsKI4Hr9y7igMPyWT0J7GgkJM3RQTANNZtYJRshRkv1bv8aatqSh6M6SrBE +blct6Gwz7tpU6oztUaIBC1BAI3LWQ+FWPe1BCeeTIkKhd+JFM/PAZsZkm+xn0QYwXa5 9Vhk9gYUTfmWLTCdJ5+1QT3KixRd7CAJsW1+SSdxzXjOzFSs1sJI/BYW1FtTYbxP0BOg IrJ/+qg0A64psLTfgvCIMzGxAT0dJk2451FuKJf1DLkcfPpqsQ9Jf+k5AVKT+o+gyEIG HehwQVbkltjqtM2GjKzBXzZbXnCjyLQpzIYrFixKwuhw7ULIoHvUvFNX/YPM+i5HTMFj hY4A== X-Gm-Message-State: AOJu0YzK3wYRPUeg4Wn8t3iYZv0Nlu+68lSwNHJ6WHrsZZ+GWbTXdN0l optqcAPjKABYt0ULgpB1fxK9Yyea2hgkXazlawRdiRx3olQxKA6q0K6z+uFIPpV3Z8WdXiIp1ge dRJuPR66/JHdb7vDX+w1eEWRn8uQpHleNmr8kUYDmmkx+GFQFNn3kjjT4jyVCK+gPXyq9oPh+OO JXEpADRZtluYdjfwA= X-Received: by 2002:a2e:87ce:0:b0:2ec:5933:a62c with SMTP id 38308e7fff4ca-2eeb30e3a18mr87847241fa.22.1720783812129; Fri, 12 Jul 2024 04:30:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+ofrtoTxi/HUsmUeslqjgOjExTYXTyq188hxuZNOd7C4s7MEBH8tPBJWydmWa+jF7LrJztcI8Zk08isTjPqM= X-Received: by 2002:a2e:87ce:0:b0:2ec:5933:a62c with SMTP id 38308e7fff4ca-2eeb30e3a18mr87847071fa.22.1720783811762; Fri, 12 Jul 2024 04:30:11 -0700 (PDT) MIME-Version: 1.0 References: <20240711124436.2383232-1-schalla@marvell.com> In-Reply-To: From: David Marchand Date: Fri, 12 Jul 2024 13:30:00 +0200 Message-ID: Subject: Re: [EXTERNAL] Re: [PATCH v2] net/virtio_user: fix issue with converting cq descriptor IOVA address to VA To: Srujana Challa Cc: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "chenbox@nvidia.com" , Jerin Jacob , Nithin Kumar Dabilpuram , Vamsi Krishna Attunuru X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, Jul 11, 2024 at 7:46=E2=80=AFPM Srujana Challa wrote: > > -virtio_user_iova2virt(rte_iova_t iova) > > +virtio_user_iova2virt(struct virtio_user_dev *dev, rte_iova_t iova) > > > > > { > > > - if (rte_eal_iova_mode() =3D=3D RTE_IOVA_VA) > > > - return (void *)(uintptr_t)iova; > > > - else > > > + if (rte_eal_iova_mode() =3D=3D RTE_IOVA_PA && !use_va) > > > return rte_mem_iova2virt(iova); > > > + else > > > + return (void *)(uintptr_t)iova; > > > > Why do we need to invert this test? > Made this change to ensure that rte_mem_iova2virt() is not called when th= e IOVA mode is RTE_IOVA_DC > by any chance. Just repeating what I replied in the other thread as I see it was suggested by Jerin. It is not possible iova mode =3D=3D RTE_IOVA_DC. --=20 David Marchand