From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB561C43381 for ; Mon, 18 Feb 2019 18:20:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A67432146E for ; Mon, 18 Feb 2019 18:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389892AbfBRSU2 (ORCPT ); Mon, 18 Feb 2019 13:20:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41450 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389263AbfBRSU1 (ORCPT ); Mon, 18 Feb 2019 13:20:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64C60ADAC8; Mon, 18 Feb 2019 18:20:27 +0000 (UTC) Received: from localhost (ovpn-200-19.brq.redhat.com [10.40.200.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C92351001F40; Mon, 18 Feb 2019 18:20:24 +0000 (UTC) Date: Mon, 18 Feb 2019 19:20:20 +0100 From: Stefano Brivio To: Vlad Buslov , "jiri@resnulli.us" Cc: "netdev@vger.kernel.org" , "jhs@mojatatu.com" , "xiyou.wangcong@gmail.com" , "davem@davemloft.net" Subject: Re: [PATCH net-next 02/12] net: sched: flower: refactor fl_change Message-ID: <20190218192020.5c83a494@redhat.com> In-Reply-To: References: <20190214074712.17846-1-vladbu@mellanox.com> <20190214074712.17846-3-vladbu@mellanox.com> <20190214213402.67919dea@redhat.com> <20190215114706.244fb7c2@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 18 Feb 2019 18:20:27 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 15 Feb 2019 16:25:52 +0000 Vlad Buslov wrote: > On Fri 15 Feb 2019 at 10:47, Stefano Brivio 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