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 6C3F445CF5; Tue, 12 Nov 2024 15:07:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 357F94029A; Tue, 12 Nov 2024 15:07:35 +0100 (CET) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) by mails.dpdk.org (Postfix) with ESMTP id 9DC5E40280 for ; Tue, 12 Nov 2024 15:07:33 +0100 (CET) Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-71811c7eb8dso2858012a34.0 for ; Tue, 12 Nov 2024 06:07:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731420453; x=1732025253; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WPxVZG+Y+WNB1rCR2v6/voIbez4sey6fJqX5crvQFnQ=; b=jj6nq37CHveOMQ3RNINXBr/i2oOx0N2vSKuMDKH5sbThXcmfXjr2Uocy1A4h3K5fXz RJVHZKaAWePV6oEqpzvi6Lu1uIYSXhWxQU4/qB2PQIDRHAXtveBIdI96/PP9rjqch1Sq p9EnoaLEICBWsHXbmpZJxymXoST0lDrCdk15oz7+ftmokXM7tl+1iZxRcHB4DRnW2BRU wBe6Cu0bwwScqLJVZ6ioV8QiPBwY6Gk4KKDDylliAvq8kjecZuRnNbc2ZRr64lXoM9Uu /+MtKph8ZZeXhG588lLI7/dGeAhjsmDMgiCV+VBDYtaTMnbj6KkuGcMh70/CF1eDW257 laVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731420453; x=1732025253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WPxVZG+Y+WNB1rCR2v6/voIbez4sey6fJqX5crvQFnQ=; b=ERrp6QfdO6tDnJ2yukXp/qgaNY+I1k17hb6jr6VeoHMZkyyI7y3pZEBdo6MxoDnnQK inwB/QU87ND/8h0R5iDXzWEAPtKqWBHglK/aGL5cG5B4KtCR0ZqoLflPhLuZ8zTN9vhz 2mMQF4elktspwTf5jjZNEQ07VaaKaUppAb9Wpewym10aJY8WQLXLNNxhtgrL7SR0Ul+E Q7zdSma5z8sYxLrpVVMwwomkZ+ccHw+TBFSaXyGXvQ1mpNp0TH4RRz+4hZBz9t/COIms 1S2P5m2byTnSsOgvQ71cEZ50hcuWhjzMibobUSkMMwuYRgImBSvu93Cv0jadnUVfdyhh ElQA== X-Gm-Message-State: AOJu0Yxt1rmScO+urn5HqgDukf85Q1Dzbk2GTSqgdVhmUgjhaFeH5LjT DN4VoYHLjAoAi86k6qB6AtC5rNX5AlALFDaIdnl41R78nYTIiBst X-Google-Smtp-Source: AGHT+IEmc2as0+hSK0UFSA3gSB8za3PkrGIEWUMWsYkdXvSsy0OIyMwJGa0jePtN4CctE4N5qnPdOA== X-Received: by 2002:a05:6830:258b:b0:718:1793:ecd8 with SMTP id 46e09a7af769-71a1c2c1feamr13440292a34.30.1731420452562; Tue, 12 Nov 2024 06:07:32 -0800 (PST) Received: from mars.allot.local ([189.147.178.194]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-71a108102d7sm2752273a34.22.2024.11.12.06.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 06:07:30 -0800 (PST) From: =?UTF-8?q?Rogelio=20Dom=C3=ADnguez=20Hern=C3=A1ndez?= To: Robin Jarry Cc: dev@dpdk.org, =?UTF-8?q?Rogelio=20Dom=C3=ADnguez=20Hern=C3=A1ndez?= Subject: [PATCH v2] usertools/devbind: support all possible values in sysfs flag Date: Tue, 12 Nov 2024 08:07:19 -0600 Message-ID: <20241112140719.149055-1-rogelio.dominguez@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112131548.102992-1-rogelio.dominguez@gmail.com> References: <20241112131548.102992-1-rogelio.dominguez@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 This patch adds support for 'y' and 'Y' values when reading vfio-pci unsafe_noiommu_mode flag. Possible values were taken from linux kernel (sysfs__read_bool() in tools/lib/api/fs/fs.c) Signed-off-by: Rogelio Domínguez Hernández --- usertools/dpdk-devbind.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 80c35f9ab6..e8660098fd 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -490,7 +490,8 @@ def check_noiommu_mode(): try: with open(filename, "r") as f: - if f.read(1) == "1": + value = f.read(1) + if value in ("1", "y" ,"Y"): return except OSError as err: sys.exit(f"Error: failed to check unsafe noiommu mode - Cannot open {filename}: {err}") -- 2.45.2