Subject: Re: [PATCH net-next 02/12] net: sched: flower: refactor fl_change

From: Stefano Brivio <[email-masked]>
Date: Mon, 18 Feb 2019 19:20:20 +0100

On Fri, 15 Feb 2019 16:25:52 +0000
Vlad Buslov <[email-masked]> wrote:

> On Fri 15 Feb 2019 at 10:47, Stefano Brivio <[email-masked]> wrote:
>
> > Ah, of course. Thanks for clarifying. By the way, what tricked me here
> > was this check in fl_change():
> >
> > 	if (fold && handle && fold->handle != handle)
> > 		...
> >
> > which could be turned into:
> >
> > 	if (fold && fold->handle != handle)
> > 		...
> >
> > at this point.  
> 
> At this point I don't think this check is needed at all because fold
> can't suddenly change its handle in between this check and initial
> lookup in cls API.

Oh, right.

> Looking at commit history, this check is present since original commit
> by Jiri that implements flower classifier. Maybe semantics of cls API
> was different back then?

I wasn't able to figure that out either... Jiri?

-- 
Stefano