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 C63BCA0544; Tue, 11 Oct 2022 01:02:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7588140DFD; Tue, 11 Oct 2022 01:02:11 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 0927240146 for ; Tue, 11 Oct 2022 01:02:10 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A9D6D5C0064; Mon, 10 Oct 2022 19:02:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 10 Oct 2022 19:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665442927; x= 1665529327; bh=PpjagcY7RMoVW22rdfriHmQ5jJ+vJL0NcDyruIhc7WI=; b=B cMjCnEQrghHiwZ6Bu1Crul8ugtihOLesgl0+JapVfJQaGwqZT5x3IL3GE43wN9zs aWBux1PBCubvvFp3Ycsm4Zo02CRL2fOc1BJc2xEKcIQ3UwvAktv24a0ZwmxXZwkq mxLSdKZ/tqD7a8IqG7Dnf4f5G38dVFLmkVIfZcuydnkp4mpPxbjMv7u5bCRRjeMq Mju2dE0vW2LKkzcV13M1vZvQfNNEq8F7cpB0cZ9KIJHJR4UpbQoHdW58zwrkaMaw opxpyqeI4QNLDaYnm9xOyktMLrADzHdH7Biapd7kCTE84ThPSIBn4ov9wRuNT/P5 npIhkEomdeSjiUPPTXtTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1665442927; x= 1665529327; bh=PpjagcY7RMoVW22rdfriHmQ5jJ+vJL0NcDyruIhc7WI=; b=a sHzLjTlIghWvKzwlqJpvPOdb4nFieJ37ALGjSXQU0Hw/uG2tZZ9DvmL6pZvJPKNk c9CoRRCPx3cTz2gjx//NCs+C9hwN+DAz0m2M6p0cLO3vXxAt+dGBnfQzYYipEkev mUyYtVC01H19T9hFJFa3ynfSJdh9/rgo3ztxpTqueGcXWweRaEKLBcjcRK135Ixx vjv6B54UMkYNM6LsFXYcSvVXzgRrSww3DdEQprndM0ccNcZctfdGHtYudfU3PdSD sswfA7j9k6PalD6V7bRHNIQvfPUSzPpsYx4dlMKlrPdzsWdcaNvHwdC5fGi4sjsi KPVrE0I/vNiB7DvV31q7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeejhedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Oct 2022 19:02:06 -0400 (EDT) From: Thomas Monjalon To: Fidaullah Noonari , Bruce Richardson Cc: "Burakov, Anatoly" , dev@dpdk.org, stephen@networkplumber.org, Robin Jarry Subject: Re: [PATCH v3] usertools: add check for IOMMU support in dpdk-devbind Date: Tue, 11 Oct 2022 01:02:04 +0200 Message-ID: <7932149.JRmrKFJ9eK@thomas> In-Reply-To: References: <20220315062652.78332-1-fidaullah.noonari@emumba.com> <518e43f6-29d6-b86e-aa48-83868d0f8d25@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 31/03/2022 16:44, Bruce Richardson: > On Thu, Mar 31, 2022 at 03:37:40PM +0100, Burakov, Anatoly wrote: > > On 21-Mar-22 12:27 PM, Fidaullah Noonari wrote: > > > binding with vfio driver, when IOMMU is disabled, causes program to crash. > > > this patch adds a flag for noiommmu-mode. when this is set, if IOMMU is > > > disabled, it changes vfio into unsafe noiommu mode and prints warning > > > message. > > > > > > Signed-off-by: Fidaullah Noonari > > > --- > > > > Hi, > > > > > +def check_noiommu_mode(): > > > + """checks and enables the noiommu mode for vfio drivers""" > > > + global noiommu_flag > > > + filename = "/sys/module/vfio/parameters/enable_unsafe_noiommu_mode" > > > + > > > + try: > > > + with open(filename,"r") as f: > > > + if f.read(1) == "1": > > > + return > > > + except OSError as err: > > > + sys.exit("Error: failed to enable unsafe noiommu mode - Cannot open %s: %s" > > > + % (filename, err)) > > > > Nitpick, but maybe use f-strings instead of old-school string interpolation? > > > > Do we still not need to support some distros that don't have Python earlier > than 3.6, where this support was added? The requirements have been upgraded to Python 3.6 with the new pmdinfo. Are we waiting for a new version?