From: "Morten Brørup" <mb@smartsharesystems.com>
To: <dev@dpdk.org>
Subject: [RFC] Define well known packet burst sizes
Date: Sat, 12 Oct 2024 14:35:46 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F7CA@smartserver.smartshare.dk> (raw)
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 == 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 *))
next reply other threads:[~2024-10-12 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 12:35 Morten Brørup [this message]
2024-10-12 13:55 ` Pavan Nikhilesh Bhagavatula
2024-10-12 15:07 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9F7CA@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).