Home
last modified time | relevance | path

Searched refs:nsim_bus_dev (Results 1 – 5 of 5) sorted by relevance

/kernel/linux/linux-5.10/drivers/net/netdevsim/
Dbus.c22 static struct nsim_bus_dev *to_nsim_bus_dev(struct device *dev) in to_nsim_bus_dev()
24 return container_of(dev, struct nsim_bus_dev, dev); in to_nsim_bus_dev()
27 static int nsim_bus_dev_vfs_enable(struct nsim_bus_dev *nsim_bus_dev, in nsim_bus_dev_vfs_enable() argument
30 nsim_bus_dev->vfconfigs = kcalloc(num_vfs, in nsim_bus_dev_vfs_enable()
33 if (!nsim_bus_dev->vfconfigs) in nsim_bus_dev_vfs_enable()
35 nsim_bus_dev->num_vfs = num_vfs; in nsim_bus_dev_vfs_enable()
40 static void nsim_bus_dev_vfs_disable(struct nsim_bus_dev *nsim_bus_dev) in nsim_bus_dev_vfs_disable() argument
42 kfree(nsim_bus_dev->vfconfigs); in nsim_bus_dev_vfs_disable()
43 nsim_bus_dev->vfconfigs = NULL; in nsim_bus_dev_vfs_disable()
44 nsim_bus_dev->num_vfs = 0; in nsim_bus_dev_vfs_disable()
[all …]
Dnetdev.c85 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_mac() local
88 if (vf >= nsim_bus_dev->num_vfs || is_multicast_ether_addr(mac)) in nsim_set_vf_mac()
90 memcpy(nsim_bus_dev->vfconfigs[vf].vf_mac, mac, ETH_ALEN); in nsim_set_vf_mac()
99 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_vlan() local
101 if (vf >= nsim_bus_dev->num_vfs || vlan > 4095 || qos > 7) in nsim_set_vf_vlan()
104 nsim_bus_dev->vfconfigs[vf].vlan = vlan; in nsim_set_vf_vlan()
105 nsim_bus_dev->vfconfigs[vf].qos = qos; in nsim_set_vf_vlan()
106 nsim_bus_dev->vfconfigs[vf].vlan_proto = vlan_proto; in nsim_set_vf_vlan()
114 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_rate() local
116 if (vf >= nsim_bus_dev->num_vfs) in nsim_set_vf_rate()
[all …]
Dnetdevsim.h70 struct nsim_bus_dev *nsim_bus_dev; member
184 struct nsim_bus_dev *nsim_bus_dev; member
233 int nsim_dev_probe(struct nsim_bus_dev *nsim_bus_dev);
234 void nsim_dev_remove(struct nsim_bus_dev *nsim_bus_dev);
235 int nsim_dev_port_add(struct nsim_bus_dev *nsim_bus_dev,
237 int nsim_dev_port_del(struct nsim_bus_dev *nsim_bus_dev,
278 struct nsim_bus_dev { struct
Ddev.c199 sprintf(dev_ddir_name, DRV_NAME "%u", nsim_dev->nsim_bus_dev->dev.id); in nsim_dev_debugfs_init()
257 nsim_dev->nsim_bus_dev->dev.id); in nsim_dev_port_debugfs_init()
1000 struct nsim_bus_dev *nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_dev_reload_create() local
1031 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_dev_reload_create()
1053 int nsim_dev_probe(struct nsim_bus_dev *nsim_bus_dev) in nsim_dev_probe() argument
1062 devlink_net_set(devlink, nsim_bus_dev->initial_net); in nsim_dev_probe()
1064 nsim_dev->nsim_bus_dev = nsim_bus_dev; in nsim_dev_probe()
1075 dev_set_drvdata(&nsim_bus_dev->dev, nsim_dev); in nsim_dev_probe()
1081 err = devlink_register(devlink, &nsim_bus_dev->dev); in nsim_dev_probe()
1117 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_dev_probe()
[all …]
Dudp_tunnels.c137 dev_err(&nsim_dev->nsim_bus_dev->dev, in nsim_udp_tunnels_info_create()