From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 1/3] network/stress/multicast/packet-flood: Update to new API
Date: Mon, 11 Jan 2021 07:44:06 +0100 [thread overview]
Message-ID: <d575ea47-142c-2ff3-1a55-58fc8f55801b@jv-coder.de> (raw)
In-Reply-To: <20201221221838.GC4453@pevik>
Hi Petr,
On 12/21/2020 11:18 PM, Petr Vorel wrote:
> Hi Joerg,
>
>
> Minor comments, please update them if v4 needed.
> Otherwise it can be fixed during merge.
> Thanks for your work.
I don't think I'll submit a v4, if you want to fix this during merge, it
is ok to me.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr
>
>> +++ b/testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
>> @@ -0,0 +1,55 @@
>> +#!/bin/sh
>> +# SPDX-License-Identifier: GPL-2.0-or-later
>> +# Copyright (c) 2006 International Business Machines Corp.
>> +# Copyright (c) 2020 Joerg Vehlow <joerg.vehlow@aox-tech.de>
>> +# Author: Mitsuru Chinen <mitch@jp.ibm.com>
>> +#
>> +# Verify that the kernel is not crashed when joining multiple multicast
>> +# groups on separate sockets, then receiving a large number of UDP
>> +# packets at each socket
>> +
>> +TST_NEEDS_ROOT=1
>> +. mcast-lib.sh
>> +
>> +do_setup()
>> +{
>> + mcast_setup $n_NORMAL
>
> This should be (error during global replace):
>
> mcast_setup $MCASTNUM_NORMAL
Yes sorry...
>
>> + MCAST_LCMD=ns-mcast_receiver
>> + MCAST_RCMD=ns-udpsender
>> +}
>> +
>> +do_test()
>> +{
>> + tst_res TINFO "Verify that the kernel is not crashed when joining $MCASTNUM_NORMAL IPv${TST_IPVER} multicast groups on separate sockets, then receiving a large number of UDP packets at each socket in $NS_DURATION seconds"
> I'd prefer these drop boilerplate "Verify that the kernel is not crashed when"
> + the same in the description at the top of the file.
Do you want this completely removed? I added this, because you asked me
to in v2?
>
>> +
>> + local n=0
>> + while [ $n -lt $MCASTNUM_NORMAL ]; do
>> + # Define the multicast address
>> + if [ "$TST_IPV6" ]; then
>> + local n_hex=$(printf "%x" $n)
>> + local addr=${MCAST_IPV6_ADDR_PREFIX}:${n_hex}
> nit: wrong indent
Strange ;)
>
>> + else
>> + local x=$((n / 254))
>> + local y=$((n % 254 + 1))
>> + local addr=${MCAST_IPV4_ADDR_PREFIX}.${x}.${y}
>> + fi
>> +
>> + local port=$(tst_get_unused_port ipv${TST_IPVER} dgram)
>> + [ $? -ne 0 ] && tst_brk TBROK "No free udp port available."
> nit: no dot please.
>
>> + tst_res TINFO Port: $port
> This should be quoted.
Could also be removed. I guess this was for testing...
>
>> +
>> + # Run a receiver
>> + ROD ns-mcast_receiver -f $TST_IPVER -I $(tst_iface lhost) -m $addr -p $port -b
>> +
>> + # Run a sender
>> + tst_rhost_run -s -c "ns-udpsender -D $addr -f $TST_IPVER -p $port -m -I $(tst_iface rhost) -b -t $NS_DURATION"
>> +
>> + : $((n += 1))
> sure this works, but I'd prefer:
> n=$((n += 1))
I don't care
>> + done
> The rest LGTM.
Thanks
J?rg
next prev parent reply other threads:[~2021-01-11 6:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 5:34 [LTP] [PATCH v3 1/3] network/stress/multicast/packet-flood: Update to new API Joerg Vehlow
2020-11-25 5:34 ` [LTP] [PATCH v3 2/3] network/stress/multicast/query-flood: Convert " Joerg Vehlow
2020-11-25 5:34 ` [LTP] [PATCH v3 3/3] network/stress/route-change: " Joerg Vehlow
2021-01-13 0:40 ` Petr Vorel
2020-12-21 22:18 ` [LTP] [PATCH v3 1/3] network/stress/multicast/packet-flood: Update " Petr Vorel
2021-01-11 6:44 ` Joerg Vehlow [this message]
2021-01-12 11:31 ` Petr Vorel
2021-01-21 16:27 ` Petr Vorel
2021-01-13 0:23 ` Petr Vorel
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=d575ea47-142c-2ff3-1a55-58fc8f55801b@jv-coder.de \
--to=lkml@jv-coder.de \
--cc=ltp@lists.linux.it \
/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