altq_subr.c (1918fc5c) altq_subr.c (9275f515)
1/* $KAME: altq_subr.c,v 1.23 2004/04/20 16:10:06 itojun Exp $ */
2/* $DragonFly: src/sys/net/altq/altq_subr.c,v 1.12 2008/05/14 11:59:23 sephe Exp $ */
3
4/*
5 * Copyright (C) 1997-2003
6 * Sony Computer Science Laboratories Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 150 unchanged lines hidden (view full) ---

159static int
160altq_enable_locked(struct ifaltq *ifq)
161{
162 if (!ifq_is_ready(ifq))
163 return ENXIO;
164 if (ifq_is_enabled(ifq))
165 return 0;
166
1/* $KAME: altq_subr.c,v 1.23 2004/04/20 16:10:06 itojun Exp $ */
2/* $DragonFly: src/sys/net/altq/altq_subr.c,v 1.12 2008/05/14 11:59:23 sephe Exp $ */
3
4/*
5 * Copyright (C) 1997-2003
6 * Sony Computer Science Laboratories Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 150 unchanged lines hidden (view full) ---

159static int
160altq_enable_locked(struct ifaltq *ifq)
161{
162 if (!ifq_is_ready(ifq))
163 return ENXIO;
164 if (ifq_is_enabled(ifq))
165 return 0;
166
167 ifq_purge_locked(ifq);
167 ifq_purge_all_locked(ifq);
168 KKASSERT(ifq->ifq_len == 0);
169
170 ifq->altq_flags |= ALTQF_ENABLED;
171 if (ifq->altq_clfier != NULL)
172 ifq->altq_flags |= ALTQF_CLASSIFY;
173 return 0;
174}
175

--- 9 unchanged lines hidden (view full) ---

185}
186
187static int
188altq_disable_locked(struct ifaltq *ifq)
189{
190 if (!ifq_is_enabled(ifq))
191 return 0;
192
168 KKASSERT(ifq->ifq_len == 0);
169
170 ifq->altq_flags |= ALTQF_ENABLED;
171 if (ifq->altq_clfier != NULL)
172 ifq->altq_flags |= ALTQF_CLASSIFY;
173 return 0;
174}
175

--- 9 unchanged lines hidden (view full) ---

185}
186
187static int
188altq_disable_locked(struct ifaltq *ifq)
189{
190 if (!ifq_is_enabled(ifq))
191 return 0;
192
193 ifq_purge_locked(ifq);
193 ifq_purge_all_locked(ifq);
194 KKASSERT(ifq->ifq_len == 0);
195 ifq->altq_flags &= ~(ALTQF_ENABLED|ALTQF_CLASSIFY);
196 return 0;
197}
198
199int
200altq_disable(struct ifaltq *ifq)
201{

--- 679 unchanged lines hidden ---
194 KKASSERT(ifq->ifq_len == 0);
195 ifq->altq_flags &= ~(ALTQF_ENABLED|ALTQF_CLASSIFY);
196 return 0;
197}
198
199int
200altq_disable(struct ifaltq *ifq)
201{

--- 679 unchanged lines hidden ---