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 5B90745B14; Sat, 12 Oct 2024 14:35:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 232B240268; Sat, 12 Oct 2024 14:35:50 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 0C29D40265 for ; Sat, 12 Oct 2024 14:35:49 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id DC6CD20CA2 for ; Sat, 12 Oct 2024 14:35:48 +0200 (CEST) Content-class: urn:content-classes:message Subject: [RFC] Define well known packet burst sizes MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sat, 12 Oct 2024 14:35:46 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F7CA@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: X-MimeOLE: Produced By Microsoft Exchange V6.5 Thread-Topic: [RFC] Define well known packet burst sizes Thread-Index: Adsco0KqwLXQvJAyTdmw6tRWN9SgMw== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: 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 We should define some "well known" packet burst sizes in rte_config.h. Especially the default packet burst size is interesting; if known at compile time, various drivers and libraries can optimize for = it (i.e. special handling for nb_pkts =3D=3D RTE_PKT_BURST_DEFAULT). It should also be used in DPDK examples and apps, instead of defining = MAX_PKT_BURST in each and everyone. Specifically: /** * Default packet burst size. * * Also intended for optimizing packet processing (e.g. by loop = unrolling). */ #define RTE_PKT_BURST_DEFAULT 32 /** * Largest packet burst size guaranteed to be supported throughout DPDK. * * Also intended for sizing large temporary arrays of mbufs, e.g. in = rte_pktmbuf_free_bulk(). */ #define RTE_PKT_BURST_MAX 512 #define RTE_MEMPOOL_CACHE_MAX_SIZE RTE_PKT_BURST_MAX /** * Smallest packet burst size recommended for latency sensitive = applications, when throughput still matters. * * Also intended for sizing small staging arrays of mbufs, e.g. in = drivers. * * Note: Corresponds to one CPU cache line of object pointers. * - 8 on most 64 bit architectures, 16 on POWER architecture (ppc_64). * - 16 on all 32 bit architectures. */ #define RTE_PKT_BURST_SMALL (RTE_CACHE_LINE_SIZE / sizeof(void *))