FreeBSD/sys/net/altq/altq_subr.c
/*
 * remove a discipline or a queue
 * It is yet unclear what lock to use to protect this operation, the
 * discipline specific functions will determine and grab it
 */
remove a discipline or a queue
It is yet unclear what lock to use to protect this operation, the
discipline specific functions will determine and grab it
remove a discipline or a queue It is yet unclear what lock to use to protect this operation the discipline specific functions will determine and grab it
int
altq_remove(struct pf_altq *a)
{
	int error = 0;
	if (a->qname[0] != 0)
		return (altq_remove_queue(a));
	switch (a->scheduler) {
#ifdef ALTQ_CBQ
	case ALTQT_CBQ:
		error = cbq_remove_altq(a);
		break;
#endif
#ifdef ALTQ_PRIQ
	case ALTQT_PRIQ:
		error = priq_remove_altq(a);
		break;
#endif
#ifdef ALTQ_HFSC
	case ALTQT_HFSC:
		error = hfsc_remove_altq(a);
		break;
#endif
#ifdef ALTQ_FAIRQ
        case ALTQT_FAIRQ:
                error = fairq_remove_altq(a);
                break;
#endif
#ifdef ALTQ_CODEL
	case ALTQT_CODEL:
		error = codel_remove_altq(a);
		break;
#endif
	default:
		error = ENXIO;
	}
	return (error);
}
int altq_remove ( struct pf_altq * a ) { int error = 0 ; if ( a -> qname [ 0 ] != 0 ) return ( altq_remove_queue ( a ) ) ; switch ( a -> scheduler ) { #ifdef ALTQ_CBQ case ALTQT_CBQ : error = cbq_remove_altq ( a ) ; break ; #endif #ifdef ALTQ_PRIQ case ALTQT_PRIQ : error = priq_remove_altq ( a ) ; break ; #endif #ifdef ALTQ_HFSC case ALTQT_HFSC : error = hfsc_remove_altq ( a ) ; break ; #endif #ifdef ALTQ_FAIRQ case ALTQT_FAIRQ : error = fairq_remove_altq ( a ) ; break ; #endif #ifdef ALTQ_CODEL case ALTQT_CODEL : error = codel_remove_altq ( a ) ; break ; #endif default : error = ENXIO ; } return ( error ) ; }
remove a discipline or a queue
 It is yet unclear what lock to use to protect this operation, the
 discipline specific functions will determine and grab it
remove a discipline or a queue It is yet unclear what lock to use to protect this operation the discipline specific functions will determine and grab it