[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ3xEMjupUcOaM_PZJ4fEBrSf+E4tMr5KzY0Eo3aG4WLYzZegg@mail.gmail.com>
Date: Wed, 25 Oct 2017 17:30:35 +0300
From: Or Gerlitz <gerlitz.or@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Or Gerlitz <ogerlitz@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>,
Jiri Pirko <jiri@...lanox.com>, mlxsw <mlxsw@...lanox.com>,
Roi Dayan <roid@...lanox.com>, Paul Blakey <paulb@...lanox.com>
Subject: Re: [PATCH net] net/sched: cls_flower: Avoid attempt to delete from
hw a flow which was not offloaded
On Wed, Oct 25, 2017 at 5:16 PM, Jiri Pirko <jiri@...nulli.us> wrote:
> Wed, Oct 25, 2017 at 04:07:26PM CEST, ogerlitz@...lanox.com wrote:
>>On 10/25/2017 4:58 PM, Jiri Pirko wrote:
>>> Wed, Oct 25, 2017 at 03:44:40PM CEST, ogerlitz@...lanox.com wrote:
>>> > If we failed to offload a flow to HW, we should not be attempting to delete
>>> > it from the HW. Also, on this case, we should be err-ing only if the flow is
>>> > not is SW, fix both issues.
>>> >
>>> > Fixes: 717503b9cf57 ('net: sched: convert cls_flower->egress_dev users to tc_setup_cb_egdev infra')
>>> > Signed-off-by: Or Gerlitz <ogerlitz@...lanox.com>
>>> > ---
>>> > net/sched/cls_flower.c | 11 ++++-------
>>> > 1 file changed, 4 insertions(+), 7 deletions(-)
>>> >
>>> > diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
>>> > index 16f58ab..b98e0cb 100644
>>> > --- a/net/sched/cls_flower.c
>>> > +++ b/net/sched/cls_flower.c
>>> > @@ -230,15 +230,12 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
>>> >
>>> > err = tc_setup_cb_call(block, &f->exts, TC_SETUP_CLSFLOWER,
>>> > &cls_flower, skip_sw);
>>> > - if (err < 0) {
>>> > - fl_hw_destroy_filter(tp, f);
>>> > - return err;
>>>
>>> As I wrote in the other thread: Yes, that is intentional. The thing is, there might be multiple block callbacks registered and to be called. If there is a fail with one, we need to cleanup all. So in your case you have 1 cb registered, that means that in case of an error during insertion, you will get cb called to remove. Driver has to take care of that. I was checking that and was under impression that mlx5 deals with that.
>>
>>I see, what about the other line I deleted of blankly returning err no matter
>>regardless if we' re on skip_sw or not, do you agree this fix is needed, also
>>see below
>
> No. That is not needed. The current behaviour with the skip_sw is the
> same as the original. I don't understand why you want to change it. I
> also don't undestand why you do 2 things in one patch.
fair enough, I will send another patch and we'll take it there
Powered by blists - more mailing lists