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 E336543760; Fri, 22 Dec 2023 18:17:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64B1B402B9; Fri, 22 Dec 2023 18:17:06 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 40B0A402A6 for ; Fri, 22 Dec 2023 18:17:05 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d3eabe9321so14322575ad.2 for ; Fri, 22 Dec 2023 09:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1703265424; x=1703870224; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=CZc7OgE3GX0J3HImp5eojdNnu8loE0YLy7CQY+O42ko=; b=z9VEg3sBZpODAp7u89QHnDxCGCIKliDNpCMHBFDR7VZQceW444bPbrVXtZ2rwL7hXY ma4+kn4QYLFiC8YLL9BHNA/wW9Jk3DcQpQOnuPyJCNIzyKjf4bL20KJpZuH3TqBtT0d/ AbUBbXtQTS/o9jbStEOZo/qcfdlQXDznusd0r/GWH9JYi1naAmFPFYDvuh5thKqU8Ohw dLLKe1/VhhyxzLnPkErZo1dWPuReMSrNjR490y31drySAqBnHIqxFxIEO3IzW6ZI+QTa 6tih1vrPDUflbRzaHFvQLP7/a9004Ej3J6o30ShJWsnI09Vng+VnmzkpOatTZLxXMpjr 0PTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703265424; x=1703870224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CZc7OgE3GX0J3HImp5eojdNnu8loE0YLy7CQY+O42ko=; b=kQGyFa6x4QpISpM1EygWBtGtqPlcpRH7GS3Ni90LW/sdaepkd1VjY1FdfHZPBCqFEX YD13uBtXtKOp0c36HaeOrC8Z2/rkXtXG4kO4MafgrNIznhgI7pEztGmH1e/FiqjKDTH2 v7KhMA59JNvZUPd+rZpt0cF1zKoL+JYz/tCtUzACktYaYVMkcr9tZ33n3ysdyzj/oxmi vt44YWAWdQVLXrp1gP1faLSce13yXJktkiBJT6PdayqgwWMFsHlZDh8k9iIbckrXll+E 23qi6ku3bMLw0rUF9b5Zdjw8s0l2Y8ApqbSnjleKCz3jRFaDC2tXoXJgE6GxEVpqTOwS MXxA== X-Gm-Message-State: AOJu0Yw5UfQDSQTrjNZQFuJbje+RHut3efFTyk7+PBC2lg0GHuiJrSA3 8Rfq5cTk+HhXyq1v5Bbq8NQjtivZfZ0gZA== X-Google-Smtp-Source: AGHT+IFUscQ+EKG0jP8RWDnvT13mJUgQtQJbhLogDgey9ELp+zNhid6HfX+YMLRRRoDrwdDU6shDww== X-Received: by 2002:a17:902:8609:b0:1d3:33b1:f57c with SMTP id f9-20020a170902860900b001d333b1f57cmr1182809plo.28.1703265424137; Fri, 22 Dec 2023 09:17:04 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id h24-20020a170902ac9800b001d36dbb22a9sm3699895plr.4.2023.12.22.09.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:17:03 -0800 (PST) Date: Fri, 22 Dec 2023 09:17:02 -0800 From: Stephen Hemminger To: beilei.xing@intel.com Cc: anatoly.burakov@intel.com, dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@amd.com, bruce.richardson@intel.com, chenbox@nvidia.com, yahui.cao@intel.com Subject: Re: [PATCH 2/4] vfio: add VFIO IOMMUFD support Message-ID: <20231222091702.22645dec@hermes.local> In-Reply-To: <20231222194453.3049693-3-beilei.xing@intel.com> References: <20231222194453.3049693-1-beilei.xing@intel.com> <20231222194453.3049693-3-beilei.xing@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 22 Dec 2023 19:44:51 +0000 beilei.xing@intel.com wrote: > diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h > index 22832afd0f..7a9b26b0f7 100644 > --- a/lib/eal/include/rte_vfio.h > +++ b/lib/eal/include/rte_vfio.h > @@ -17,6 +17,8 @@ extern "C" { > #include > #include > > +#include > + > /* > * determine if VFIO is present on the system > */ > @@ -28,6 +30,9 @@ extern "C" { > #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) > #define HAVE_VFIO_DEV_REQ_INTERFACE > #endif /* kernel version >= 4.0.0 */ > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) > +#define VFIO_IOMMUFD_PRESENT > +#endif /* kernel version >= 6.6.0 */ > #endif /* RTE_EAL_VFIO */ Depending on kernel version macro is a mistake because many enterprise distro's backport features and do not change kernel version. Also, it means the build and target machine have to be same kernel version.