net/sched: sch_drr: warn about class in use while deleting

Add extack to warn that delete was rejected because
the class is still in use

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Pedro Tammela 2023-07-28 12:35:34 -03:00 committed by Paolo Abeni
parent 8798481b66
commit daf8d9181b

View file

@ -149,8 +149,10 @@ static int drr_delete_class(struct Qdisc *sch, unsigned long arg,
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl = (struct drr_class *)arg;
if (qdisc_class_in_use(&cl->common))
if (qdisc_class_in_use(&cl->common)) {
NL_SET_ERR_MSG(extack, "DRR class is in use");
return -EBUSY;
}
sch_tree_lock(sch);