src/netvsc_drv.c
/*
 * On Hyper-V, every VF interface is matched with a corresponding
 * synthetic interface. The synthetic interface is presented first
 * to the guest. When the corresponding VF instance is registered,
 * we will take care of switching the data path.
 */
On Hyper-V, every VF interface is matched with a corresponding
synthetic interface. The synthetic interface is presented first
to the guest. When the corresponding VF instance is registered,
we will take care of switching the data path.
On Hyper - V every VF interface is matched with a corresponding synthetic interface . The synthetic interface is presented first to the guest . When the corresponding VF instance is registered we will take care of switching the data path .
static int netvsc_netdev_event(struct notifier_block *this,
			       unsigned long event, void *ptr)
{
	struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);
	if (event_dev->netdev_ops == &device_ops)
		return NOTIFY_DONE;
	if (event_dev->type != ARPHRD_ETHER)
		return NOTIFY_DONE;
	if (is_vlan_dev(event_dev))
		return NOTIFY_DONE;
	if ((event_dev->priv_flags & IFF_BONDING) &&
	    (event_dev->flags & IFF_MASTER))
		return NOTIFY_DONE;
	switch (event) {
	case NETDEV_REGISTER:
		return netvsc_register_vf(event_dev);
	case NETDEV_UNREGISTER:
		return netvsc_unregister_vf(event_dev);
	case NETDEV_UP:
	case NETDEV_DOWN:
		return netvsc_vf_changed(event_dev);
	default:
		return NOTIFY_DONE;
	}
}
static int netvsc_netdev_event ( struct notifier_block * this , unsigned long event , void * ptr ) { struct net_device * event_dev = netdev_notifier_info_to_dev ( ptr ) ; if ( event_dev -> netdev_ops == & device_ops ) return NOTIFY_DONE ; if ( event_dev -> type != ARPHRD_ETHER ) return NOTIFY_DONE ; if ( is_vlan_dev ( event_dev ) ) return NOTIFY_DONE ; if ( ( event_dev -> priv_flags & IFF_BONDING ) && ( event_dev -> flags & IFF_MASTER ) ) return NOTIFY_DONE ; switch ( event ) { case NETDEV_REGISTER : return netvsc_register_vf ( event_dev ) ; case NETDEV_UNREGISTER : return netvsc_unregister_vf ( event_dev ) ; case NETDEV_UP : case NETDEV_DOWN : return netvsc_vf_changed ( event_dev ) ; default : return NOTIFY_DONE ; } }
On Hyper-V, every VF interface is matched with a corresponding
 synthetic interface.
On Hyper - V every VF interface is matched with a corresponding synthetic interface .
/* Skip our own events */ /* Avoid non-Ethernet type devices */ /* Avoid Vlan dev with same MAC registering as VF */ /* Avoid Bonding master dev with same MAC registering as VF */