Lines Matching full:ns
31 struct netdevsim *ns = netdev_priv(dev); in nsim_start_xmit() local
33 if (!nsim_ipsec_tx(ns, skb)) in nsim_start_xmit()
36 u64_stats_update_begin(&ns->syncp); in nsim_start_xmit()
37 ns->tx_packets++; in nsim_start_xmit()
38 ns->tx_bytes += skb->len; in nsim_start_xmit()
39 u64_stats_update_end(&ns->syncp); in nsim_start_xmit()
53 struct netdevsim *ns = netdev_priv(dev); in nsim_change_mtu() local
55 if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU) in nsim_change_mtu()
66 struct netdevsim *ns = netdev_priv(dev); in nsim_get_stats64() local
70 start = u64_stats_fetch_begin(&ns->syncp); in nsim_get_stats64()
71 stats->tx_bytes = ns->tx_bytes; in nsim_get_stats64()
72 stats->tx_packets = ns->tx_packets; in nsim_get_stats64()
73 } while (u64_stats_fetch_retry(&ns->syncp, start)); in nsim_get_stats64()
84 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_mac() local
85 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_mac()
98 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_vlan() local
99 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_vlan()
113 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_rate() local
114 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_rate()
127 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_spoofchk() local
128 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_spoofchk()
139 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_rss_query_en() local
140 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_rss_query_en()
151 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_trust() local
152 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_trust()
164 struct netdevsim *ns = netdev_priv(dev); in nsim_get_vf_config() local
165 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_get_vf_config()
187 struct netdevsim *ns = netdev_priv(dev); in nsim_set_vf_link_state() local
188 struct nsim_bus_dev *nsim_bus_dev = ns->nsim_bus_dev; in nsim_set_vf_link_state()
212 struct netdevsim *ns = netdev_priv(dev); in nsim_setup_tc() local
219 ns, ns, true); in nsim_setup_tc()
228 struct netdevsim *ns = netdev_priv(dev); in nsim_set_features() local
231 return nsim_bpf_disable_tc(ns); in nsim_set_features()
238 struct netdevsim *ns = netdev_priv(dev); in nsim_get_devlink_port() local
240 return &ns->nsim_dev_port->devlink_port; in nsim_get_devlink_port()
289 struct netdevsim *ns; in nsim_create() local
292 dev = alloc_netdev(sizeof(*ns), "eth%d", NET_NAME_UNKNOWN, nsim_setup); in nsim_create()
297 ns = netdev_priv(dev); in nsim_create()
298 ns->netdev = dev; in nsim_create()
299 ns->nsim_dev = nsim_dev; in nsim_create()
300 ns->nsim_dev_port = nsim_dev_port; in nsim_create()
301 ns->nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_create()
302 SET_NETDEV_DEV(dev, &ns->nsim_bus_dev->dev); in nsim_create()
304 nsim_ethtool_init(ns); in nsim_create()
311 err = nsim_bpf_init(ns); in nsim_create()
315 nsim_ipsec_init(ns); in nsim_create()
322 return ns; in nsim_create()
325 nsim_ipsec_teardown(ns); in nsim_create()
326 nsim_bpf_uninit(ns); in nsim_create()
335 void nsim_destroy(struct netdevsim *ns) in nsim_destroy() argument
337 struct net_device *dev = ns->netdev; in nsim_destroy()
341 nsim_ipsec_teardown(ns); in nsim_destroy()
342 nsim_bpf_uninit(ns); in nsim_destroy()