瀏覽代碼

pkt_sched: sch_multiq: Change errno on non-multiqueue devices use.

Current "RTNETLINK answers: Invalid argument" warning, while trying to
add multiq qdisc to non-multiqueue device, isn't very helpful and some
of these devs can be changed btw., so let's use a better errno.

With feedback from Stephen Hemminger <shemminger@vyatta.com>

Reported-by: Badalian Vyacheslav <slavon@bigtelecom.ru>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski 16 年之前
父節點
當前提交
149490f131
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sched/sch_multiq.c

+ 1 - 1
net/sched/sch_multiq.c

@@ -202,7 +202,7 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
 	int i;
 	int i;
 
 
 	if (!netif_is_multiqueue(qdisc_dev(sch)))
 	if (!netif_is_multiqueue(qdisc_dev(sch)))
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	if (nla_len(opt) < sizeof(*qopt))
 	if (nla_len(opt) < sizeof(*qopt))
 		return -EINVAL;
 		return -EINVAL;