Lines Matching refs:ndev_ctx

65 	struct net_device_context *ndev_ctx = netdev_priv(net);  in netvsc_change_rx_flags()  local
66 struct net_device *vf_netdev = rtnl_dereference(ndev_ctx->vf_netdev); in netvsc_change_rx_flags()
85 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_set_rx_mode() local
90 vf_netdev = rcu_dereference(ndev_ctx->vf_netdev); in netvsc_set_rx_mode()
96 nvdev = rcu_dereference(ndev_ctx->nvdev); in netvsc_set_rx_mode()
113 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_open() local
114 struct net_device *vf_netdev = rtnl_dereference(ndev_ctx->vf_netdev); in netvsc_open()
115 struct netvsc_device *nvdev = rtnl_dereference(ndev_ctx->nvdev); in netvsc_open()
500 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_vf_xmit() local
510 = this_cpu_ptr(ndev_ctx->vf_stats); in netvsc_vf_xmit()
517 this_cpu_inc(ndev_ctx->vf_stats->tx_dropped); in netvsc_vf_xmit()
747 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_linkstatus_callback() local
764 ndev_ctx->speed = speed; in netvsc_linkstatus_callback()
782 spin_lock_irqsave(&ndev_ctx->lock, flags); in netvsc_linkstatus_callback()
783 list_add_tail(&event->list, &ndev_ctx->reconfig_events); in netvsc_linkstatus_callback()
784 spin_unlock_irqrestore(&ndev_ctx->lock, flags); in netvsc_linkstatus_callback()
786 schedule_delayed_work(&ndev_ctx->dwork, 0); in netvsc_linkstatus_callback()
1029 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_detach() local
1030 struct hv_device *hdev = ndev_ctx->device_ctx; in netvsc_detach()
1068 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_attach() local
1069 struct hv_device *hdev = ndev_ctx->device_ctx; in netvsc_attach()
1274 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_get_vf_stats() local
1281 = per_cpu_ptr(ndev_ctx->vf_stats, i); in netvsc_get_vf_stats()
1304 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_get_pcpu_stats() local
1305 struct netvsc_device *nvdev = rcu_dereference_rtnl(ndev_ctx->nvdev); in netvsc_get_pcpu_stats()
1311 per_cpu_ptr(ndev_ctx->vf_stats, i); in netvsc_get_pcpu_stats()
1362 struct net_device_context *ndev_ctx = netdev_priv(net); in netvsc_get_stats64() local
1369 nvdev = rcu_dereference(ndev_ctx->nvdev); in netvsc_get_stats64()
1988 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_get_msglevel() local
1990 return ndev_ctx->msg_enable; in netvsc_get_msglevel()
1995 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_set_msglevel() local
1997 ndev_ctx->msg_enable = val; in netvsc_set_msglevel()
2048 struct net_device_context *ndev_ctx = in netvsc_link_change() local
2050 struct hv_device *device_obj = ndev_ctx->device_ctx; in netvsc_link_change()
2060 schedule_delayed_work(&ndev_ctx->dwork, LINKCHANGE_INT); in netvsc_link_change()
2064 net_device = rtnl_dereference(ndev_ctx->nvdev); in netvsc_link_change()
2070 next_reconfig = ndev_ctx->last_reconfig + LINKCHANGE_INT; in netvsc_link_change()
2078 schedule_delayed_work(&ndev_ctx->dwork, delay); in netvsc_link_change()
2081 ndev_ctx->last_reconfig = jiffies; in netvsc_link_change()
2083 spin_lock_irqsave(&ndev_ctx->lock, flags); in netvsc_link_change()
2084 if (!list_empty(&ndev_ctx->reconfig_events)) { in netvsc_link_change()
2085 event = list_first_entry(&ndev_ctx->reconfig_events, in netvsc_link_change()
2088 reschedule = !list_empty(&ndev_ctx->reconfig_events); in netvsc_link_change()
2090 spin_unlock_irqrestore(&ndev_ctx->lock, flags); in netvsc_link_change()
2124 spin_lock_irqsave(&ndev_ctx->lock, flags); in netvsc_link_change()
2125 list_add(&event->list, &ndev_ctx->reconfig_events); in netvsc_link_change()
2126 spin_unlock_irqrestore(&ndev_ctx->lock, flags); in netvsc_link_change()
2141 schedule_delayed_work(&ndev_ctx->dwork, LINKCHANGE_INT); in netvsc_link_change()
2173 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_vf_handle_frame() local
2175 = this_cpu_ptr(ndev_ctx->vf_stats); in netvsc_vf_handle_frame()
2196 struct net_device_context *ndev_ctx = netdev_priv(ndev); in netvsc_vf_join() local
2220 schedule_delayed_work(&ndev_ctx->vf_takeover, VF_TAKEOVER_INT); in netvsc_vf_join()
2266 struct net_device_context *ndev_ctx in netvsc_vf_setup() local
2268 struct net_device *ndev = hv_get_drvdata(ndev_ctx->device_ctx); in netvsc_vf_setup()
2272 schedule_delayed_work(&ndev_ctx->vf_takeover, 0); in netvsc_vf_setup()
2276 vf_netdev = rtnl_dereference(ndev_ctx->vf_netdev); in netvsc_vf_setup()
2289 struct net_device_context *ndev_ctx; in get_netvsc_byslot() local
2308 list_for_each_entry(ndev_ctx, &netvsc_dev_list, list) { in get_netvsc_byslot()
2309 if (!ndev_ctx->vf_alloc) in get_netvsc_byslot()
2312 if (ndev_ctx->vf_serial == serial) in get_netvsc_byslot()
2313 return hv_get_drvdata(ndev_ctx->device_ctx); in get_netvsc_byslot()
2563 struct net_device_context *ndev_ctx; in netvsc_remove() local
2573 ndev_ctx = netdev_priv(net); in netvsc_remove()
2575 cancel_delayed_work_sync(&ndev_ctx->dwork); in netvsc_remove()
2578 nvdev = rtnl_dereference(ndev_ctx->nvdev); in netvsc_remove()
2588 vf_netdev = rtnl_dereference(ndev_ctx->vf_netdev); in netvsc_remove()
2596 list_del(&ndev_ctx->list); in netvsc_remove()
2602 free_percpu(ndev_ctx->vf_stats); in netvsc_remove()
2609 struct net_device_context *ndev_ctx; in netvsc_suspend() local
2616 ndev_ctx = netdev_priv(net); in netvsc_suspend()
2617 cancel_delayed_work_sync(&ndev_ctx->dwork); in netvsc_suspend()
2621 nvdev = rtnl_dereference(ndev_ctx->nvdev); in netvsc_suspend()
2628 ndev_ctx->saved_netvsc_dev_info = netvsc_devinfo_get(nvdev); in netvsc_suspend()