aboutsummaryrefslogtreecommitdiff
path: root/net/sched
AgeCommit message (Collapse)AuthorFilesLines
2008-02-05[NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest ↵Rami Rosen1-2/+2
git broken build) The 2.6 latest git build was broken when using the following configuration options: CONFIG_NET_EMATCH=n CONFIG_NET_CLS_FLOW=y with the following error: net/sched/cls_flow.c: In function 'flow_dump': net/sched/cls_flow.c:598: error: 'struct tcf_ematch_tree' has no member named 'hdr' make[2]: *** [net/sched/cls_flow.o] Error 1 make[1]: *** [net/sched] Error 2 make: *** [net] Error 2 see the recent post by Li Zefan: http://www.spinics.net/lists/netdev/msg54434.html The reason for this crash is that struct tcf_ematch_tree (net/pkt_cls.h) is empty when CONFIG_NET_EMATCH is not defined. When CONFIG_NET_EMATCH is defined, the tcf_ematch_tree structure indeed holds a struct tcf_ematch_tree_hdr (hdr) as flow_dump() expects. This patch adds #ifdef CONFIG_NET_EMATCH in flow_dump to avoid this. Signed-off-by: Rami Rosen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[NET_SCHED]: Add flow classifierPatrick McHardy3-0/+672
Add new "flow" classifier, which is meant to extend the SFQ hashing capabilities without hard-coding new hash functions and also allows deterministic mappings of keys to classes, replacing some out of tree iptables patches like IPCLASSIFY (maps IPs to classes), IPMARK (maps IPs to marks, with fw filters to classes), ... Some examples: - Classic SFQ hash: tc filter add ... flow hash \ keys src,dst,proto,proto-src,proto-dst divisor 1024 - Classic SFQ hash, but using information from conntrack to work properly in combination with NAT: tc filter add ... flow hash \ keys nfct-src,nfct-dst,proto,nfct-proto-src,nfct-proto-dst divisor 1024 - Map destination IPs of 192.168.0.0/24 to classids 1-257: tc filter add ... flow map \ key dst addend -192.168.0.0 divisor 256 - alternatively: tc filter add ... flow map \ key dst and 0xff - similar, but reverse ordered: tc filter add ... flow map \ key dst and 0xff xor 0xff Perturbation is currently not supported because we can't reliable kill the timer on destruction. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[NET_SCHED]: sch_sfq: make internal queues visible as classesPatrick McHardy1-1/+40
Add support for dumping statistics and make internal queues visible as classes. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[NET_SCHED]: sch_sfq: add support for external classifiersPatrick McHardy1-4/+91
Add support for external classifiers to allow using different flow hash functions similar to ESFQ. When no classifier is attached the built-in hash is used as before. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[NET_SCHED]: Constify struct tcf_ext_mapPatrick McHardy6-8/+8
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[PKT_SCHED] sch_teql.c: Duplicate IFF_BROADCAST in FMASK, remove 2nd.Roel Kluin1-1/+1
Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-31[NET_SCHED]: sch_ingress: remove netfilter supportPatrick McHardy2-80/+1
Since the old policer code is gone, TC actions are needed for policing. The ingress qdisc can get packets directly from netif_receive_skb() in case TC actions are enabled or through netfilter otherwise, but since without TC actions there is no policer the only thing it actually does is count packets. Remove the netfilter support and always require TC actions. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use nla_policy for attribute validation in ematchesPatrick McHardy2-8/+12
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use nla_policy for attribute validation in actionsPatrick McHardy7-33/+51
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use nla_policy for attribute validation in classifiersPatrick McHardy6-68/+59
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use nla_policy for attribute validation in packet schedulersPatrick McHardy9-93/+87
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_api: introduce constant for rate table sizePatrick McHardy1-1/+2
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use typeful attribute parsing helpersPatrick McHardy11-29/+27
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use typeful attribute construction helpersPatrick McHardy11-31/+26
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use NLA_PUT_STRING for string dumpingPatrick McHardy6-8/+8
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Use nla_nest_start/nla_nest_endPatrick McHardy16-133/+166
Use nla_nest_start/nla_nest_end for dumping nested attributes. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Propagate nla_parse return valuePatrick McHardy25-60/+171
nla_parse() returns more detailed errno codes, propagate them back on error. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_getPatrick McHardy2-39/+46
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: act_api: use nlmsg_parsePatrick McHardy1-4/+1
Convert open-coded nlmsg_parse to use the real function. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: act_api: fix netlink API conversion bugPatrick McHardy1-4/+4
Fix two invalid attribute accesses, indices start at 1 with the new netlink API. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_netem: use nla_parse_nested_compatPatrick McHardy1-32/+26
Replace open coded equivalent of nla_parse_nested_compat(). Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_atm: fix format string warningPatrick McHardy1-1/+1
Fix format string warning introduces by the netlink API conversion: net/sched/sch_atm.c:250: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int'. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Convert actions from rtnetlink to new netlink APIPatrick McHardy9-212/+214
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Convert classifiers from rtnetlink to new netlink APIPatrick McHardy10-276/+284
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink APIPatrick McHardy18-411/+447
Convert packet schedulers to use the netlink API. Unfortunately a gradual conversion is not possible without breaking compilation in the middle or adding lots of casts, so this patch converts them all in one step. The patch has been mostly generated automatically with some minor edits to at least allow seperate conversion of classifiers and actions. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: mark classifier ops __read_mostlyPatrick McHardy6-10/+6
Additionally remove unnecessary NULL initilizations of the next pointer. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: Move EXPORT_SYMBOL next to exported symbolPatrick McHardy5-27/+22
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] net classifier: style cleanup'sStephen Hemminger2-87/+73
Classifier code cleanup. Get rid of printk wrapper, and fix whitespace and other style stuff reported by checkpatch Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] sch_atm: style cleanupStephen Hemminger1-74/+65
ATM scheduler clean house: * get rid of printk and qdisc_priv() wrapper * split some assignment in if() statements * whitespace and line breaks. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] dsmark: checkpatch warning cleanupStephen Hemminger1-39/+40
Get rid of all style things checkpatch warns about, indentation and whitespace. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] dsmark: handle cloned and non-linear skb'sStephen Hemminger1-4/+15
Make dsmark work properly with non-linear and cloned skb's Before modifying the header, it needs to check that skb header is writeable. Note: this makes the assumption, that if it queues a good skb then a good skb will come out of the embedded qdisc. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] dsmark: Use hweight32() instead of convoluted loop.David S. Miller1-12/+3
Based upon a patch by Stephen Hemminger and suggestions from Patrick McHardy. Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] dsmark: get rid of wrappersStephen Hemminger1-49/+34
Remove extraneous macro wrappers for printk and qdisc_priv. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: kill obsolete NET_CLS_POLICE optionPatrick McHardy1-9/+0
The code is already gone for about half a year, the config option has been kept around to select the replacement options for easier upgrades. This seems long enough, people upgrading from older kernels will have to reconfigure a lot anyway. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: remove useless printkPatrick McHardy1-8/+1
The printk about ingress qdisc registration error can't be triggered under normal circumstances. Since register_qdisc only fails for two identical registrations, the only way to trigger it is by loading the sch_ingress modules multiple times under different names, in which case we already return -EEXIST to userspace. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: avoid a few #ifdefsPatrick McHardy1-12/+4
Move the repeating "ifndef CONFIG_NET_CLS_ACT/ifdef CONFIG_NETFILTER" ifdefs into a single condition. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: move dependencies to KconfigPatrick McHardy2-10/+2
Instead of complaining at scheduler initialization time, check the dependencies in Kconfig. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: remove unnecessary opsPatrick McHardy1-24/+0
- ->reset is optional - sch_api provides identical defaults for ->dequeue/->requeue - ->drop can't happen since ingress never has a parent qdisc Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: return proper error code in ingress_graft()Patrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: remove unused inner qdiscPatrick McHardy1-4/+0
Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: remove qdisc_priv() wrapperPatrick McHardy1-6/+4
Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: remove excessive debuggingPatrick McHardy1-76/+3
Remove excessive debugging statements and some "future use" stuff. Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET_SCHED]: sch_ingress: formatting fixesPatrick McHardy1-64/+39
Signed-off-by: Patrick McHardy <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] SFQ: whitespace cleanupStephen Hemminger1-17/+25
Add whitespace around operators, and add a few blank lines to improve readability. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] SFQ: use net_randomStephen Hemminger1-3/+3
SFQ doesn't need true random numbers, it is only using them to salt a hash. Therefore it is better to use net_random() and avoid any possible problems with depleting the entropy pool. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] SFQ: timer is deferrableStephen Hemminger1-1/+3
The perturbation timer used for re-keying can be deferred, it doesn't need to be deterministic. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[PKT_SCHED] HTB: htb_classid is dead static inlineIlpo Järvinen1-4/+0
Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET]: Add some acquires/releases sparse annotations.Eric Dumazet1-0/+4
Add __acquires() and __releases() annotations to suppress some sparse warnings. example of warnings : net/ipv4/udp.c:1555:14: warning: context imbalance in 'udp_seq_start' - wrong count at exit net/ipv4/udp.c:1571:13: warning: context imbalance in 'udp_seq_stop' - unexpected unlock Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NETFILTER]: Mark hooks __read_mostlyPatrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NETFILTER]: Use nf_register_hooks for multiple registrationsPatrick McHardy1-26/+18
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>