Home
last modified time | relevance | path

Searched refs:nsim_dev (Results 1 – 9 of 9) sorted by relevance

/drivers/net/netdevsim/
Ddev.c59 unsigned int nsim_dev_get_vfs(struct nsim_dev *nsim_dev) in nsim_dev_get_vfs() argument
62 !devl_lock_is_held(priv_to_devlink(nsim_dev))); in nsim_dev_get_vfs()
64 return nsim_dev->nsim_bus_dev->num_vfs; in nsim_dev_get_vfs()
100 struct nsim_dev *nsim_dev = file->private_data; in nsim_dev_take_snapshot_write() local
106 devlink = priv_to_devlink(nsim_dev); in nsim_dev_take_snapshot_write()
118 err = devlink_region_snapshot_create(nsim_dev->dummy_region, in nsim_dev_take_snapshot_write()
141 struct nsim_dev *nsim_dev = file->private_data; in nsim_dev_trap_fa_cookie_read() local
147 spin_lock(&nsim_dev->fa_cookie_lock); in nsim_dev_trap_fa_cookie_read()
148 fa_cookie = nsim_dev->fa_cookie; in nsim_dev_trap_fa_cookie_read()
160 spin_unlock(&nsim_dev->fa_cookie_lock); in nsim_dev_trap_fa_cookie_read()
[all …]
Dnetdev.c85 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_mac() local
88 if (vf >= nsim_dev_get_vfs(nsim_dev) || is_multicast_ether_addr(mac)) in nsim_set_vf_mac()
90 memcpy(nsim_dev->vfconfigs[vf].vf_mac, mac, ETH_ALEN); in nsim_set_vf_mac()
99 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_vlan() local
101 if (vf >= nsim_dev_get_vfs(nsim_dev) || vlan > 4095 || qos > 7) in nsim_set_vf_vlan()
104 nsim_dev->vfconfigs[vf].vlan = vlan; in nsim_set_vf_vlan()
105 nsim_dev->vfconfigs[vf].qos = qos; in nsim_set_vf_vlan()
106 nsim_dev->vfconfigs[vf].vlan_proto = vlan_proto; in nsim_set_vf_vlan()
114 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_rate() local
116 if (nsim_esw_mode_is_switchdev(ns->nsim_dev)) { in nsim_set_vf_rate()
[all …]
Dnetdevsim.h74 struct nsim_dev *nsim_dev; member
108 nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port);
113 void nsim_udp_tunnels_debugfs_create(struct nsim_dev *nsim_dev);
114 int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev,
119 int nsim_bpf_dev_init(struct nsim_dev *nsim_dev);
120 void nsim_bpf_dev_exit(struct nsim_dev *nsim_dev);
129 static inline int nsim_bpf_dev_init(struct nsim_dev *nsim_dev) in nsim_bpf_dev_init() argument
134 static inline void nsim_bpf_dev_exit(struct nsim_dev *nsim_dev) in nsim_bpf_dev_exit() argument
184 int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink);
185 void nsim_dev_health_exit(struct nsim_dev *nsim_dev);
[all …]
Dudp_tunnels.c130 int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev, in nsim_udp_tunnels_info_create() argument
136 if (nsim_dev->udp_ports.shared && nsim_dev->udp_ports.open_only) { in nsim_udp_tunnels_info_create()
137 dev_err(&nsim_dev->nsim_bus_dev->dev, in nsim_udp_tunnels_info_create()
142 if (!nsim_dev->udp_ports.shared) in nsim_udp_tunnels_info_create()
145 ns->udp_ports.ports = nsim_dev->udp_ports.__ports; in nsim_udp_tunnels_info_create()
173 ns->udp_ports.sleep = nsim_dev->udp_ports.sleep; in nsim_udp_tunnels_info_create()
175 if (nsim_dev->udp_ports.sync_all) { in nsim_udp_tunnels_info_create()
184 if (nsim_dev->udp_ports.open_only) in nsim_udp_tunnels_info_create()
186 if (nsim_dev->udp_ports.ipv4_only) in nsim_udp_tunnels_info_create()
188 if (nsim_dev->udp_ports.shared) in nsim_udp_tunnels_info_create()
[all …]
Dpsample.c133 static int nsim_dev_psample_enable(struct nsim_dev *nsim_dev) in nsim_dev_psample_enable() argument
135 struct nsim_dev_psample *psample = nsim_dev->psample; in nsim_dev_psample_enable()
142 devlink = priv_to_devlink(nsim_dev); in nsim_dev_psample_enable()
156 static int nsim_dev_psample_disable(struct nsim_dev *nsim_dev) in nsim_dev_psample_disable() argument
158 struct nsim_dev_psample *psample = nsim_dev->psample; in nsim_dev_psample_disable()
175 struct nsim_dev *nsim_dev = file->private_data; in nsim_dev_psample_enable_write() local
184 err = nsim_dev_psample_enable(nsim_dev); in nsim_dev_psample_enable_write()
186 err = nsim_dev_psample_disable(nsim_dev); in nsim_dev_psample_enable_write()
198 int nsim_dev_psample_init(struct nsim_dev *nsim_dev) in nsim_dev_psample_init() argument
206 nsim_dev->psample = psample; in nsim_dev_psample_init()
[all …]
Dbpf.c30 struct nsim_dev *nsim_dev; member
69 if (state->nsim_dev->bpf_bind_verifier_delay && !insn_idx) in nsim_bpf_verify_insn()
70 msleep(state->nsim_dev->bpf_bind_verifier_delay); in nsim_bpf_verify_insn()
75 if (!state->nsim_dev->bpf_bind_verifier_accept) in nsim_bpf_verify_insn()
218 static int nsim_bpf_create_prog(struct nsim_dev *nsim_dev, in nsim_bpf_create_prog() argument
229 state->nsim_dev = nsim_dev; in nsim_bpf_create_prog()
234 sprintf(name, "%u", nsim_dev->prog_id_gen++); in nsim_bpf_create_prog()
235 state->ddir = debugfs_create_dir(name, nsim_dev->ddir_bpf_bound_progs); in nsim_bpf_create_prog()
247 list_add_tail(&state->l, &nsim_dev->bpf_bound_progs); in nsim_bpf_create_prog()
256 struct nsim_dev *nsim_dev = in nsim_bpf_verifier_prep() local
[all …]
Dhwstats.c221 struct nsim_dev *nsim_dev; in nsim_dev_hwstats_enable_ifindex() local
227 nsim_dev = container_of(hwstats, struct nsim_dev, hwstats); in nsim_dev_hwstats_enable_ifindex()
228 net = nsim_dev_net(nsim_dev); in nsim_dev_hwstats_enable_ifindex()
410 int nsim_dev_hwstats_init(struct nsim_dev *nsim_dev) in nsim_dev_hwstats_init() argument
412 struct nsim_dev_hwstats *hwstats = &nsim_dev->hwstats; in nsim_dev_hwstats_init()
413 struct net *net = nsim_dev_net(nsim_dev); in nsim_dev_hwstats_init()
424 hwstats->ddir = debugfs_create_dir("hwstats", nsim_dev->ddir); in nsim_dev_hwstats_init()
476 void nsim_dev_hwstats_exit(struct nsim_dev *nsim_dev) in nsim_dev_hwstats_exit() argument
478 struct nsim_dev_hwstats *hwstats = &nsim_dev->hwstats; in nsim_dev_hwstats_exit()
479 struct net *net = nsim_dev_net(nsim_dev); in nsim_dev_hwstats_exit()
Dhealth.c230 int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink) in nsim_dev_health_init() argument
232 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_init()
251 health->ddir = debugfs_create_dir("health", nsim_dev->ddir); in nsim_dev_health_init()
275 void nsim_dev_health_exit(struct nsim_dev *nsim_dev) in nsim_dev_health_exit() argument
277 struct nsim_dev_health *health = &nsim_dev->health; in nsim_dev_health_exit()
Dfib.c1519 nsim_fib_debugfs_init(struct nsim_fib_data *data, struct nsim_dev *nsim_dev) in nsim_fib_debugfs_init() argument
1521 data->ddir = debugfs_create_dir("fib", nsim_dev->ddir); in nsim_fib_debugfs_init()
1555 struct nsim_dev *nsim_dev; in nsim_fib_create() local
1563 nsim_dev = devlink_priv(devlink); in nsim_fib_create()
1564 err = nsim_fib_debugfs_init(data, nsim_dev); in nsim_fib_create()