From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH net] net: sched: cls_flower: validate nested enc_opts_policy to avoid build warning Date: Fri, 9 Nov 2018 20:58:12 -0800 Message-ID: <20181109205812.019637e2@cakuba.netronome.com> References: <20181109224122.29609-1-jakub.kicinski@netronome.com> <20181109.204025.1856075959976079971.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: oss-drivers@netronome.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-qk1-f172.google.com ([209.85.222.172]:43189 "EHLO mail-qk1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728567AbeKJPl4 (ORCPT ); Sat, 10 Nov 2018 10:41:56 -0500 Received: by mail-qk1-f172.google.com with SMTP id r71so5479182qkr.10 for ; Fri, 09 Nov 2018 21:58:09 -0800 (PST) In-Reply-To: <20181109.204025.1856075959976079971.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 09 Nov 2018 20:40:25 -0800 (PST), David Miller wrote: > From: Jakub Kicinski > Date: Fri, 9 Nov 2018 14:41:22 -0800 > > > TCA_FLOWER_KEY_ENC_OPTS and TCA_FLOWER_KEY_ENC_OPTS_MASK can only > > currently contain further nested attributes, which are parsed by > > hand, so the policy is never actually used. Add the validation > > anyway to avoid potential bugs when other attributes are added > > and to make the attribute structure slightly more clear. Validation > > will also set extact to point to bad attribute on error. > > > > Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options") > > Signed-off-by: Jakub Kicinski > > Acked-by: Simon Horman > > If this fixes a build warning, please include the build warning > message in your commit log. > > Thanks! Ah, sorry, it's a W=1 warning, which should have been mentioned, too. I'll repost shortly!