[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220310211301.477e323c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 10 Mar 2022 21:13:01 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 1/3] netdevsim: Introduce support for L3
offload xstats
On Thu, 10 Mar 2022 17:12:22 +0100 Petr Machata wrote:
> +static ssize_t nsim_dev_hwstats_l3_enable_write(struct file *file,
> + const char __user *data,
> + size_t count, loff_t *ppos)
> +{
> + return nsim_dev_hwstats_do_write(file, data, count, ppos,
> + NSIM_DEV_HWSTATS_DO_ENABLE,
> + NETDEV_OFFLOAD_XSTATS_TYPE_L3);
> +}
I think you could avoid having the three wrappers if you kept
separate fops and added a switch to the write function keying
on debugfs_real_fops().
With that:
Acked-by: Jakub Kicinski <kuba@...nel.org>
Powered by blists - more mailing lists