* re iproute2 - don't return error on success fix @ 2018-09-27 12:22 Or Gerlitz 2018-09-27 12:39 ` Stephen Hemminger 2018-09-27 12:53 ` Phil Sutter 0 siblings, 2 replies; 7+ messages in thread From: Or Gerlitz @ 2018-09-27 12:22 UTC (permalink / raw) To: Stephen Hemminger; +Cc: David Ahern, Linux Netdev List, Roi Dayan Something is still broken also after commit b45e300 "libnetlink: don't return error on success" - when error is returned, the error code is success.. $ tc filter add dev enp33s0f0 protocol ip parent ffff: flower skip_sw ip_flags nofirstfrag action drop && echo "success" || echo "failed" RTNETLINK answers: Operation not supported success ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 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 1 sibling, 0 replies; 7+ messages in thread From: Stephen Hemminger @ 2018-09-27 12:39 UTC (permalink / raw) To: Or Gerlitz; +Cc: David Ahern, Linux Netdev List, Roi Dayan On Thu, 27 Sep 2018 15:22:41 +0300 Or Gerlitz <gerlitz.or@gmail.com> wrote: > Something is still broken also after commit b45e300 "libnetlink: don't > return error on success" - when error is returned, the error code is > success.. > > $ tc filter add dev enp33s0f0 protocol ip parent ffff: flower skip_sw > ip_flags nofirstfrag action drop && echo "success" || echo "failed" > Yes this looks broken. Let me check. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 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 1 sibling, 2 replies; 7+ messages in thread From: Phil Sutter @ 2018-09-27 12:53 UTC (permalink / raw) To: Or Gerlitz; +Cc: Stephen Hemminger, David Ahern, Linux Netdev List, Roi Dayan Hi, On Thu, Sep 27, 2018 at 03:22:41PM +0300, Or Gerlitz wrote: > Something is still broken also after commit b45e300 "libnetlink: don't > return error on success" - when error is returned, the error code is > success.. > > $ tc filter add dev enp33s0f0 protocol ip parent ffff: flower skip_sw > ip_flags nofirstfrag action drop && echo "success" || echo "failed" > > RTNETLINK answers: Operation not supported > success 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? Cheers, Phil ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 2018-09-27 12:53 ` Phil Sutter @ 2018-09-28 6:22 ` Or Gerlitz 2018-10-02 12:21 ` Or Gerlitz 1 sibling, 0 replies; 7+ messages in thread From: Or Gerlitz @ 2018-09-28 6:22 UTC (permalink / raw) To: Phil Sutter, Stephen Hemminger, David Ahern, Linux Netdev List, Roi Dayan 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? I will double check, but we're on weekend + holiday, so I'll get doing that next week ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 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 1 sibling, 1 reply; 7+ messages in thread From: Or Gerlitz @ 2018-10-02 12:21 UTC (permalink / raw) To: Phil Sutter; +Cc: Stephen Hemminger, David Ahern, Linux Netdev List, Roi Dayan On Thu, Sep 27, 2018 at 3:53 PM Phil Sutter <phil@nwl.cc> wrote: > On Thu, Sep 27, 2018 at 03:22:41PM +0300, Or Gerlitz wrote: > > Something is still broken also after commit b45e300 "libnetlink: don't > > return error on success" - when error is returned, the error code is > > success.. > > > > $ tc filter add dev enp33s0f0 protocol ip parent ffff: flower skip_sw > > ip_flags nofirstfrag action drop && echo "success" || echo "failed" > > > > RTNETLINK answers: Operation not supported > > success > > 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 $ ./tc/tc filter show dev enp33s0f0 ingress filter protocol ip pref 49152 flower chain 0 filter protocol ip pref 49152 flower chain 0 handle 0x1 eth_type ipv4 ip_flags frag skip_sw in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 2018-10-02 12:21 ` Or Gerlitz @ 2018-10-08 12:41 ` Phil Sutter 2018-10-09 10:54 ` Or Gerlitz 0 siblings, 1 reply; 7+ messages in thread From: Phil Sutter @ 2018-10-08 12:41 UTC (permalink / raw) To: Or Gerlitz; +Cc: Stephen Hemminger, David Ahern, Linux Netdev List, Roi Dayan 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: re iproute2 - don't return error on success fix 2018-10-08 12:41 ` Phil Sutter @ 2018-10-09 10:54 ` Or Gerlitz 0 siblings, 0 replies; 7+ messages in thread From: Or Gerlitz @ 2018-10-09 10:54 UTC (permalink / raw) To: Phil Sutter, Stephen Hemminger, David Ahern, Linux Netdev List, Roi Dayan On Mon, Oct 8, 2018 at 3:41 PM Phil Sutter <phil@nwl.cc> wrote: > > $ ./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. I have applied the patch Vlad sent today and it solved the problem: # ./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 We have an error talking to the kernel, -1 failed ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-10-09 18:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 2018-10-09 10:54 ` Or Gerlitz
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).