From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Jie Hai" <haijie1@huawei.com>, <dev@dpdk.org>,
<thomas@monjalon.net>, <ferruh.yigit@amd.com>
Cc: <lihuisong@huawei.com>, <fengchengwen@huawei.com>
Subject: RE: [PATCH] examples/l3fwd: add option to set RX burst size
Date: Sat, 12 Oct 2024 14:22:50 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F7C9@smartserver.smartshare.dk> (raw)
In-Reply-To: <20241012084052.3485-1-haijie1@huawei.com>
> From: Jie Hai [mailto:haijie1@huawei.com]
> Sent: Saturday, 12 October 2024 10.41
>
> Now the Rx burst size is fixed to MAX_PKT_BURST (32). This
> parameter needs to be modified in some performance optimization
> scenarios. So an option '--burst' is added to set the burst size
> explicitly. The default value is DEFAULT_PKT_BURST (32) and maximum
> value is MAX_PKT_BURST (512).
Good idea.
>
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> ---
>
> -#define MAX_PKT_BURST 32
> +#define DEFAULT_PKT_BURST 32
> +#define MAX_PKT_BURST 512
> #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
>
> #define MEMPOOL_CACHE_SIZE 256
It seems strange to use a burst size larger than the mempool cache size.
You might want to make the cache size configurable too, or simply define MEMPOOL_CACHE_SIZE as RTE_MEMPOOL_CACHE_MAX_SIZE (currently 512) instead of 256.
And, as a safety measure, consider adding:
#include <assert.h>
static_assert(MEMPOOL_CACHE_SIZE >= MAX_PKT_BURST);
next prev parent reply other threads:[~2024-10-12 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 8:40 Jie Hai
2024-10-12 9:06 ` fengchengwen
2024-10-12 12:22 ` Morten Brørup [this message]
2024-10-17 8:58 ` [PATCH v2 0/2] examples/l3fwd: add more options Jie Hai
2024-10-17 8:58 ` [PATCH v2 1/2] examples/l3fwd: add option to set RX burst size Jie Hai
2024-10-17 9:37 ` lihuisong (C)
2024-10-17 8:58 ` [PATCH v2 2/2] examples/l3fwd: add option to set mbuf cache size Jie Hai
2024-10-17 9:40 ` lihuisong (C)
2024-10-17 9:18 ` [PATCH v2 0/2] examples/l3fwd: add more options Morten Brørup
2024-10-17 9:58 ` [PATCH v3 " Jie Hai
2024-10-17 9:58 ` [PATCH v3 1/2] examples/l3fwd: add option to set RX burst size Jie Hai
2024-10-17 9:58 ` [PATCH v3 2/2] examples/l3fwd: add option to set mbuf cache size Jie Hai
2024-10-17 11:10 ` fengchengwen
2024-10-18 1:08 ` [PATCH v4 0/2] examples/l3fwd: add more options Jie Hai
2024-10-18 1:08 ` [PATCH v4 1/2] examples/l3fwd: add option to set RX burst size Jie Hai
2024-10-18 1:08 ` [PATCH v4 2/2] examples/l3fwd: add option to set mbuf cache size Jie Hai
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=98CBD80474FA8B44BF855DF32C47DC35E9F7C9@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=haijie1@huawei.com \
--cc=lihuisong@huawei.com \
--cc=thomas@monjalon.net \
/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).