From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next v11 00/13] net: sched: allow qdiscs to share filter block instances Date: Wed, 17 Jan 2018 21:45:22 +0100 Message-ID: <20180117204522.GI2114@nanopsycho> References: <20180117104657.8605-1-jiri@resnulli.us> <20180117.145535.372452000577277915.davem@davemloft.net> <20180117.150338.1416187564552087719.davem@davemloft.net> <20180117201807.GH2114@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, mlxsw@mellanox.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, michael.chan@broadcom.com, ganeshgr@chelsio.com, saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com, alexander.h.duyck@intel.com, ogerlitz@mellanox.com, john.fastabend@gmail.com, daniel@iogearbox.net, dsahern@gmail.com To: David Miller Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:41740 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752778AbeAQUpY (ORCPT ); Wed, 17 Jan 2018 15:45:24 -0500 Received: by mail-wm0-f66.google.com with SMTP id f71so17759437wmf.0 for ; Wed, 17 Jan 2018 12:45:24 -0800 (PST) Content-Disposition: inline In-Reply-To: <20180117201807.GH2114@nanopsycho> Sender: netdev-owner@vger.kernel.org List-ID: Wed, Jan 17, 2018 at 09:18:07PM CET, jiri@resnulli.us wrote: >Wed, Jan 17, 2018 at 09:03:38PM CET, davem@davemloft.net wrote: >>From: David Miller >>Date: Wed, 17 Jan 2018 14:55:35 -0500 (EST) >> >>> From: Jiri Pirko >>> Date: Wed, 17 Jan 2018 11:46:44 +0100 >>> >>>> Currently the filters added to qdiscs are independent. So for example if you >>>> have 2 netdevices and you create ingress qdisc on both and you want to add >>>> identical filter rules both, you need to add them twice. This patchset >>>> makes this easier and mainly saves resources allowing to share all filters >>>> within a qdisc - I call it a "filter block". Also this helps to save >>>> resources when we do offload to hw for example to expensive TCAM. >>> >>> Series applied, thanks Jiri et al. >> >>Jiri, I'm not going to revert because of this, but please give me a follow-up >>patch which deals with this warning: >> >>net/sched/cls_api.c: In function ‘tc_dump_tfilter’: >>net/sched/cls_api.c:1362:8: warning: ‘parent’ may be used uninitialized in this function [-Wmaybe-uninitialized] >> if (!tcf_chain_dump(chain, q, parent, skb, cb, >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> index_start, &index)) >> ~~~~~~~~~~~~~~~~~~~~ >> >>It's one of those: >> >> u32 var; >> >> if (condition) { >> ... >> goto out; >> } else { >> var = whatever; >> } >> use(var); >>out: >> ... >> >>situations that GCC can't seem to see properly. > >Odd. I don't see this warning with: >gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC) > >Although parent is never used in case it is unititialize, I will >initialize to 0 to make gcc happy. Kbuild bot also did not warn about this. Hmm, I wonder, isn't this the case when gcc update fixes the warning so we don't fix it in kernel?