lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200310111950.GA2295@nanopsycho.orion>
Date:   Tue, 10 Mar 2020 12:19:50 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Edward Cree <ecree@...arflare.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        saeedm@...lanox.com, leon@...nel.org, michael.chan@...adcom.com,
        vishal@...lsio.com, jeffrey.t.kirsher@...el.com,
        idosch@...lanox.com, aelior@...vell.com, peppe.cavallaro@...com,
        alexandre.torgue@...com, jhs@...atatu.com,
        xiyou.wangcong@...il.com, pablo@...filter.org, mlxsw@...lanox.com
Subject: Re: [patch net-next v4 01/10] flow_offload: Introduce offload of HW
 stats type

Mon, Mar 09, 2020 at 06:46:57PM CET, ecree@...arflare.com wrote:
>On 09/03/2020 17:34, Jiri Pirko wrote:
>> Mon, Mar 09, 2020 at 05:52:16PM CET, ecree@...arflare.com wrote:
>>> An enum type seems safer.
>> Well, it's is a bitfield, how do you envision to implement it. Have enum
>> value for every combination? I don't get it.
>enum flow_action_stats_type {
>    FLOW_ACTION_HW_STATS_TYPE_DISABLED=0,
>    FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE=BIT(0),
>    FLOW_ACTION_HW_STATS_TYPE_DELAYED=BIT(1),
>    FLOW_ACTION_HW_STATS_TYPE_ANY=(FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE |
>                                   FLOW_ACTION_HW_STATS_TYPE_DELAYED),
>};
>
>It's not a requirement of the language for every value used withan
> enumeration to be a defined enumerator value, so if someone ends up
> putting (FLOW_ACTION_HW_STATS_TYPE_FOO | FLOW_ACTION_HW_STATS_TYPE_BAR)
> into (say) a driver that supports only FOO and BAR, that will work
> just fine.  I don't see what problem you expect to occur here.

Okay. Will do. Thanks!


>
>-ed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ