From: Phil Sutter <phil@nwl.cc>
To: Or Gerlitz <gerlitz.or@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@gmail.com>,
Linux Netdev List <netdev@vger.kernel.org>,
Roi Dayan <roid@mellanox.com>
Subject: Re: re iproute2 - don't return error on success fix
Date: Mon, 8 Oct 2018 14:41:41 +0200 [thread overview]
Message-ID: <20181008124141.GB14666@orbyte.nwl.cc> (raw)
In-Reply-To: <CAJ3xEMj0wQZiCE3+qcpOq25oNZKqP81f5i0Xt0ctcUt-yvVAkQ@mail.gmail.com>
Hi Or,
On Tue, Oct 02, 2018 at 03:21:18PM +0300, Or Gerlitz wrote:
> On Thu, Sep 27, 2018 at 3:53 PM Phil Sutter <phil@nwl.cc> wrote:
[...]
> > Hmm, I can't reproduce this. My HEAD is at the commit you mentioned:
> >
> > | % sudo ./tc/tc filter add dev d0 protocol ip parent ffff: flower skip_sw ip_flags nofirstfrag action drop
> > | RTNETLINK answers: Operation not supported
> > | We have an error talking to the kernel, -1
> > | % echo $?
> > | 2
> >
> > Are you sure you tested the right binary?
>
> double checked now, seems broken on my end:
>
> $ git log --oneline -3
> b45e300 libnetlink: don't return error on success
> 5dc2204 testsuite: add libmnl
> 8804a8c Makefile: Add check target
>
> $./tc/tc filter add dev enp33s0f0 protocol ip parent ffff: flower
> skip_sw ip_flags frag action drop && echo "success" || echo "failed"
> success
>
> $ ./tc/tc filter add dev enp33s0f0 protocol ip parent ffff: flower
> skip_sw ip_flags firstfrag action drop && echo "success" || echo
> "failed"
> RTNETLINK answers: Operation not supported
> success
Interestingly, your output lacks the "We have an error" message mine
shows. So in your case, the call to rtnl_talk_iov() from
tc_filter_modify() does not return < 0.
In my case, commands always fail with 'skip_sw' since I only test on a
dummy interface. So maybe we hit different error paths? Could you please
check what happens for you in __rtnl_talk_iov()? I guess the "RTNETLINK
answers:" message should come from rtnl_talk_error(). In my case it does
at least, and I haven't found an alternative place where that message
could come from.
Cheers, Phil
next prev parent reply other threads:[~2018-10-08 19:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 12:22 re iproute2 - don't return error on success fix Or Gerlitz
2018-09-27 12:39 ` Stephen Hemminger
2018-09-27 12:53 ` Phil Sutter
2018-09-28 6:22 ` Or Gerlitz
2018-10-02 12:21 ` Or Gerlitz
2018-10-08 12:41 ` Phil Sutter [this message]
2018-10-09 10:54 ` Or Gerlitz
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=20181008124141.GB14666@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=dsahern@gmail.com \
--cc=gerlitz.or@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roid@mellanox.com \
--cc=stephen@networkplumber.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).