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 3F06C45497; Thu, 20 Jun 2024 09:10:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B7B242DE9; Thu, 20 Jun 2024 09:10:49 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 0228B42DE4 for ; Thu, 20 Jun 2024 09:10:47 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id D935A215A1; Thu, 20 Jun 2024 09:10:47 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v5] net/af_xdp: parse umem map info from mempool range api Date: Thu, 20 Jun 2024 09:10:46 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F53E@smartserver.smartshare.dk> In-Reply-To: <20240620032523.440117-1-frank.du@intel.com> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v5] net/af_xdp: parse umem map info from mempool range api Thread-Index: AdrCwZzsiqOYxo+8SL6OJlTUTN9lSAAHzlKw References: <20240426005128.148730-1-frank.du@intel.com> <20240620032523.440117-1-frank.du@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Frank Du" , Cc: , 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 > From: Frank Du [mailto:frank.du@intel.com] >=20 > The current calculation assumes that the mbufs are contiguous. = However, > this assumption is incorrect when the mbuf memory spans across huge = page. >=20 > Correct to directly read with mempool get range API. >=20 > Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") > Cc: stable@dpdk.org >=20 > Signed-off-by: Frank Du >=20 > --- > v2: > * Add virtual contiguous detect for for multiple memhdrs > v3: > * Use RTE_ALIGN_FLOOR to get the aligned addr > * Add check on the first memhdr of memory chunks > v4: > * Replace the iterating with simple nb_mem_chunks check > v5: > * Use rte_mempool_get_mem_range to query the mempool range > --- Acked-by: Morten Br=F8rup