public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: Petr Machata <petrm@nvidia•com>, <netdev@vger•kernel.org>,
	"David S. Miller" <davem@davemloft•net>,
	Ido Schimmel <idosch@nvidia•com>
Subject: Re: [PATCH net-next v2 1/3] netdevsim: Introduce support for L3 offload xstats
Date: Mon, 14 Mar 2022 10:47:12 +0100	[thread overview]
Message-ID: <87ee34981m.fsf@nvidia.com> (raw)
In-Reply-To: <20220311170948.613fd09c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>


Jakub Kicinski <kuba@kernel•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.

  reply	other threads:[~2022-03-14  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 14:41 [PATCH net-next v2 0/3] netdevsim: Support for L3 HW stats Petr Machata
2022-03-11 14:41 ` [PATCH net-next v2 1/3] netdevsim: Introduce support for L3 offload xstats Petr Machata
2022-03-11 20:56   ` Jakub Kicinski
2022-03-12  1:09   ` Jakub Kicinski
2022-03-14  9:47     ` Petr Machata [this message]
2022-03-11 14:41 ` [PATCH net-next v2 2/3] selftests: netdevsim: hw_stats_l3: Add a new test Petr Machata
2022-03-11 14:41 ` [PATCH net-next v2 3/3] selftests: mlxsw: " Petr Machata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee34981m.fsf@nvidia.com \
    --to=petrm@nvidia$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=idosch@nvidia$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox