netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Xin Long <lucien.xin@gmail.com>
Cc: David Ahern <dsahern@gmail.com>,
	network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
	Davide Caratti <dcaratti@redhat.com>
Subject: Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding
Date: Wed, 4 Jul 2018 23:39:51 +0300	[thread overview]
Message-ID: <20180704203951.GA24525@splinter> (raw)
In-Reply-To: <CADvbK_c6pdnHuKd_aDG3REWvGRx5AtGH2YO90tyRvcWesBDzPw@mail.gmail.com>

On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote:
> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern <dsahern@gmail.com> wrote:
> > your commands are not a proper test. The test should succeed and fail
> > based on the routing lookup, not iptables rules.
> A proper test can be done easily with netns, as vrf can't isolate much.
> I don't want to bother forwarding/ directory with netns, so I will probably
> just drop this selftest, and let the feature patch go first.
> 
> What do you think?

You can add a tc rule on the ingress of h2 and make sure that in the
first case ping succeeds and the tc rule wasn't hit. In the second case
ping should also succeed, but the tc rule should be hit. This is similar
to your original netns test.

You can look at tc_flower.sh for reference and in particular at
tc_check_packets().

  parent reply	other threads:[~2018-07-04 20:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02  6:30 [PATCHv2 net-next 0/2] route: add support and selftests for directed broadcast forwarding Xin Long
2018-07-02  6:30 ` [PATCHv2 net-next 1/2] route: add support " Xin Long
2018-07-02  6:30   ` [PATCHv2 net-next 2/2] selftests: add a selftest " Xin Long
2018-07-02 15:12     ` David Ahern
2018-07-03 11:36       ` Xin Long
2018-07-03 19:23         ` David Ahern
2018-07-04 17:56           ` Xin Long
2018-07-04 18:31             ` David Ahern
2018-07-04 18:36             ` David Ahern
2018-07-05  7:57               ` Xin Long
2018-07-05 13:18                 ` David Ahern
2018-07-05 14:07                   ` Xin Long
2018-07-06  9:50                     ` Xin Long
2018-07-07 14:51                       ` David Ahern
2018-07-04 20:39             ` Ido Schimmel [this message]
2018-07-05  8:21               ` Xin Long
2018-07-05 15:38                 ` Xin Long
2018-07-02  9:57   ` [PATCHv2 net-next 1/2] route: add support " Davide Caratti
2018-07-02 15:05   ` David Ahern
2018-07-03 11:38     ` Xin Long

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=20180704203951.GA24525@splinter \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.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).