public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 0/6] net/route: Rewrite route{4, 6}-change-{dst, gw} into C
Date: Fri, 14 Jun 2019 14:47:14 +0200	[thread overview]
Message-ID: <20190614124714.GA4022@dell5510> (raw)
In-Reply-To: <925eb48b-cb17-a06e-175d-315716852c76@oracle.com>

Hi Alexey,

> > thanks for your comments. I suppose you don't see much point of rewriting tests
> > into C (and depending on libmnl). The original idea was to change it fast enough
> > with C to really stress it. OK, let's leave it :).


> Sorry for the delay, it would be good to have a shell variant with the ping (so we
> can verify the route) and also keep the libmnl test-case to stress the creation/deletion.

Thanks for your opinion. It's actually good idea to have both instead of trying
to kill two birds with one stone in C (speed and validation) :).
I'll send ping and neighbor discovery variant and fixed C variant.

Kind regards,
Petr

> >>> do_test()
> >>> {
> >>> 	local iface=$(tst_iface)
> >>> 	local addr new_rt

> >>> 	new_rt="$(tst_ipaddr_un $1)/$mask"
> >>> 	addr="$(tst_ipaddr_un $1 1)"

> >>> 	tst_res TINFO "testing route '$new_rt'"

> >>> 	tst_rhost_run -s -c "ip addr add $addr/$mask dev $(tst_iface rhost)"
> >>> 	ROD ip route add $new_rt dev $iface
> >>> 	ROD ip neigh replace $addr lladdr $(tst_hwaddr rhost) nud permanent dev $iface
> >>>> 	EXPECT_PASS ns-udpsender -f $TST_IPVER -D $addr -p $1 -o -s $udp_size

> >>> 	ROD ip neigh del $addr lladdr $(tst_hwaddr rhost) dev $iface
> >>> 	ROD ip route del $new_rt dev $iface
> >>> 	tst_rhost_run -c "ip addr del $addr/$mask dev $(tst_iface rhost)"

> >> With ns-udpsender, I think it can be without setting ip addresses:
> > Route over gateway requires (on IPv6) gateway on rhost, which is requires to
> > create this IP address first.

> >>  	ROD ip route add $new_rt dev $iface
> >>  	ROD ip neigh replace $addr lladdr $(tst_hwaddr rhost) nud permanent dev $iface
> >>  	EXPECT_PASS ns-udpsender -f $TST_IPVER -D $addr -p $1 -o -s $udp_size> 
> >> 	ROD ip neigh del $addr lladdr $(tst_hwaddr rhost) dev $iface
> >>  	ROD ip route del $new_rt dev $iface

> >> But with ping and neighbor discovery:
> >>  	tst_rhost_run -s -c "ip addr add $addr/$mask dev $(tst_iface rhost)"
> >>  	ROD ip route add $new_rt dev $iface
> >>  	EXPECT_PASS ping$TST_IPVER ...
> >>  	ROD ip route del $new_rt dev $iface
> >>  	tst_rhost_run -c "ip addr del $addr/$mask dev $(tst_iface rhost)"
> > I prefer using ping and neighbor discovery. I suppose these are both equivalent
> > (if not it'd be good to run them both).

> > Kind regards,
> > Petr



      reply	other threads:[~2019-06-14 12:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 18:31 [LTP] [RFC PATCH v2 0/6] net/route: Rewrite route{4, 6}-change-{dst, gw} into C Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 1/6] net/route: Remove route{4,6}-change-if Petr Vorel
2019-05-23 12:46   ` [LTP] [RFC PATCH v2 1/6] net/route: Remove route{4, 6}-change-if Alexey Kodanev
2019-05-23 13:05     ` Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 2/6] net: Introduce TST_GET_UNUSED_PORT() macro into C API Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 3/6] tst_net.sh: Add -a IP and -s options to tst_init_iface() Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 4/6] tst_net.sh: Minor code and doc cleanup Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 5/6] net: Move setup_addrinfo() from netstress.c into tst_net.h Petr Vorel
2019-05-10 18:31 ` [LTP] [RFC PATCH v2 6/6] net/route: Rewrite route{4, 6}-change-{dst, gw} into C Petr Vorel
2019-06-14 11:59   ` Alexey Kodanev
2019-05-28 12:32 ` [LTP] [RFC PATCH v2 0/6] " Alexey Kodanev
2019-06-03  7:26   ` Petr Vorel
2019-06-14 11:43     ` Alexey Kodanev
2019-06-14 12:47       ` Petr Vorel [this message]

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=20190614124714.GA4022@dell5510 \
    --to=pvorel@suse.cz \
    --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