DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Fidaullah Noonari <fidaullah.noonari@emumba.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
	dev@dpdk.org, stephen@networkplumber.org,
	Robin Jarry <robin@jarry.cc>
Subject: Re: [PATCH v3] usertools: add check for IOMMU support in dpdk-devbind
Date: Tue, 11 Oct 2022 01:02:04 +0200	[thread overview]
Message-ID: <7932149.JRmrKFJ9eK@thomas> (raw)
In-Reply-To: <YkW+UJwcKxl9Dsdk@bricha3-MOBL.ger.corp.intel.com>

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 <fidaullah.noonari@emumba.com>
> > > ---
> > 
> > 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?





  reply	other threads:[~2022-10-10 23:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  6:26 [PATCH v2] " Fidaullah Noonari
2022-03-15  9:17 ` Bruce Richardson
2022-03-21 12:27 ` [PATCH v3] " Fidaullah Noonari
2022-03-31 14:37   ` Burakov, Anatoly
2022-03-31 14:44     ` Bruce Richardson
2022-10-10 23:02       ` Thomas Monjalon [this message]
2022-10-12 12:38   ` [PATCH v4] " Fidaullah Noonari
2023-07-06 18:22   ` [PATCH v3] " Stephen Hemminger
2023-10-31 18:34   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7932149.JRmrKFJ9eK@thomas \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fidaullah.noonari@emumba.com \
    --cc=robin@jarry.cc \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).