FreeBSD/sys/dev/netmap/netmap_monitor.c
/* callback used to replace the nm_sync callback in the monitored tx rings */
callback used to replace the nm_sync callback in the monitored tx rings
callback used to replace the nm_sync callback in the monitored tx rings
static int
netmap_monitor_parent_txsync(struct netmap_kring *kring, int flags)
{
	u_int first_new;
	int new_slots;
	first_new = kring->nr_hwcur;
        new_slots = kring->rhead - first_new;
        if (new_slots < 0)
                new_slots += kring->nkr_num_slots;
	if (new_slots)
		netmap_monitor_parent_sync(kring, first_new, new_slots);
	return kring->mon_sync(kring, flags);
}
static int netmap_monitor_parent_txsync ( struct netmap_kring * kring , int flags ) { u_int first_new ; int new_slots ; first_new = kring -> nr_hwcur ; new_slots = kring -> rhead - first_new ; if ( new_slots < 0 ) new_slots += kring -> nkr_num_slots ; if ( new_slots ) netmap_monitor_parent_sync ( kring , first_new , new_slots ) ; return kring -> mon_sync ( kring , flags ) ; }
callback used to replace the nm_sync callback in the monitored tx rings
callback used to replace the nm_sync callback in the monitored tx rings
/* get the new slots */