src/netvsc_drv.c
/* VF up/down change detected, schedule to change data path */
VF up/down change detected, schedule to change data path
VF up / down change detected schedule to change data path
static int netvsc_vf_changed(struct net_device *vf_netdev)
{
	struct net_device_context *net_device_ctx;
	struct netvsc_device *netvsc_dev;
	struct net_device *ndev;
	bool vf_is_up = netif_running(vf_netdev);
	ndev = get_netvsc_byref(vf_netdev);
	if (!ndev)
		return NOTIFY_DONE;
	net_device_ctx = netdev_priv(ndev);
	netvsc_dev = rtnl_dereference(net_device_ctx->nvdev);
	if (!netvsc_dev)
		return NOTIFY_DONE;
	netvsc_switch_datapath(ndev, vf_is_up);
	netdev_info(ndev, "Data path switched %s VF: %s\n",
		    vf_is_up ? "to" : "from", vf_netdev->name);
	return NOTIFY_OK;
}
static int netvsc_vf_changed ( struct net_device * vf_netdev ) { struct net_device_context * net_device_ctx ; struct netvsc_device * netvsc_dev ; struct net_device * ndev ; bool vf_is_up = netif_running ( vf_netdev ) ; ndev = get_netvsc_byref ( vf_netdev ) ; if ( ! ndev ) return NOTIFY_DONE ; net_device_ctx = netdev_priv ( ndev ) ; netvsc_dev = rtnl_dereference ( net_device_ctx -> nvdev ) ; if ( ! netvsc_dev ) return NOTIFY_DONE ; netvsc_switch_datapath ( ndev , vf_is_up ) ; netdev_info ( ndev , " \n " , vf_is_up ? " " : " " , vf_netdev -> name ) ; return NOTIFY_OK ; }
VF up/down change detected, schedule to change data path
VF up / down change detected schedule to change data path