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 3F549A0032; Fri, 29 Oct 2021 11:34:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 348D8410E1; Fri, 29 Oct 2021 11:34:33 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 5BFAE410E0 for ; Fri, 29 Oct 2021 11:34:32 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id p14so15189867wrd.10 for ; Fri, 29 Oct 2021 02:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hK3zlfX6QCaeGfghaxpPFLUpMQLux8baEZNCcky84Og=; b=fDlYqHhBfJSp3vfBgIAFdCUHZr/TOP6hFjhJ2NgLigJv9WDLP/t4srhAnAndkDi6Ge bUJQq+1Ups7/e01avGMps+gbV745NxthCYVe9lSa4R6ViyuzCEowTecHsJWsEIdfMDUT 7unoULpe11YnOxHABl5PlOWceEeydfFb1UskphNbgSU/92NcKtNukkVhnpoeJv0SoyYr Rdc+bKzHZwXDxtJL/a58tMOv2G4e9E7uLBthOfX6MjZvHxTQs76hzzMXMRXob/Hc2Ern HXfOZDD30HYEt11tDA7XwuYHv75QCJVtiXljrtDhxNlXHCFLZ4bIJEvXJH6DrBL+ZvpO uhpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hK3zlfX6QCaeGfghaxpPFLUpMQLux8baEZNCcky84Og=; b=1Q+JushIGdM7ChdNvsMAxyJs3xfs/dIo1dvHySiWjLcosPkGouXkiMzaEQGRNgilWg cAmIXD++mHctDGlTN/9Y0rPP8+y10p6fa5R23P4cZ53qUvayoIZO/vmft+8iPv0dUdBu T9yrjHA3lRNANDjB5dmvySD5zZXdE7I9RfzlCxJ7Jx75/DSEXMHBt36JA6zfE7G4xYtw usXU1LzjPjd6m4JYczC/weQHxUQfPPkVVd9YnmR09ReME7HpboEtIfZzRq5h2eNJamyR HjgnhMZQOS/zF7oQdUuLvb4uLxCfR7mGS73lTehpKJuYiURM8P4kISCBQ87Iabk9rkwU 5ekw== X-Gm-Message-State: AOAM530dQdJk1Hiy7rdbHGWteUGOD2G1HGJ3MLnzbus5SzUTO5enTx5q s5uO82eJ+1RlrDGP8tQcDBC45C01S+9PdQ== X-Google-Smtp-Source: ABdhPJwOXLhZO2aGssnznlr6ZQMWLS0fWD+ZfxF2qDoA5TNHg7pdip0yFkkI0G+Nte6Du+NoQ88Rdw== X-Received: by 2002:adf:e5c6:: with SMTP id a6mr12786733wrn.172.1635500072031; Fri, 29 Oct 2021 02:34:32 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id z2sm4653362wmk.19.2021.10.29.02.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 02:34:31 -0700 (PDT) Date: Fri, 29 Oct 2021 11:34:30 +0200 From: Olivier Matz To: Dmitry Kozlyuk Cc: dev@dpdk.org, YuX Jiang , Andrew Rybchenko Message-ID: References: <20211029084051.679233-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211029084051.679233-1-dkozlyuk@nvidia.com> Subject: Re: [dpdk-dev] [PATCH] app/test: fix mempool test failure on FreeBSD 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" Hi Dmitry, On Fri, Oct 29, 2021 at 11:40:50AM +0300, Dmitry Kozlyuk wrote: > FreeBSD EAL does not implement rte_mem_virt2iova() > that was used in mempool_autotest, causing it to fail: > > EAL: Test assert test_mempool_flag_non_io_unset_when_populated_with_valid_iova > line 781 failed: Cannot get IOVA > test failed at test_mempool():1030 > Test Failed > > Change unit test to use rte_memzone_reserve() to allocate memory, > which allows to obtain IOVA directly. > > Bugzilla ID: 863 > Fixes: 11541c5c81dd ("mempool: add non-IO flag") > > Reported-by: YuX Jiang > Signed-off-by: Dmitry Kozlyuk Reviewed-by: Olivier Matz However, I launched the test like this and it failed: $ ./build/app/test/dpdk-test --no-huge -m 512 EAL: Detected CPU lcores: 12 EAL: Detected NUMA nodes: 1 EAL: Detected shared linkage of DPDK EAL: Multi-process socket /run/user/12489/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' APP: HPET is not enabled, using TSC as default timer RTE>>mempool_autotest (...) EAL: Test assert test_mempool_events line 585 failed: Failed to populate mempool empty1: Success test failed at test_mempool():1019 Test Failed It appears that the failure comes from: int rte_mempool_populate_anon(struct rte_mempool *mp) { (...) /* can't use MMAP_LOCKED, it does not exist on BSD */ if (rte_mem_lock(addr, size) < 0) { => rte_mem_unmap(addr, size); return 0; } The errno here is 12 (ENOMEM). This is because of the default ulimit for max locked memory: (kbytes, -l) 65536 If I increase it to 128000, it works. Would it make sense to decrease the size of the pools so that we don't reach this limit? (...) > @@ -789,12 +791,12 @@ test_mempool_flag_non_io_unset_when_populated_with_valid_iova(void) > /* > * Since objects from the pool are never used in the test, > * we don't care for contiguous IOVA, on the other hand, > - * reiuring it could cause spurious test failures. > + * reqiuring it could cause spurious test failures. nice try :D