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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 BF80EC43381 for ; Fri, 15 Mar 2019 21:36:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8755A218A1 for ; Fri, 15 Mar 2019 21:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726314AbfCOVgS convert rfc822-to-8bit (ORCPT ); Fri, 15 Mar 2019 17:36:18 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:33053 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfCOVgR (ORCPT ); Fri, 15 Mar 2019 17:36:17 -0400 Received: by mail-ed1-f68.google.com with SMTP id q3so2145164edg.0 for ; Fri, 15 Mar 2019 14:36:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=IURypKUufdBtuxJEChPg7g9eVw6szT2lIB0wqca5gxE=; b=WHCHfN+VSPeeCZj9F0U+EQcQU7Q0yKPtmKy7oy/gf68ktzPWpJQi0wAlE/woMJJdZL oanrZ8bvG3xIskk/dt8cy7yWYSNAOmPYckdCrYQkTCTMjXdAZyB27xNjYKxTkx4J55oN EGlBC1ezKTxoiwFsraMmJjOy9ILY6s4jPqPR8gVuYgrfQiHcq3jHeb4iemSX57kCOycg 9MC/QSYWMlrE9/M61JPiziNGL/jhX7kjnaut+wNZNPVc9YHDVlgcAdy9Pr1Mw9CeuYpw uhbQOjk/aw/nCNyZe3RNQwFfXXPP6q1PUrw9E7TbGXmehBfGbPgGI84q3QuC2ldRzyZZ 7n3Q== X-Gm-Message-State: APjAAAXJRJXaW/6TeUretIJQmfMl20dFtxBN+tC09BxRzWCZgxGRQOa5 i7xZTOqbgSYgGFXJ1/0r8OfZpA== X-Google-Smtp-Source: APXvYqyxG7qMjWAXcrvkonrvSqDXJ4EJsgjbyauP86xiyGVBK9s2W3phdhtGIhQfFx2BmJbJ3QhKfw== X-Received: by 2002:a17:906:5d2:: with SMTP id t18mr3529262ejt.144.1552685776419; Fri, 15 Mar 2019 14:36:16 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id c56sm974553edc.28.2019.03.15.14.36.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2019 14:36:15 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 2FC721804A2; Fri, 15 Mar 2019 22:29:02 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: David Miller Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net, fuller@beif.de Subject: Re: [Cake] [PATCH net] sch_cake: Interpret fwmark parameter as a bitmask In-Reply-To: <20190315.115738.147858309937637.davem@davemloft.net> References: <20190314220822.19704-1-toke@redhat.com> <20190315.115738.147858309937637.davem@davemloft.net> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 15 Mar 2019 22:29:02 +0100 Message-ID: <87r2b7x1wh.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org David Miller writes: > From: Toke Høiland-Jørgensen > Date: Thu, 14 Mar 2019 23:08:22 +0100 > >> We initially interpreted the fwmark parameter as a flag that simply turned >> on the feature, using the whole skb->mark field as the index into the CAKE >> tin_order array. However, it is quite common for different applications to >> use different parts of the mask field for their own purposes, each using a >> different mask. >> >> Support this use of subsets of the mark by interpreting the TCA_CAKE_FWMARK >> parameter as a bitmask to apply to the fwmark field when reading it. The >> result will be right-shifted by the number of unset lower bits of the mask >> before looking up the tin. >> >> In the original commit message we also failed to credit Felix Resch with >> originally suggesting the fwmark feature back in 2017; so the Suggested-By >> in this commit covers the whole fwmark feature. >> >> Fixes: 0b5c7efdfc6e ("sch_cake: Permit use of connmarks as tin classifiers") >> Suggested-by: Felix Resch >> Signed-off-by: Toke Høiland-Jørgensen > > You are lucky you decided to do this before a released kernel had this UAPI > available. Yeah; did realise we needed to make this change before a release, so it's not entirely a coincidence that I sent this now :) > Applied. Thanks! -Toke