DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
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
Date: Fri, 22 Dec 2023 09:17:02 -0800	[thread overview]
Message-ID: <20231222091702.22645dec@hermes.local> (raw)
In-Reply-To: <20231222194453.3049693-3-beilei.xing@intel.com>

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 <stdbool.h>
>  #include <stdint.h>
>  
> +#include <rte_compat.h>
> +
>  /*
>   * 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.

  reply	other threads:[~2023-12-22 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 19:44 [PATCH 0/4] add VFIO IOMMUFD/CDEV support beilei.xing
2023-12-22 19:44 ` [PATCH 1/4] iommufd: add IOMMUFD support beilei.xing
2023-12-22 19:44 ` [PATCH 2/4] vfio: add VFIO " beilei.xing
2023-12-22 17:17   ` Stephen Hemminger [this message]
2023-12-25  6:30     ` Xing, Beilei
2023-12-22 19:44 ` [PATCH 3/4] bus/pci: add VFIO CDEV support beilei.xing
2023-12-22 19:44 ` [PATCH 4/4] eal: add new args to choose VFIO mode beilei.xing
2023-12-22 17:17   ` Stephen Hemminger
2023-12-25  6:06     ` Xing, Beilei

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=20231222091702.22645dec@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=thomas@monjalon.net \
    --cc=yahui.cao@intel.com \
    /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).