[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200420141422.GK6581@nanopsycho.orion>
Date: Mon, 20 Apr 2020 16:14:22 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Florian Westphal <fw@...len.de>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Edward Cree <ecree@...arflare.com>,
netfilter-devel@...r.kernel.org, davem@...emloft.net,
netdev@...r.kernel.org, kuba@...nel.org
Subject: Re: [PATCH net] net: flow_offload: skip hw stats check for
FLOW_ACTION_HW_STATS_DISABLED
Mon, Apr 20, 2020 at 03:57:54PM CEST, fw@...len.de wrote:
>Jiri Pirko <jiri@...nulli.us> wrote:
>> Mon, Apr 20, 2020 at 02:39:15PM CEST, pablo@...filter.org wrote:
>> >On Mon, Apr 20, 2020 at 01:28:22PM +0100, Edward Cree wrote:
>> >> On 20/04/2020 12:52, Jiri Pirko wrote:
>> >> > However for TC, when user specifies "HW_STATS_DISABLED", the driver
>> >> > should not do stats.
>> >>
>> >> What should a driver do if the user specifies DISABLED, but the stats
>> >> are still needed for internal bookkeeping (e.g. to prod an ARP entry
>> >> that's in use for encapsulation offload, so that it doesn't get
>> >> expired out of the cache)? Enable the stats on the HW anyway but
>> >> not report them to FLOW_CLS_STATS? Or return an error?
>> >
>> >My interpretation is that HW_STATS_DISABLED means that the front-end
>> >does not care / does not need counters. The driver can still allocate
>>
>> That is wrong interpretation. If user does not care, he specifies "ANY".
>> That is the default.
>>
>> When he says "DISABLED" he means disabled. Not "I don't care".
>
>Under what circumstances would the user care about this?
On some HW, the stats are separate resource. The user instructs the
stats to be disabled so safe resources. It is explicit. He like to safe
the resources for other usage (he can list them in devlink resource).
>Rejecting such config seems to be just to annoy user?
Well, the user passed the arg, he should know what is he doing. There's
no annoyment.
>
>I mean, the user is forced to use SW datapath just because HW can't turn
>off stats?! Same for a config change, why do i need to change my rules
By default, they are on. That is what user should do in most of the
cases.
>to say 'enable stats' even though I don't need them in first place?
It may require to program HW differently (as in case of mlxsw).
>
>Unlike the inverse (want feature X but HW can't support it), it makes
>no sense to me to reject with an error here:
>stats-off is just a hint that can be safely ignored.
Powered by blists - more mailing lists