From: Fred Klassen <fklassen@appneta.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Shuah Khan <shuah@kernel.org>,
Network Development <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-kselftest@vger.kernel.org,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue
Date: Thu, 23 May 2019 18:27:41 -0700 [thread overview]
Message-ID: <D68C643B-C6A4-4EC5-8E4F-368BDE03760B@appneta.com> (raw)
In-Reply-To: <CAF=yD-KBNLr5KY-YQ1KMmZGCpYNefSJKaJkZNOwd8nRiedpQtA@mail.gmail.com>
Willem, this is only my 2nd patch, and my last one was a one liner.
I’ll try to work through this, but let me know if I am doing a rookie
mistake (learning curve and all).
> On May 23, 2019, at 2:56 PM, Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote:
>
> On Thu, May 23, 2019 at 5:11 PM Fred Klassen <fklassen@appneta.com> wrote:
>>
>> This enhancement adds the '-a' option, which will count all CMSG
>> messages on the error queue and print a summary report.
>>
>> Fixes: 3a687bef148d ("selftests: udp gso benchmark")
>
> Also not a fix, but an extension.
I’ll make a v2 patch and remove “Fixes:".
>
>>
>> Example:
>>
>> # ./udpgso_bench_tx -4uT -a -l5 -S 1472 -D 172.16.120.189
>> udp tx: 492 MB/s 8354 calls/s 8354 msg/s
>> udp tx: 477 MB/s 8106 calls/s 8106 msg/s
>> udp tx: 488 MB/s 8288 calls/s 8288 msg/s
>> udp tx: 882 MB/s 14975 calls/s 14975 msg/s
>> Summary over 5.000 seconds ...
>> sum udp tx: 696 MB/s 57696 calls (11539/s) 57696 msgs (11539/s)
>> Tx Timestamps: received: 57696 errors: 0
>>
>> This can be useful in tracking loss of messages when under load. For example,
>> adding the '-z' option results in loss of TX timestamp messages:
>>
>> # ./udpgso_bench_tx -4ucT -a -l5 -S 1472 -D 172.16.120.189 -p 3239 -z
>> udp tx: 490 MB/s 8325 calls/s 8325 msg/s
>> udp tx: 500 MB/s 8492 calls/s 8492 msg/s
>> udp tx: 883 MB/s 14985 calls/s 14985 msg/s
>> udp tx: 756 MB/s 12823 calls/s 12823 msg/s
>> Summary over 5.000 seconds ...
>> sum udp tx: 657 MB/s 54429 calls (10885/s) 54429 msgs (10885/s)
>> Tx Timestamps: received: 34046 errors: 0
>> Zerocopy acks: received: 54422 errors: 0
>
> This would probably also be more useful as regression test if it is in
> the form of a pass/fail test: if timestamps are requested and total
> count is zero, then the feature is broken and the process should exit
> with an error.
>
I’ll add a hard failure for zero response for TX Timestamps or Zerocopy,
or if any errors occur.
>>
>> Fixes: 3a687bef148d ("selftests: udp gso benchmark")
>
> Repeated
Will fix.
>
>> Signed-off-by: Fred Klassen <fklassen@appneta.com>
>> ---
>> tools/testing/selftests/net/udpgso_bench_tx.c | 152 +++++++++++++++++++-------
>> 1 file changed, 113 insertions(+), 39 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net/udpgso_bench_tx.c
>> index 56e0d890b066..9924342a0b03 100644
>> --- a/tools/testing/selftests/net/udpgso_bench_tx.c
>> +++ b/tools/testing/selftests/net/udpgso_bench_tx.c
>> @@ -62,10 +62,19 @@ static bool cfg_tcp;
>> static uint32_t cfg_tx_ts = SOF_TIMESTAMPING_TX_SOFTWARE;
>> static bool cfg_tx_tstamp;
>> static uint32_t cfg_tos;
>> +static bool cfg_audit;
>> static bool cfg_verbose;
>> static bool cfg_zerocopy;
>> static int cfg_msg_nr;
>> static uint16_t cfg_gso_size;
>> +static unsigned long total_num_msgs;
>> +static unsigned long total_num_sends;
>> +static unsigned long stat_tx_ts;
>> +static unsigned long stat_tx_ts_errors;
>> +static unsigned long tstart;
>> +static unsigned long tend;
>> +static unsigned long stat_zcopies;
>> +static unsigned long stat_zcopy_errors;
>>
>> static socklen_t cfg_alen;
>> static struct sockaddr_storage cfg_dst_addr;
>> @@ -137,8 +146,11 @@ static void flush_cmsg(struct cmsghdr *cmsg)
>> struct my_scm_timestamping *tss;
>>
>> tss = (struct my_scm_timestamping *)CMSG_DATA(cmsg);
>> - fprintf(stderr, "tx timestamp = %lu.%09lu\n",
>> - tss->ts[i].tv_sec, tss->ts[i].tv_nsec);
>> + if (tss->ts[i].tv_sec == 0)
>> + stat_tx_ts_errors++;
>> + if (cfg_verbose)
>> + fprintf(stderr, "tx timestamp = %lu.%09lu\n",
>> + tss->ts[i].tv_sec, tss->ts[i].tv_nsec);
>
> changes unrelated to this feature?
I’ll remove. Do you think that I should pull out any messages related
to “cfg_verbose”?
next prev parent reply other threads:[~2019-05-24 1:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 21:06 [PATCH net 0/4] Allow TX timestamp with UDP GSO Fred Klassen
2019-05-23 21:06 ` [PATCH net 1/4] net/udp_gso: " Fred Klassen
2019-05-23 21:39 ` Willem de Bruijn
2019-05-24 1:38 ` Fred Klassen
2019-05-24 4:53 ` Willem de Bruijn
2019-05-24 16:34 ` Fred Klassen
2019-05-24 19:29 ` Willem de Bruijn
2019-05-24 22:01 ` Fred Klassen
2019-05-25 15:20 ` Willem de Bruijn
2019-05-25 18:47 ` Fred Klassen
2019-05-27 1:30 ` Willem de Bruijn
2019-05-27 2:09 ` Willem de Bruijn
2019-05-25 20:46 ` Fred Klassen
2019-05-23 21:59 ` Willem de Bruijn
2019-05-25 20:09 ` Fred Klassen
2019-05-25 20:47 ` Fred Klassen
2019-05-23 21:06 ` [PATCH net 2/4] net/udpgso_bench_tx: options to exercise TX CMSG Fred Klassen
2019-05-23 21:45 ` Willem de Bruijn
2019-05-23 21:52 ` Willem de Bruijn
2019-05-24 2:10 ` Fred Klassen
2019-05-23 21:06 ` [PATCH net 3/4] net/udpgso_bench_tx: fix sendmmsg on unconnected socket Fred Klassen
2019-05-23 21:06 ` [PATCH net 4/4] net/udpgso_bench_tx: audit error queue Fred Klassen
2019-05-23 21:56 ` Willem de Bruijn
2019-05-24 1:27 ` Fred Klassen [this message]
2019-05-24 5:02 ` Willem de Bruijn
2019-05-27 21:30 ` Fred Klassen
2019-05-27 21:46 ` Willem de Bruijn
2019-05-27 22:56 ` Fred Klassen
2019-05-28 1:15 ` Willem de Bruijn
2019-05-28 5:19 ` Fred Klassen
2019-05-28 15:08 ` Willem de Bruijn
2019-05-28 16:57 ` Fred Klassen
2019-05-28 17:07 ` Willem de Bruijn
2019-05-28 17:11 ` Willem de Bruijn
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=D68C643B-C6A4-4EC5-8E4F-368BDE03760B@appneta.com \
--to=fklassen@appneta.com \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=yoshfuji@linux-ipv6.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).