From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 82E72A0C4C;
	Mon, 25 Oct 2021 15:33:21 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 64B5440E32;
	Mon, 25 Oct 2021 15:33:21 +0200 (CEST)
Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com
 [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 5E11D4003E
 for <dev@dpdk.org>; Mon, 25 Oct 2021 15:33:20 +0200 (CEST)
Received: by mail-wr1-f53.google.com with SMTP id e12so12877291wra.4
 for <dev@dpdk.org>; Mon, 25 Oct 2021 06:33:20 -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=0tyQBzMpzFqbjiFEN0R77Y071wQR88E8E3MN6Xqg7JI=;
 b=CnpFIQiyvwca8rGFqJLad1hzF5Cnh9/fx3kvzzVKQe9yv5V88yjHLoxnlrsBrgqrbW
 Bjte10mHHDOvGZ8i7cWtpj+5ZjY/sC1fSFJDqFrn3YYAd0q1gwLNBQeq6IZFwAwmStRr
 k2eAqYOM5y6nRJqSiKYBqEsrRA8PNTV7lxT4yOgxikZTOmLqBk26Rfr97cRf81hqSbfr
 4u/9PMbwlh679ELteARh4hb6NX/5ywfUKzWJrAQL2pp32IG0DbxtLcNmbq5x+i42vHwA
 axIoexiXg/2olE3k3Fc5maLG0QNkB3jagT99GQfkwKAi7BqbEfUDI4uA3g3ib8P1sLmY
 1EyQ==
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=0tyQBzMpzFqbjiFEN0R77Y071wQR88E8E3MN6Xqg7JI=;
 b=M85nPv/9mT7PzhtazJhAmxRd+q5Q25Y+W4M1KH2LtxULLeba44ZQ07QQ/vAczlyRSc
 zmo/fT0jGRpBUz6SsKU7kp/NSCgJXM+crIHuV5M3QrNWklaR9djtrQqDWVNXXURlEddp
 WZDZFthlTvu5ipy/iv+9kjxK5mvXr3JCfwbPIGdT3m2Ot3bnLmgUswve/pLdp37QAbWU
 2U//DHipH9DnpYLI/TTofAcpS98jU7YLuzqW0MZagZ+8lpHCFdUydL1Bz2ttGo2OLd1n
 F/YCXEHPYZhItwLY27eqs3fXz5ldqu7QK7x7OVfDhmICcsW7vwVTYIUNLum1d/dfwReK
 ASQA==
X-Gm-Message-State: AOAM532DbNMcUCBNGRahFN/5gHV2iw3gIXc7bZLWySSsUHvs6/qqzmZW
 BSprsR/t6rFAoeT1/gUpyTQU4Q==
X-Google-Smtp-Source: ABdhPJyMWoXCt+zxPRMGA2XfBR5PaodrpEf7YW63Hc9eUzUum9NGUsI3xY67sqnRJSBvthhHLgNOTw==
X-Received: by 2002:a5d:67ca:: with SMTP id n10mr5694568wrw.88.1635168800059; 
 Mon, 25 Oct 2021 06:33:20 -0700 (PDT)
Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25])
 by smtp.gmail.com with ESMTPSA id c15sm16193869wrs.19.2021.10.25.06.33.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 25 Oct 2021 06:33:19 -0700 (PDT)
Date: Mon, 25 Oct 2021 15:33:18 +0200
From: Olivier Matz <olivier.matz@6wind.com>
To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Cc: dev@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Message-ID: <YXayHoBxlUeodYjy@platinum>
References: <20211022075937.52983-1-dkozlyuk@nvidia.com>
 <20211022210920.207732-1-dkozlyuk@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20211022210920.207732-1-dkozlyuk@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH v2] mempool: fix non-IO flag inference
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Sat, Oct 23, 2021 at 12:09:19AM +0300, Dmitry Kozlyuk wrote:
> When mempool had been created with RTE_MEMPOOL_F_NO_IOVA_CONTIG flag
> but later populated with valid IOVA, RTE_MEMPOOL_F_NON_IO was unset,
> while it should be kept. The unit test did not catch this
> because rte_mempool_populate_default() it used was populating
> with RTE_BAD_IOVA.
> 
> Keep setting RTE_MEMPOOL_NON_IO at an empty mempool creation
> and add an assert for it in the unit test (remove the separate case).
> Do not reset the flag if RTE_MEMPOOL_F_ON_IOVA_CONTIG is set.
> 
> Fixes: 11541c5c81dd ("mempool: add non-IO flag")
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thanks