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 2F54A45CF5; Tue, 12 Nov 2024 14:16:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B8F442D91; Tue, 12 Nov 2024 14:16:01 +0100 (CET) Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) by mails.dpdk.org (Postfix) with ESMTP id 76CBA427AC for ; Tue, 12 Nov 2024 14:15:59 +0100 (CET) Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-5ebc04d495aso3016698eaf.2 for ; Tue, 12 Nov 2024 05:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731417358; x=1732022158; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=06YEAnFMKTgaLLughJYiwR7LSuvbBj3dFMCIJQXuf+c=; b=Sis+dVmDfmgEzuhfEIyvXaq/1hO886eYdsJbZks5JylrhGkliXbvtIvomyJC+OSCaD gR0jQzHk17OEA0UHur9rDThwRj5IIPqid8REa/nDgvPUtW311mb/i3CYZUURJDX/ecx3 Wzwfic6mIvnejEqtzYzOIKKUFQ6E8O5ZcSY4F8UG3tniCNRDyB7WU3kBpuy+gl2exsmD dsaOrm6y/WKBXg0l4pLeAG6eUmT6gMg107jNedZjoun/wo7yb3ZTAfchy+Za48EoGXIe 7GGpbaz4pmlumdexD3BWy+hG69d73vNB7LxrO/2fcv48OuNX3XSgbuLYLeEF1fa8O2ZM nKWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731417358; x=1732022158; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=06YEAnFMKTgaLLughJYiwR7LSuvbBj3dFMCIJQXuf+c=; b=kAykM7BLJWHmPMcxwBxMFFDM1LGICAZ1UCHuFLhSYtOHwKzKWvJ3Ic8Sf9quGXLOMw eE/gcw4C7CL72eGsmDtE48Qg6buh2si641/LTakRhKO0i6mIPb8Lt7LYy3tiIu7eYXRt aSB4kA7IcHf62C0XaVvoD6e61TQd4pGetnPZRbMws70wUtzSaAS5XOgX3E7xbuXUnu79 zXhlIY1HRPoRqQ0pFV8qsiD7KwKT1rQooLP7ugWlCWAvMG/u4WkQuW7zM0S3YK/Gps4X ZAO86zFjh/CmmsMCfrTaeIzcgBGr+UPFEwZZ/0n7IaApdCxfjxfNxm3OOcG/lPPNjAN+ CmPw== X-Gm-Message-State: AOJu0YxhUzKyCGY21WfHlLLjo9kPwkRKqENHPYHAqSew7o8SVMQcJFmC eFzFks4SJ9F24DTAtfb0v3RIgFlJkYE50l6m1/crSHxYfZ0CeMle X-Google-Smtp-Source: AGHT+IHoT6wunM96+6McwRNXQ6ddhvZKaQSzJCBNdcqUbubax4SOMEk8XZKvJwDtVJ2MWxImAlBbdw== X-Received: by 2002:a4a:e841:0:b0:5ed:f849:51dd with SMTP id 006d021491bc7-5ee57c8d182mr10880834eaf.8.1731417358558; Tue, 12 Nov 2024 05:15:58 -0800 (PST) Received: from mars.allot.local ([189.147.178.194]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-5ee49711415sm2381944eaf.42.2024.11.12.05.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 05:15:57 -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] usertools/devbind: support all possible values sysfs flag Date: Tue, 12 Nov 2024 07:15:48 -0600 Message-ID: <20241112131548.102992-1-rogelio.dominguez@gmail.com> X-Mailer: git-send-email 2.45.2 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..548898d59e 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 == "1" or value == "y" or value == "Y": return except OSError as err: sys.exit(f"Error: failed to check unsafe noiommu mode - Cannot open {filename}: {err}") -- 2.45.2