From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D3D8A057B; Wed, 1 Apr 2020 16:26:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 612261C195; Wed, 1 Apr 2020 16:22:19 +0200 (CEST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by dpdk.org (Postfix) with ESMTP id 77F761C120 for ; Wed, 1 Apr 2020 16:22:14 +0200 (CEST) Received: by mail-lj1-f180.google.com with SMTP id t17so25993482ljc.12 for ; Wed, 01 Apr 2020 07:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BALMCJDiCDdxZYtv7NXs5mHsYjFuyMuI5FYst6tEYko=; b=kJ1iA/BkD5mHny4q3YtMB7wTcTt4yAwygaTAHa/7ovfNTP2QGtDnUaTTspPrKsXOxi wfz7BpYE77QlVs+calzi5FixecRG/OLf3hh8VgvLQXWog6Y8787X97PITUm6xKNRZKZd sTN+szW0i5wb8zBRxw1Dc5I9jUkeMt1VN4lzsbYoT517tIY0IBQzzOANUlUeXEkx3afb wukfW5UgFdIEdf++FqudvET1NzexpyVrmu7YUiCVHxxSsN1LcSDQe2P76i0rHR9MFx8Z ft69RhU+xrPd+Nk7Q9+jgD9VkzbQd4/8vg9tmj0G+PJWD3YygciCD5XfV0HSIwC3YQ+3 v9dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BALMCJDiCDdxZYtv7NXs5mHsYjFuyMuI5FYst6tEYko=; b=APaGbND6mbsHeTei0LJFt3ZKhxcpAncchQV3q/tK2CGX8XgaAXNt4ApZJ137VcNcXZ GZVQPXWtbal0hhI8KixUa4rteGJBbwGp3tIFV0rtPyp7y4pX7lLNCn+1cSlfCuPqheT6 aG1jocVNTpaEQpri66qFjXw5z3IwmtWDQEvaSHqLy8CnSKDrOZe6cy9pjKU588cgcomi rGcfhZNFkUR1n785yuebyu6GdT6noZgexLSfzj4nbaA8r/pDOTyp9sf0zkpTzvpf2juH NiRQy4MmKsSlRBZaunhvj8RhEfpTgqxSDvn3oaBdcRBAeTO+WHzJkTGefHgyjM+wrjZ5 eqZQ== X-Gm-Message-State: AGi0PubScSGyiz2acjalVr/FAx4n1Pp+O4iHuyc+jkpAu+UWOzw6bNQ/ mjirvfLDGCwzvPzWO5tYC6tinOoggkU= X-Google-Smtp-Source: APiQypK/5QfyZw6a6nxhMSbOQcDyB2AK0F3aSAxwlqUOBz9VT/Fr45deSTIyznn/Cmhg1DFqjQJ4uQ== X-Received: by 2002:a05:651c:383:: with SMTP id e3mr12687103ljp.271.1585750933681; Wed, 01 Apr 2020 07:22:13 -0700 (PDT) Received: from mkPC.semihalf.local (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id r21sm1435961ljp.29.2020.04.01.07.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:22:13 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, Michal Krawczyk Date: Wed, 1 Apr 2020 16:21:25 +0200 Message-Id: <20200401142127.13715-28-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200401142127.13715-1-mk@semihalf.com> References: <20200401142127.13715-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 27/29] doc: add notes on ENA usage on metal instances X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" As AWS metal instances are supporting IOMMU, the usage of igb_uio or vfio-pci can lead to a problems (when to use which module), especially that the vfio-pci isn't supporting SMMU on arm64. To clear up the problem of using those modules in various setup conditions (with or without IOMMU) on metal instances, more detailed explanation was added. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- doc/guides/nics/ena.rst | 48 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst index d5081e91e5..57749eb736 100644 --- a/doc/guides/nics/ena.rst +++ b/doc/guides/nics/ena.rst @@ -187,11 +187,55 @@ Prerequisites echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode -#. Bind the intended ENA device to ``vfio-pci`` or ``igb_uio`` module. + To use ``noiommu`` mode, the ``vfio-pci`` must be built with flag + ``CONFIG_VFIO_NOIOMMU``. +#. Bind the intended ENA device to ``vfio-pci`` or ``igb_uio`` module. At this point the system should be ready to run DPDK applications. Once the -application runs to completion, the ENA can be detached from igb_uio if necessary. +application runs to completion, the ENA can be detached from attached module if +necessary. + +**Note about usage on \*.metal instances** + +On AWS, the metal instances are supporting IOMMU for both arm64 and x86_64 +hosts. + +* x86_64 (e.g. c5.metal, i3.metal): + IOMMU should be disabled by default. In that situation, the ``igb_uio`` can + be used as it is but ``vfio-pci`` should be working in no-IOMMU mode (please + see above). + + When IOMMU is enabled, ``igb_uio`` cannot be used as it's not supporting this + feature, while ``vfio-pci`` should work without any changes. + To enable IOMMU on those hosts, please update ``GRUB_CMDLINE_LINUX`` in file + ``/etc/default/grub`` with the below extra boot arguments:: + + iommu=1 intel_iommu=on + + Then, make the changes live by executing as a root:: + + # grub2-mkconfig > /boot/grub2/grub.cfg + + Finally, reboot should result in IOMMU being enabled. + +* arm64 (a1.metal): + IOMMU should be enabled by default. Unfortunately, ``vfio-pci`` isn't + supporting SMMU, which is implementation of IOMMU for arm64 architecture and + ``igb_uio`` isn't supporting IOMMU at all, so to use DPDK with ENA on those + hosts, one must disable IOMMU. This can be done by updating + ``GRUB_CMDLINE_LINUX`` in file ``/etc/default/grub`` with the extra boot + argument:: + + iommu.passthrough=1 + + Then, make the changes live by executing as a root:: + + # grub2-mkconfig > /boot/grub2/grub.cfg + + Finally, reboot should result in IOMMU being disabled. + Without IOMMU, ``igb_uio`` can be used as it is but ``vfio-pci`` should be + working in no-IOMMU mode (please see above). Usage example ------------- -- 2.20.1