From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 328323BA8E for ; Fri, 15 Mar 2019 14:57:42 -0400 (EDT) Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 463CC14D9FA6B; Fri, 15 Mar 2019 11:57:39 -0700 (PDT) Date: Fri, 15 Mar 2019 11:57:38 -0700 (PDT) Message-Id: <20190315.115738.147858309937637.davem@davemloft.net> To: toke@redhat.com Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net, fuller@beif.de From: David Miller In-Reply-To: <20190314220822.19704-1-toke@redhat.com> References: <20190314220822.19704-1-toke@redhat.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 15 Mar 2019 11:57:39 -0700 (PDT) Subject: Re: [Cake] [PATCH net] sch_cake: Interpret fwmark parameter as a bitmask X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 18:57:42 -0000 From: Toke H=F8iland-J=F8rgensen Date: Thu, 14 Mar 2019 23:08:22 +0100 > We initially interpreted the fwmark parameter as a flag that simply t= urned > 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 applicatio= ns to > use different parts of the mask field for their own purposes, each us= ing 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 w= ith > originally suggesting the fwmark feature back in 2017; so the Suggest= ed-By > in this commit covers the whole fwmark feature. > = > Fixes: 0b5c7efdfc6e ("sch_cake: Permit use of connmarks as tin classi= fiers") > Suggested-by: Felix Resch > Signed-off-by: Toke H=F8iland-J=F8rgensen You are lucky you decided to do this before a released kernel had this = UAPI available. Applied.