From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 433E9C606BD for ; Mon, 8 Jul 2019 18:39:42 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 084BE217F4 for ; Mon, 8 Jul 2019 18:39:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 084BE217F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71E851B953; Mon, 8 Jul 2019 20:39:40 +0200 (CEST) Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id A1C751B951 for ; Mon, 8 Jul 2019 20:39:39 +0200 (CEST) Received: by mail-vs1-f66.google.com with SMTP id v129so8889595vsb.11 for ; Mon, 08 Jul 2019 11:39:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a9YTxW0C/ZRv3/gViWr3gNYqDtspQGlNyUlOzlIiXcA=; b=BUS0TmK0F1GEX8mCSAZQXxY1RRRwGufcUqdU90GuBz/IleEZl3RC8gwzvLBeiYr8hm mKayqT6Teraz2fGw2IitsR1Bnf2oi3OShrN9f55e0nvTxV+ciMs7CbwK+AQyPoqww0db 0E9qDQJ63a77V5bGpdcJ7BkFRiIeGwKIe1kHH+KV7caKD3//AALXBSD4yjfuoo759cH6 Pud1Lmhcg+NDn8++t7qDb+UvMiF00LW8bGzAhAh1Aj+31fdeGZKB/ry4ErgG/s2gYRVo pZyNnSMmDCrSH/5AMpU1hTA5/X+/vhE5JUnciCjtYoV9JCV28MGVHzj3WS4Dc/1Wx6Jn vWpQ== X-Gm-Message-State: APjAAAUC+d09P5YjPJNs4RxWbQ1jTV2fBA0kZmnF3kzx76R/Y96vL423 IpWSJ14d1x43qYFlUrL4oFlmCeHHeHFfkkxnAzlInQ== X-Google-Smtp-Source: APXvYqxkPGAZOHg6toB0wQcVjZYU8LQFWi6nHuNWFHgasuhViC8nKpQP1Ld7TX0Ps2D+zS3rRyxOXJXZNhfL8PjQIAw= X-Received: by 2002:a67:d81b:: with SMTP id e27mr9814606vsj.198.1562611179022; Mon, 08 Jul 2019 11:39:39 -0700 (PDT) MIME-Version: 1.0 References: <20190708142450.51597-1-jerinj@marvell.com> In-Reply-To: <20190708142450.51597-1-jerinj@marvell.com> From: David Marchand Date: Mon, 8 Jul 2019 20:39:28 +0200 Message-ID: To: Jerin Jacob Kollanukkaran Cc: dev , Thomas Monjalon , Ben Walker , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix IOVA as VA mode selection 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" On Mon, Jul 8, 2019 at 4:25 PM wrote: > From: Jerin Jacob > > Existing logic fails to select IOVA mode as VA > if driver request to enable IOVA as VA. > > IOVA as VA has more strict requirement than other modes, > so enabling positive logic for IOVA as VA selection. > > This patch also updates the default IOVA mode as PA > for PCI devices as it has to deal with DMA engines unlike > the virtual devices that may need only IOVA as DC. > We have three cases: - driver/hw supports IOVA as PA only - driver/hw supports IOVA as both VA and PA - driver/hw supports IOVA as VA only Looking at the header: /** Device driver supports IOVA as VA */ #define RTE_PCI_DRV_IOVA_AS_VA 0X0040 It clearly states that the driver supports IOVA as VA, and not requires. With only one flag, we can't decide on those three cases and we might want to introduce a new flag for your usecase. But, in any case, this is too short for -rc1. I prefer to nak this patch for now. You can still set --iova-mode=va and we can try to find a solution for -rc2. -- David Marchand