From: Nicholas Richardson <richardsonnick@google.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: nrrichar@ncsu.edu, arunkaly@google.com,
Nick Richardson <richardsonnick@google.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Yejune Deng <yejune.deng@gmail.com>, Di Zhu <zhudi21@huawei.com>,
Ye Bin <yebin10@huawei.com>, Leesoo Ahn <dev@ooseel.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Add IMIX mode
Date: Mon, 9 Aug 2021 17:22:01 +0000 [thread overview]
Message-ID: <20210809172207.3890697-1-richardsonnick@google.com> (raw)
From: Nick Richardson <richardsonnick@google.com>
Adds internet mix (IMIX) mode to pktgen. Internet mix is
included in many user-space network perf testing tools. It allows
for the user to specify a distribution of discrete packet sizes to be
generated. This type of test is common among vendors when perf testing
their devices.
[RFC link: https://datatracker.ietf.org/doc/html/rfc2544#section-9.1]
This allows users to get a
more complete picture of how their device will perform in the
real-world.
This feature adds a command that allows users to specify an imix
distribution in the following format:
imix_weights size_1,weight_1 size_2,weight_2 ... size_n,weight_n
The distribution of packets with size_i will be
(weight_i / total_weights) where
total_weights = weight_1 + weight_2 + ... + weight_n
For example:
imix_weights 40,7 576,4 1500,1
The pkt_size "40" will account for 7 / (7 + 4 + 1) = ~58% of the total
packets sent.
This patch was tested with the following:
1. imix_weights = 40,7 576,4 1500,1
2. imix_weights = 0,7 576,4 1500,1
- Packet size of 0 is resized to the minimum, 42
3. imix_weights = 40,7 576,4 1500,1 count = 0
- Zero count.
- Runs until user stops pktgen.
Invalid Configurations
1. clone_skb = 200 imix_weights = 40,7 576,4 1500,1
- Returns error code -524 (-ENOTSUPP) when setting imix_weights
2. len(imix_weights) > MAX_IMIX_ENTRIES
- Returns -7 (-E2BIG)
This patch is split into three parts, each provide different aspects of
required functionality:
1. Parse internet mix input.
2. Add IMIX Distribution representation.
3. Process and output IMIX results.
Nick Richardson (3):
pktgen: Parse internet mix (imix) input
pktgen: Add imix distribution bins
pktgen: Add output for imix results
net/core/pktgen.c | 163 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 162 insertions(+), 1 deletion(-)
--
2.32.0.605.g8dce9f2422-goog
next reply other threads:[~2021-08-09 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 17:22 Nicholas Richardson [this message]
2021-08-09 17:22 ` [PATCH 1/3] pktgen: Parse internet mix (imix) input Nicholas Richardson
2021-08-09 21:05 ` Jakub Kicinski
2021-08-12 18:12 ` Nick Richardson
2021-08-09 17:22 ` [PATCH 2/3] pktgen: Add imix distribution bins Nicholas Richardson
2021-08-09 17:22 ` [PATCH 3/3] pktgen: Add output for imix results Nicholas Richardson
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=20210809172207.3890697-1-richardsonnick@google.com \
--to=richardsonnick@google.com \
--cc=arunkaly@google.com \
--cc=davem@davemloft.net \
--cc=dev@ooseel.net \
--cc=gustavoars@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nrrichar@ncsu.edu \
--cc=yebin10@huawei.com \
--cc=yejune.deng@gmail.com \
--cc=zhudi21@huawei.com \
/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).