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 6D6A1440AB; Fri, 24 May 2024 07:31:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33E514026B; Fri, 24 May 2024 07:31:03 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id A7214400D7 for ; Fri, 24 May 2024 07:31:02 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 775142035F; Fri, 24 May 2024 07:31:02 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 Subject: RE: [PATCH v4] net/af_xdp: fix umem map size for zero copy X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 24 May 2024 07:30:58 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F493@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v4] net/af_xdp: fix umem map size for zero copy Thread-Index: AQHarOrZpCpyK85ReES6R3ycBhHa8LGki6uAgABFioCAAL+rkIAATAjg References: <20240426005128.148730-1-frank.du@intel.com> <20240523080751.2347970-1-frank.du@intel.com> <98CBD80474FA8B44BF855DF32C47DC35E9F492@smartserver.smartshare.dk> From: =?UTF-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Du, Frank" , "Ferruh Yigit" , Cc: "Loftus, Ciara" 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 PiBGcm9tOi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