[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6e83fd83-86fd-981a-d080-269b9fd3e20f@solarflare.com>
Date: Wed, 20 May 2020 18:52:15 +0100
From: Edward Cree <ecree@...arflare.com>
To: Pablo Neira Ayuso <pablo@...filter.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<netfilter-devel@...r.kernel.org>, <jiri@...nulli.us>,
<kuba@...nel.org>
Subject: Re: [PATCH v3 net-next] net: flow_offload: simplify hw stats check
handling
On 20/05/2020 18:32, Pablo Neira Ayuso wrote:
> On Wed, May 20, 2020 at 06:31:05PM +0100, Edward Cree wrote:
>> On 20/05/2020 18:21, Edward Cree wrote:
>>> @@ -582,7 +590,7 @@ nf_flow_offload_rule_alloc(struct net *net,
>>> const struct flow_offload_tuple *tuple;
>>> struct nf_flow_rule *flow_rule;
>>> struct dst_entry *other_dst;
>>> - int err = -ENOMEM;
>>> + int err = -ENOMEM, i;
>>>
>>> flow_rule = kzalloc(sizeof(*flow_rule), GFP_KERNEL);
>>> if (!flow_rule)
>> Whoops, this changebar isn't meant to be there. Somehow I missed
>> the unused var warning when I built it, too.
>> Drop this, I'll spin v4.
> The nf_tables_offload.c update is missing, please include this in v4.
Hmm. Rather than me trying to whack-a-mole all the places in
netfilter that create actions... given that the other user is TC,
which explicitly sets hw_stats, maybe I should instead make
flow_rule_alloc() populate all the hw_stats with DONT_CARE?
It certainly makes for a shorter patch, and makes it less likely
that bugs will be introduced later when new action offloads get
added to netfilter by forgetting to set hw_stats.
And it means the patch doesn't rely on me knowing things about
netfilter internals which I apparently don't.
-ed
Powered by blists - more mailing lists