[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ee34981m.fsf@nvidia.com>
Date: Mon, 14 Mar 2022 10:47:12 +0100
From: Petr Machata <petrm@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Petr Machata <petrm@...dia.com>, <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next v2 1/3] netdevsim: Introduce support for L3
offload xstats
Jakub Kicinski <kuba@...nel.org> writes:
> On Fri, 11 Mar 2022 15:41:22 +0100 Petr Machata wrote:
>> +static const struct file_operations nsim_dev_hwstats_generic_fops = {
>> + .open = simple_open,
>> + .write = nsim_dev_hwstats_do_write,
>> + .llseek = generic_file_llseek,
>> + .owner = THIS_MODULE,
>> +};
>> +
>> +static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_disable_fops = {
>> + .fops = nsim_dev_hwstats_generic_fops,
>> + .action = NSIM_DEV_HWSTATS_DO_DISABLE,
>> + .type = NETDEV_OFFLOAD_XSTATS_TYPE_L3,
>> +};
>> +
>> +static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_enable_fops = {
>> + .fops = nsim_dev_hwstats_generic_fops,
>> + .action = NSIM_DEV_HWSTATS_DO_ENABLE,
>> + .type = NETDEV_OFFLOAD_XSTATS_TYPE_L3,
>> +};
>> +
>> +static const struct nsim_dev_hwstats_fops nsim_dev_hwstats_l3_fail_fops = {
>> + .fops = nsim_dev_hwstats_generic_fops,
>> + .action = NSIM_DEV_HWSTATS_DO_FAIL,
>> + .type = NETDEV_OFFLOAD_XSTATS_TYPE_L3,
>> +};
>
> clang is not on board :(
>
> drivers/net/netdevsim/hwstats.c:404:10: error: initializer element is not a compile-time constant
> .fops = nsim_dev_hwstats_generic_fops,
OK, I'll figure out another way to do away with the redundancy. Or else
inline the definitions.
Powered by blists - more mailing lists