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 1A661A04C3; Thu, 14 Nov 2019 13:25:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 872E52C30; Thu, 14 Nov 2019 13:25:38 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 893E22C16 for ; Thu, 14 Nov 2019 13:25:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573734336; 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=vwrtv3XAhGNaOE9XjH+vUrNJLd8UFVoVKUhtcDwjc9Q=; b=M/EHGFDxEkvlAS29M8a0JyYJsxz3wqUe5wHn+N8ZYcX5bTj1JBeBH/N4FfIKxcGJmCIp4P QmZR6CGHtXvmaOzhnVHBKLl1HJW5H/6ncKtGyJDqlqa/WwMs0th7rk2mtc0ofGVKhCrDLm 8CzkHRgBF/VFEqr7+vv+kbppyPJAf3Q= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-0dIBJXqTMqeqSLPMTQ10ow-1; Thu, 14 Nov 2019 07:25:35 -0500 Received: by mail-vk1-f199.google.com with SMTP id o144so2554802vko.13 for ; Thu, 14 Nov 2019 04:25:35 -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:content-transfer-encoding; bh=vwrtv3XAhGNaOE9XjH+vUrNJLd8UFVoVKUhtcDwjc9Q=; b=J0+3ZBPzUVTH4HOGez60mafdEtPCt7qOUJlv+BWWLXjL1AuKkwt53GljFzxFpNdPwm +9zpEjnfDwKbaLv229ksnuvsXjVrtZWdibWPbMoRdCu/CWtyG9Fc4EJAv9nvtuEbPHu2 yJI9Hr5jDktVB98eQY/LZ7N2j+dEaZdkQVUIgdlyfuFMgsYR4NqYmsKtAcml1nUB+lkD +4ZzHiULlOevp1iHE6q/qKNlGYrMQtGtchiNd+yiog1WkL8onpZ5RvEgVTBtieuSRpjN nD67MU3XUB3njfzY6MAcDPwUBgnvLFdbgH24/wB65yFtZSXLAKOdAfdmgi8zhFuJdDRy H6sw== X-Gm-Message-State: APjAAAWOTvX2E8rsQE2b0U7R6TZyAFtXQ3CeoxwMdxrIv4CKzqWCZ1Uv B0LrYAPJ1zBFR3bWeMEhnrPca/N5KJV4qfxPnLKRuyUjDlC9Rmg/CSQEMBMJI9eB99p2vGWVQ8G rmSrgYBSWJZCRxywNHr4= X-Received: by 2002:a67:ee49:: with SMTP id g9mr4286932vsp.105.1573734334547; Thu, 14 Nov 2019 04:25:34 -0800 (PST) X-Google-Smtp-Source: APXvYqz0R2gORHPRvHOlgvSUw1T7MFad05flkfptnfoI4juT3mSfL1ZRJL7zEsKpm85/yeNPrefEUnHnIqtttKp8otw= X-Received: by 2002:a67:ee49:: with SMTP id g9mr4286914vsp.105.1573734334167; Thu, 14 Nov 2019 04:25:34 -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 13:25:22 +0100 Message-ID: To: Vamsi Krishna Attunuru Cc: dev , Thomas Monjalon , Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Olivier Matz , "Yigit, Ferruh" , "Burakov, Anatoly" , Andrew Rybchenko , Stephen Hemminger , Luca Boccassi X-MC-Unique: 0dIBJXqTMqeqSLPMTQ10ow-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [EXT] Re: [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 1:10 PM Vamsi Krishna Attunuru wrote: > > > > > -----Original Message----- > > From: David Marchand > > Sent: Thursday, November 14, 2019 4:43 PM > > To: Vamsi Krishna Attunuru > > Cc: dev ; Thomas Monjalon ; Jerin > > Jacob Kollanukkaran ; Kiran Kumar Kokkilagadda > > ; Olivier Matz ; Yigit= , > > Ferruh ; Burakov, Anatoly > > ; Andrew Rybchenko > > ; Stephen Hemminger > > ; Luca Boccassi > > Subject: [EXT] Re: [dpdk-dev] [PATCH v12 1/2] kni: add IOVA=3DVA mode s= upport > > > > External Email > > > > ---------------------------------------------------------------------- > > 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 meant "Should the #if check be < ?". > > > > I did not mention this first, but thinking again, don't we have an issu= e here? > > This won't work for distributions that ship dpdk with kni built with dk= ms. > > > > Hi David, > > Are you referring the following problem, like if dpdk was build with some= older kernel (<4.6) version and shipped, later kernel was updated to 4.8 a= nd kni module got build with newer kernel.?, In this case, kni application = will continue work in PA mode without any issues. KNI module decides it's i= ova mode that application has communicated during kni allocation. If the us= er expectation is to make KNI application work in VA mode, the check has to= be dynamic than. Please correct me if the issue that is anticipated is som= ething different. The dpdk application will request PA (since compiled in with no regard to the actual kni capabilities) and will refuse to run as non root user. Which is already the case before this change. Ok, maybe something to improve later if people wants to use kni as non root= . My other comments still apply though. -- David Marchand