Lines Matching refs:nsim_dev
85 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()
121 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_set_vf_rate()
124 nsim_dev->vfconfigs[vf].min_tx_rate = min; in nsim_set_vf_rate()
125 nsim_dev->vfconfigs[vf].max_tx_rate = max; in nsim_set_vf_rate()
133 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_spoofchk() local
135 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_set_vf_spoofchk()
137 nsim_dev->vfconfigs[vf].spoofchk_enabled = val; in nsim_set_vf_spoofchk()
145 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_rss_query_en() local
147 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_set_vf_rss_query_en()
149 nsim_dev->vfconfigs[vf].rss_query_enabled = val; in nsim_set_vf_rss_query_en()
157 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_trust() local
159 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_set_vf_trust()
161 nsim_dev->vfconfigs[vf].trusted = val; in nsim_set_vf_trust()
170 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_get_vf_config() local
172 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_get_vf_config()
176 ivi->linkstate = nsim_dev->vfconfigs[vf].link_state; in nsim_get_vf_config()
177 ivi->min_tx_rate = nsim_dev->vfconfigs[vf].min_tx_rate; in nsim_get_vf_config()
178 ivi->max_tx_rate = nsim_dev->vfconfigs[vf].max_tx_rate; in nsim_get_vf_config()
179 ivi->vlan = nsim_dev->vfconfigs[vf].vlan; in nsim_get_vf_config()
180 ivi->vlan_proto = nsim_dev->vfconfigs[vf].vlan_proto; in nsim_get_vf_config()
181 ivi->qos = nsim_dev->vfconfigs[vf].qos; in nsim_get_vf_config()
182 memcpy(&ivi->mac, nsim_dev->vfconfigs[vf].vf_mac, ETH_ALEN); in nsim_get_vf_config()
183 ivi->spoofchk = nsim_dev->vfconfigs[vf].spoofchk_enabled; in nsim_get_vf_config()
184 ivi->trusted = nsim_dev->vfconfigs[vf].trusted; in nsim_get_vf_config()
185 ivi->rss_query_en = nsim_dev->vfconfigs[vf].rss_query_enabled; in nsim_get_vf_config()
193 struct nsim_dev *nsim_dev = ns->nsim_dev; in nsim_set_vf_link_state() local
195 if (vf >= nsim_dev_get_vfs(nsim_dev)) in nsim_set_vf_link_state()
207 nsim_dev->vfconfigs[vf].link_state = state; in nsim_set_vf_link_state()
306 err = nsim_udp_tunnels_info_create(ns->nsim_dev, ns->netdev); in nsim_init_netdevsim()
344 nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port) in nsim_create() argument
351 nsim_dev->nsim_bus_dev->num_queues); in nsim_create()
355 dev_net_set(dev, nsim_dev_net(nsim_dev)); in nsim_create()
359 ns->nsim_dev = nsim_dev; in nsim_create()
361 ns->nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_create()