From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA4C8A04C5; Thu, 14 Nov 2019 18:48:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96F9C2BAF; Thu, 14 Nov 2019 18:48:24 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 059F52B86 for ; Thu, 14 Nov 2019 18:48:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573753702; 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=p0nuo9bTfX+M5Si5Ggx/vggspszPGVhUOPzxPiJvdVA=; b=epYkzvgR2PYfgykxGxNAMJMCrVvDEhvTr4wimCsx8gT/0jSs8Lqk1zRtTZfL8jlExlo8hy xqK3Ccueh1qk/nD6QbOygT2XC8y+L6gk2exVod7NNRqY+dpSDoGmGRIH4Ikr/w05NctSP3 bnoscl13COXzEye85m1rEpUr1AcZBE8= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-183-UcRqzn2MPriUHDx_74NXHw-1; Thu, 14 Nov 2019 12:48:21 -0500 Received: by mail-vk1-f197.google.com with SMTP id i5so2925679vkg.21 for ; Thu, 14 Nov 2019 09:48:21 -0800 (PST) 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=ziW4omdT+BAPhkO6Tqdk8HEa0gONkgDvAscoy+Q4R/E=; b=PLvdAEsfd8zE/TV27iHVq1J7KN6Gkc/7b7vhvQ1lHNxXTP2ATY/6sz/EOwCKlZynnN GicBuoFvQy7EIjhUSRd7eMhn2Hf101wZY/w35yE6LPZorToswtpmXpcQqhDWcs27lLoC 0qwY6GHGCdzfLqj2CbOV7BU/m9aecjSccF/C829XS1uPgKP/jXFrV1ew7bm0nXPxj2n9 GJxfjVTwF9lW8LGgPGc/m2KHaKJzegzQRj1hQocQu7DhCOfb0EmkI9EBhR4icQA0Joch hkpCMiGLKPDGRObRU2l5i1Ma1gsbeUCUrrLlno+MEPpVkpocQr36wUggpEFvFHcBsWUR bavA== X-Gm-Message-State: APjAAAVundw7p+JADpUi/qn/Ac0U6x/ZtrrlIOYKi5nZ9f1DsVMxbpw4 o81+68X0HvV33rDF0d0lfTmx4emQYf6q85zokCVlNrASQ0g7SW0bWZ5QQ5mc4z0YoUCfFAGvvrX 5aCJOxEMRocjTk06g2Ew= X-Received: by 2002:a67:f3c7:: with SMTP id j7mr6392986vsn.141.1573753700591; Thu, 14 Nov 2019 09:48:20 -0800 (PST) X-Google-Smtp-Source: APXvYqz5KArwiPEvgvrJa+ktq4CQZshT3lDbULTWV0+yeHKinMXMZ/rqZ2lREXjEehpgDT/LDIRr93RddEX92vI7rOE= X-Received: by 2002:a67:f3c7:: with SMTP id j7mr6392968vsn.141.1573753700241; Thu, 14 Nov 2019 09:48:20 -0800 (PST) MIME-Version: 1.0 References: <20191021080324.10659-1-vattunuru@marvell.com> <20191105110416.8955-1-vattunuru@marvell.com> <20191105110416.8955-2-vattunuru@marvell.com> In-Reply-To: From: David Marchand Date: Thu, 14 Nov 2019 18:48:05 +0100 Message-ID: To: Vamsi Attunuru Cc: dev , Thomas Monjalon , Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Olivier Matz , "Yigit, Ferruh" , "Burakov, Anatoly" , Andrew Rybchenko , Stephen Hemminger X-MC-Unique: UcRqzn2MPriUHDx_74NXHw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v12 1/2] kni: add IOVA=VA mode support 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 Thu, Nov 14, 2019 at 11:57 AM David Marchand wrote: > On Tue, Nov 5, 2019 at 12:05 PM wrote: > > diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/= eal.c > > index 9e2d50c..a1c5bf6 100644 > > --- a/lib/librte_eal/linux/eal/eal.c > > +++ b/lib/librte_eal/linux/eal/eal.c > > @@ -922,6 +922,19 @@ static int rte_eal_vfio_setup(void) > > } > > #endif > > > > +static enum rte_iova_mode > > +rte_eal_kni_get_iova_mode(enum rte_iova_mode iova_mode) > > +{ > > + if (iova_mode =3D=3D RTE_IOVA_VA) { > > +#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE > > I understood that IOVA as VA is possible with kernel >=3D 4.6. > Should it be < ? I had read it backwards. So, the check is ok. [snip] > In the end, can't we just change the check on the workaround? > Something like: > > @@ -1085,7 +1085,7 @@ rte_eal_init(int argc, char **argv) > RTE_LOG(DEBUG, EAL, "IOMMU is not > available, selecting IOVA as PA mode.\n"); > } > } > -#ifdef RTE_LIBRTE_KNI > +#if defined(RTE_LIBRTE_KNI) && KERNEL_VERSION(4, 6, 0) < LINUX_VERSION_C= ODE Then it becomes: +#if defined(RTE_LIBRTE_KNI) && KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_COD= E > /* Workaround for KNI which requires physical address to = work */ > if (iova_mode =3D=3D RTE_IOVA_VA && > rte_eal_check_module("rte_kni") =3D=3D 1)= { > > > It would be the only change in the whole file lib/librte_eal/linux/eal/ea= l.c --=20 David Marchand