All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Roman Mashak <mrv@mojatatu.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@mellanox.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: broken behaviour of TC filter delete
Date: Sat, 25 Aug 2018 15:02:43 +0200	[thread overview]
Message-ID: <20180825130243.GE2931@nanopsycho> (raw)
In-Reply-To: <CAM_iQpXDG4YdiUrqFhn7fxsbTBMBdR4x-ZQQ3U5E_xSPf-PANQ@mail.gmail.com>

Fri, Aug 24, 2018 at 08:11:07PM CEST, xiyou.wangcong@gmail.com wrote:
>On Fri, Aug 24, 2018 at 9:21 AM Roman Mashak <mrv@mojatatu.com> wrote:
>>
>> So _before_ commit f71e0ca4db187af7c44987e9d21e9042c3046070 step 6 would
>> return -ENOENT with "Error: Filter with specified priority/protocol not
>> found." and _after_ the commit it returns -EINVAL (Error: Cannot find
>> specified filter chain.)
>>
>> ENOENT seems to be more logical to return when there's no more filter to delete.
>
>Yeah, at least we should keep ENOENT for compatibility.
>
>The bug here is chain 0 is gone after the last filter is gone,
>so when you delete the filter again, it treats it as you specify
>chain 0 which does not exist, so it hits EINVAL before ENOENT.

I understand. My concern is about consistency with other chains. Perhaps
-ENOENT for all chains in this case would be doable. What do you think?

>
>I am not sure how to fix this properly.

  reply	other threads:[~2018-08-25 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 21:39 broken behaviour of TC filter delete Roman Mashak
2018-08-24  8:17 ` Jiri Pirko
2018-08-24 16:18   ` Roman Mashak
2018-08-24 18:11     ` Cong Wang
2018-08-25 13:02       ` Jiri Pirko [this message]
2018-08-26 17:48         ` Jamal Hadi Salim
2018-08-27 18:30         ` Cong Wang

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=20180825130243.GE2931@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=jhs@mojatatu.com \
    --cc=jiri@mellanox.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.