From patchwork Fri Jun 4 14:15:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Kardach X-Patchwork-Id: 93876 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19E10A0A0F; Fri, 4 Jun 2021 16:16:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2050F410E8; Fri, 4 Jun 2021 16:16:31 +0200 (CEST) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mails.dpdk.org (Postfix) with ESMTP id 9BF6740147 for ; Fri, 4 Jun 2021 16:16:28 +0200 (CEST) Received: by mail-lj1-f178.google.com with SMTP id a4so11736775ljq.9 for ; Fri, 04 Jun 2021 07:16:28 -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=nWM65qHNUPWHZsTGjbMZydesPi2LEU7qwReJC3lKwQ0=; b=vMuBoIxfcisbcKo0aXGkb6MAb+hsVrGfBSWZYqvYBnT5+cXclsRv8UCVMMq1NPaESX wfvjbk5/cT+p353e6bLGMND7ShiSM/EQkWdQsvQtd4VLiolLwZFEDEfnms8MmcD1Yl47 6MXuJo6fcPadR8meVv8c6DfA9xtBDpnvY0xfWs848DdMXYo0kfYcSHvtk9SEkYrne1fo uXtX2lv4x0zsXuP2qcjG9HUDLrqMmkjV4GvA/5q3D5O9aIeW9lET5e0H6VvDLwfoJUDq K+Rq5in+1tB9DnkVw+chWVbHfyp8r6y7RLbst3T8C1saAkrZs60dl4TAlmNeHhd5AjS1 sM7g== 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=nWM65qHNUPWHZsTGjbMZydesPi2LEU7qwReJC3lKwQ0=; b=VSY+U7TuOcI5tWqBa+E4DuaDg1mXQpIRmwi2jjS/YmHP+ab3TMXtxSgOLGlhyXviJD MeVnqipG6sG5tkA76BUmVhO+MaeOt+V51HquFoxTCsNSq4zerzfJlNugSXOTK7cU82wN PnRnOrEp3Zp3QJEhwRA2qhZi/6NfXIhFhOTq2SSpUOTHSF3NxopLlpRZIuUaxSZVTLwT IrKCze+Z3PclIl3gzAAvd2SpovrTrsQZWcaoqj0ov+AexxZgDfY8NogGTcbkHobBFQQw XZ6aeZldcYwgeicOVY+4awWLTIOCAXyZT5mwB06r2gjSvoa5Fv7er3pN2YIQsWx6m1w5 HlTg== X-Gm-Message-State: AOAM53080Wk363aMaVKR6fpCnJC6WhYBFRD3G3Xmdhs6ldWEtdlwFBKN WqCptOvgZX3dvlVhbyAkFCvOWoGImxe8Dw== X-Google-Smtp-Source: ABdhPJzAKhqNsaImofwN/TukiHurJ7BOh1VEDPrAwRpCQhEcnppbToYavhQdjtfqOCqiOClC2VxT8w== X-Received: by 2002:a2e:8ed1:: with SMTP id e17mr3498145ljl.503.1622816188209; Fri, 04 Jun 2021 07:16:28 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id h13sm706377lji.101.2021.06.04.07.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:16:28 -0700 (PDT) From: Stanislaw Kardach To: Anatoly Burakov Cc: dev@dpdk.org, Stanislaw Kardach Date: Fri, 4 Jun 2021 16:15:59 +0200 Message-Id: <20210604141601.275430-2-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210604141601.275430-1-kda@semihalf.com> References: <20210604141601.275430-1-kda@semihalf.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 or explicit --no-huge EAL parameter), the IOVA mapping will default to DMA with physical addresses. This implicitly requires hugepage support to work (checked in rte_eal_using_phys_addrs). Therefore trying to run the eal_flags_no_huge_autotest in such scenario is not a valid requirement. This issue was discovered on RISC-V arch. 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 ... 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 --- 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 932fbe3d08..462dc63842 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};