FreeBSD/sys/dev/netmap/netmap_vale.c
/*
 * Free the forwarding tables for rings attached to switch ports.
 */
Free the forwarding tables for rings attached to switch ports.
Free the forwarding tables for rings attached to switch ports .
static void
nm_free_bdgfwd(struct netmap_adapter *na)
{
	int nrings, i;
	struct netmap_kring *kring;
	NMG_LOCK_ASSERT();
	nrings = na->num_tx_rings;
	kring = na->tx_rings;
	for (i = 0; i < nrings; i++) {
		if (kring[i].nkr_ft) {
			free(kring[i].nkr_ft, M_DEVBUF);
			kring[i].nkr_ft = NULL; 
		}
	}
}
static void nm_free_bdgfwd ( struct netmap_adapter * na ) { int nrings , i ; struct netmap_kring * kring ; NMG_LOCK_ASSERT ( ) ; nrings = na -> num_tx_rings ; kring = na -> tx_rings ; for ( i = 0 ; i < nrings ; i ++ ) { if ( kring [ i ] . nkr_ft ) { free ( kring [ i ] . nkr_ft , M_DEVBUF ) ; kring [ i ] . nkr_ft = NULL ; } } }
Free the forwarding tables for rings attached to switch ports.
Free the forwarding tables for rings attached to switch ports .
/* protect from freeing twice */