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] [PATCH v4 2/2] net/route: Add netlink based route change gw/dest tests
Date: Fri, 17 Apr 2020 15:25:06 +0200	[thread overview]
Message-ID: <20200417132506.GA3373@dell5510> (raw)
In-Reply-To: <20200416141909.GA16790@dell5510>

Hi Alexey,

> > > +struct ip_addr {
> > > +	char ip[INET6_ADDRSTRLEN];

> > What about adding 'struct addrinfo' here, and use it instead of ip
> > string manipulation during the test?
> Hm, probably good idea.
> String manipulation is needed for creating destination (char dst[INET6_ADDRSTRLEN]).
> But that should be done during setup as well => would it be better to have also
> struct ip_addr *dst?
OK, I got your point. Replace IP represented in string with union with binary
IP:
	union {
		in_addr_t ip;
		struct in6_addr ip6;
	}

inet_pton() than would be run in the setup. Current design is a result of the
original idea that IP's will be generated by tst_ipaddr_un() C implementation
the way shell tests are working. But then I change this C test to use limited
number of addresses repeating more times, so it makes more sense to prepare
everything in the setup.

+ I haven't prepared variant for changing iface.
I'll either finish it or remove struct iface for now.

The rest of your comments I've implemented.

Kind regards,
Petr

      reply	other threads:[~2020-04-17 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 15:24 [LTP] [PATCH v4 0/2] Route tests using netlink API (dst,gw) Petr Vorel
2020-04-14 15:24 ` [LTP] [PATCH v4 1/2] net: Move setup_addrinfo() into tst_net.h Petr Vorel
2020-04-14 15:24 ` [LTP] [PATCH v4 2/2] net/route: Add netlink based route change gw/dest tests Petr Vorel
2020-04-16 12:27   ` Alexey Kodanev
2020-04-16 14:19     ` Petr Vorel
2020-04-17 13:25       ` 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=20200417132506.GA3373@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