diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-30 16:15:04 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-01 13:29:41 +0000 |
commit | a3353ec3255437f59537f9478ea5cd7107ba1ebf (patch) | |
tree | 7fe799a651058d89bcbc661302af5b005a62b395 /drivers/net/netdevsim/netdevsim.h | |
parent | 1c401078bcf34e91e183b61b2d926972fc03b548 (diff) |
netdevsim: move max vf config to dev
max_vfs is a strange little beast because the file
hangs off of nsim's debugfs, but it configures a field
in the bus device. Move it to dev.c, let's look at it
as if the device driver was imposing VF limit based
on FW info (like pci_sriov_set_totalvfs()).
Again, when moving refactor the function not to hold
the vfs lock pointlessly while parsing the input.
Wrap the access from the read side in READ_ONCE()
to appease concurrency checkers. Do not check if
return value from snprintf() is negative...
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
-rw-r--r-- | drivers/net/netdevsim/netdevsim.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index 8da5f82e5cfc..fd7133407f05 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -317,13 +317,6 @@ void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *fib_data); u64 nsim_fib_get_val(struct nsim_fib_data *fib_data, enum nsim_resource_id res_id, bool max); -ssize_t nsim_bus_dev_max_vfs_read(struct file *file, - char __user *data, - size_t count, loff_t *ppos); -ssize_t nsim_bus_dev_max_vfs_write(struct file *file, - const char __user *data, - size_t count, loff_t *ppos); - static inline bool nsim_dev_port_is_pf(struct nsim_dev_port *nsim_dev_port) { return nsim_dev_port->port_type == NSIM_DEV_PORT_TYPE_PF; |