kernel-ark/net/sched
Patrick McHardy de6d5cdf88 net_sched: make cls_ops->change and cls_ops->delete optional
Some schedulers don't support creating, changing or deleting classes.
Make the respective callbacks optionally and consistently return
-EOPNOTSUPP for unsupported operations, instead of currently either
-EOPNOTSUPP, -ENOSYS or no error.

In case of sch_prio and sch_multiq, the removed operations additionally
checked for an invalid class. This is not necessary since the class
argument can only orginate from ->get() or in case of ->change is 0
for creation of new classes, in which case ->change() incorrectly
returned -ENOENT.

As a side-effect, this patch fixes a possible (root-only) NULL pointer
function call in sch_ingress, which didn't implement a so far mandatory
->delete() operation.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-06 02:07:02 -07:00
..
act_api.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_gact.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_ipt.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_mirred.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_nat.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_pedit.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_police.c pkt_sched: Update drops stats in act_police 2009-06-17 18:56:45 -07:00
act_simple.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
act_skbedit.c tc: propogate errors from tcf_hash_create 2008-11-25 21:13:25 -08:00
cls_api.c net_sched: make cls_ops->tcf_chain() optional 2009-09-06 02:06:12 -07:00
cls_basic.c pkt_sched: remove unnecessary xchg() in packet classifiers 2008-11-20 04:14:28 -08:00
cls_cgroup.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
cls_flow.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
cls_fw.c pkt_sched: remove unnecessary xchg() in packet classifiers 2008-11-20 04:14:28 -08:00
cls_route.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
cls_rsvp6.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.c [NET_SCHED]: Remove unnecessary includes 2007-07-10 22:16:41 -07:00
cls_rsvp.h [NET_SCHED]: Use nla_policy for attribute validation in classifiers 2008-01-28 15:11:23 -08:00
cls_tcindex.c pkt_sched: remove unnecessary xchg() in packet classifiers 2008-11-20 04:14:28 -08:00
cls_u32.c pkt_sched: cls_u32: Fix locking in u32_change() 2009-01-05 18:14:19 -08:00
em_cmp.c net: em_cmp.c use unaligned access helpers 2008-09-22 19:20:51 -07:00
em_meta.c net: correct off-by-one write allocations reports 2009-06-18 00:29:12 -07:00
em_nbyte.c [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
em_text.c [NET_SCHED]: Convert classifiers from rtnetlink to new netlink API 2008-01-28 15:11:11 -08:00
em_u32.c [PKT_SCHED]: annotate cls_u32 2008-03-17 22:46:46 -07:00
ematch.c ematch: simpler tcf_em_unregister() 2008-11-16 23:01:49 -08:00
Kconfig cls_cgroup: clean up Kconfig 2008-12-29 19:40:46 -08:00
Makefile pkt_sched: add DRR scheduler 2008-11-20 04:10:00 -08:00
sch_api.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_atm.c net: restore gnet_stats_basic to previous definition 2009-08-17 21:33:49 -07:00
sch_blackhole.c pkt_sched: Add qdisc->ops->peek() implementation. 2008-10-31 00:45:55 -07:00
sch_cbq.c pkt_sched: Revert tasklet_hrtimer changes. 2009-09-01 17:59:25 -07:00
sch_drr.c net: restore gnet_stats_basic to previous definition 2009-08-17 21:33:49 -07:00
sch_dsmark.c pkt_sched: remove unnecessary xchg() in packet schedulers 2008-11-20 04:11:36 -08:00
sch_fifo.c net-sched: fix bfifo default limit 2009-05-06 16:45:07 -07:00
sch_generic.c pkt_sched: Fix resource limiting in pfifo_fast 2009-08-30 22:20:28 -07:00
sch_gred.c pkt_sched: Remove qdisc->ops->requeue() etc. 2008-11-13 22:56:30 -08:00
sch_hfsc.c net: restore gnet_stats_basic to previous definition 2009-08-17 21:33:49 -07:00
sch_htb.c net: restore gnet_stats_basic to previous definition 2009-08-17 21:33:49 -07:00
sch_ingress.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_multiq.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_netem.c net: sch_netem: Fix an inconsistency in ingress netem timestamps. 2009-04-20 02:14:59 -07:00
sch_prio.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_red.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_sfq.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_tbf.c net_sched: make cls_ops->change and cls_ops->delete optional 2009-09-06 02:07:02 -07:00
sch_teql.c netdev: convert pseudo-devices to netdev_tx_t 2009-09-01 01:13:07 -07:00