From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [fw filter]: Broken! fw mark based tc class selection not working Date: Mon, 14 Sep 2015 15:04:01 -0700 Message-ID: References: <55F6BD55.6080503@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Akshat Kakkar , netdev , Cong Wang , Stephen Hemminger To: Jamal Hadi Salim Return-path: Received: from mail-yk0-f176.google.com ([209.85.160.176]:33520 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbbINWED (ORCPT ); Mon, 14 Sep 2015 18:04:03 -0400 Received: by ykft14 with SMTP id t14so15357482ykf.0 for ; Mon, 14 Sep 2015 15:04:02 -0700 (PDT) In-Reply-To: <55F6BD55.6080503@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Sep 14, 2015 at 5:28 AM, Jamal Hadi Salim wrote: > On 09/11/15 20:00, Cong Wang wrote: >> >> On Fri, Sep 11, 2015 at 3:24 PM, Akshat Kakkar >> wrote: > > >> Hmm, I didn't know that before either. Looks like my tp->init change >> breaks it. >> >> Could you try the following patch? >> > > I would just make init() empty for this classifier (return 0?). > If someone wants to add classids ids, change() is available. > The most common (efficient) use case is what Akshat shows. > So even the check in the classify should optimize for that i.e > if (head == NULL) > do old method > else > ... That is exactly the original code. But it is not readable at all, at least I still missed it when I touched the tp->init() part. :( Having a boolean doesn't harm anything.