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 6183FA0C47; Mon, 12 Apr 2021 12:07:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E27F614109D; Mon, 12 Apr 2021 12:06:59 +0200 (CEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 24971141086 for ; Mon, 12 Apr 2021 12:06:58 +0200 (CEST) Received: by mail-lf1-f50.google.com with SMTP id w8so11925029lfr.0 for ; Mon, 12 Apr 2021 03:06:58 -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=JeSR0IAjH/UqeAAfOKeLhPENhYiIhpWv9/drxp7F4wA=; b=GylvM+xvSxvXB4WaxNTXrxo2/SK0VedGBFjzqwEGuuG98vNfEJt9wkpXSwr1rFQmSk COzVaTuzXDZv0YI4uOeJnyw3CGi2yzoYn6042oEjApL1yTeAypKExg2Ra7vyl2GBiws1 G2ORKBC4wMPWXR6SVTsCvuuYm2zZZhA5uU6GU/q4zToNvwpNHZctQuyRMC8J6yuNdfkz A5hGq40LQQNyqshMvzVDmvCmnPjq7iTf0ESDYavKhJVPauZ99f2kPVpJuWZnzVqGf8wl +8MTJ7dXoOo7bkARZp84tFmQX+kjK7AVK+j5uOtAQNmHkcDsMoQTnwcWF+mgYJ9tpZHw 9r/Q== 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=JeSR0IAjH/UqeAAfOKeLhPENhYiIhpWv9/drxp7F4wA=; b=QxsTuC+ZfSasA1L4mwg+W8n4R7bAs66BYcoJpM6g+Cjm8MIlM+p5OyEGVfw81zFrP3 IBCZVlI0BCJWkWRFK6Drt5UcdPpe81jSZ1mpqoA45dnyU5ZpOF+Cyaeqk+ZIha2Q1xGa 8Jk0MBbDowx+HRuRvmNmKFQ7wl2CJujeJrK+fEnzqHHplt5LgEYl+Koe0cJVN+LUwMis yD/nKwu/hLBjPS6ikSLVtCFN+kTX1YWY8aBiYDB4Ui296rCO87sY5EwQwfXXc4EYBR8r CL9GW0ZhDgaYJmcajK2tj/rbUV8tWEVqnIMsGXjCbfTvJhW6G5u/+tBml+oxL+MsLenf n/Ww== X-Gm-Message-State: AOAM531+g1mPd/5jKMnvHDIx7X+xfQnPafzLFukDx47f5YvlioY4igzn FOQgletkjr7BOVkBADw8hfRE7w== X-Google-Smtp-Source: ABdhPJx+Y3EvND81P5taGebN1bJGbmRPjk5Ru/6VdC9kXgvegMcniOZJX2D1w15LKWbPB/AIfT+MHQ== X-Received: by 2002:ac2:515b:: with SMTP id q27mr5969893lfd.584.1618222017728; Mon, 12 Apr 2021 03:06:57 -0700 (PDT) Received: from toster.semihalf.com (host-193.106.246.139.static.3s.pl. [193.106.246.139]) by smtp.gmail.com with ESMTPSA id u9sm2781326ljj.0.2021.04.12.03.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 03:06:57 -0700 (PDT) From: Stanislaw Kardach To: Anatoly Burakov Cc: dev@dpdk.org, Stanislaw Kardach , stable@dpdk.org Date: Mon, 12 Apr 2021 12:06:43 +0200 Message-Id: <20210412100645.668395-2-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210412100645.668395-1-kda@semihalf.com> References: <20210412100645.668395-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/3] test: disable no-huge test with PA IOVA 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 Sender: "dev" On linux systems without IOMMU support available (be it lack of supported IOMMU or lack of IOMMU support in kernel), the IOVA mapping will default to DMA with physical addresses. This implicitly requires hugepage support (most prominently for performance reasons). Therefore trying to run the eal_flags_no_huge_autotest in such scenario is not a valid requirement. To verify this even on x86 do (output from i5-10210U): $ ./app/test/dpdk-test -m 18 --iova-mode=pa --no-huge EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: FATAL: Cannot use IOVA as 'PA' since physical addresses are not available EAL: Cannot use IOVA as 'PA' since physical addresses are not available While doing: $ sudo ./app/test/dpdk-test --iova-mode=pa EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: Probing VFIO support... EAL: VFIO support initialized TELEMETRY: No legacy callbacks, legacy socket not created APP: HPET is not enabled, using TSC as default timer RTE>> This commit finishes the above test early with SKIP status to signify that no-huge support is simply not available. Signed-off-by: Stanislaw Kardach Cc: stable@dpdk.org --- app/test/test_eal_flags.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 932fbe3d0..462dc6384 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -756,6 +756,15 @@ test_no_huge_flag(void) #else const char * prefix = "--file-prefix=nohuge"; #endif +#ifdef RTE_EXEC_ENV_LINUX + /* EAL requires hugepages for RTE_IOVA_PA operation on linux. + * The test application is run with RTE_IOVA_DC, so if at this point we + * get RTE_IOVA_PA, it means that newly spawned process will also get + * it. + */ + if (rte_eal_iova_mode() == RTE_IOVA_PA) + return TEST_SKIPPED; +#endif /* With --no-huge */ const char *argv1[] = {prgname, prefix, no_huge}; -- 2.27.0