diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/Kconfig | 1 | ||||
-rw-r--r-- | net/sched/act_api.c | 15 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/gact.c | 2 | ||||
-rw-r--r-- | net/sched/ipt.c | 2 | ||||
-rw-r--r-- | net/sched/mirred.c | 2 | ||||
-rw-r--r-- | net/sched/pedit.c | 2 | ||||
-rw-r--r-- | net/sched/police.c | 3 | ||||
-rw-r--r-- | net/sched/sch_api.c | 4 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 16 | ||||
-rw-r--r-- | net/sched/simple.c | 2 |
11 files changed, 32 insertions, 19 deletions
diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 59d3e71f8b85..45d3bc0812c8 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig | |||
@@ -491,6 +491,7 @@ config NET_EMATCH_TEXT | |||
491 | depends on NET_EMATCH | 491 | depends on NET_EMATCH |
492 | select TEXTSEARCH | 492 | select TEXTSEARCH |
493 | select TEXTSEARCH_KMP | 493 | select TEXTSEARCH_KMP |
494 | select TEXTSEARCH_BM | ||
494 | select TEXTSEARCH_FSM | 495 | select TEXTSEARCH_FSM |
495 | ---help--- | 496 | ---help--- |
496 | Say Y here if you want to be ablt to classify packets based on | 497 | Say Y here if you want to be ablt to classify packets based on |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 249c61936ea0..8aebe8f6d271 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -165,7 +165,7 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, | |||
165 | while ((a = act) != NULL) { | 165 | while ((a = act) != NULL) { |
166 | repeat: | 166 | repeat: |
167 | if (a->ops && a->ops->act) { | 167 | if (a->ops && a->ops->act) { |
168 | ret = a->ops->act(&skb, a); | 168 | ret = a->ops->act(&skb, a, res); |
169 | if (TC_MUNGED & skb->tc_verd) { | 169 | if (TC_MUNGED & skb->tc_verd) { |
170 | /* copied already, allow trampling */ | 170 | /* copied already, allow trampling */ |
171 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); | 171 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); |
@@ -179,11 +179,6 @@ repeat: | |||
179 | act = a->next; | 179 | act = a->next; |
180 | } | 180 | } |
181 | exec_done: | 181 | exec_done: |
182 | if (skb->tc_classid > 0) { | ||
183 | res->classid = skb->tc_classid; | ||
184 | res->class = 0; | ||
185 | skb->tc_classid = 0; | ||
186 | } | ||
187 | return ret; | 182 | return ret; |
188 | } | 183 | } |
189 | 184 | ||
@@ -598,7 +593,7 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) | |||
598 | nlh->nlmsg_flags |= NLM_F_ROOT; | 593 | nlh->nlmsg_flags |= NLM_F_ROOT; |
599 | module_put(a->ops->owner); | 594 | module_put(a->ops->owner); |
600 | kfree(a); | 595 | kfree(a); |
601 | err = rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 596 | err = rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
602 | if (err > 0) | 597 | if (err > 0) |
603 | return 0; | 598 | return 0; |
604 | 599 | ||
@@ -661,7 +656,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event) | |||
661 | 656 | ||
662 | /* now do the delete */ | 657 | /* now do the delete */ |
663 | tcf_action_destroy(head, 0); | 658 | tcf_action_destroy(head, 0); |
664 | ret = rtnetlink_send(skb, pid, RTMGRP_TC, | 659 | ret = rtnetlink_send(skb, pid, RTNLGRP_TC, |
665 | n->nlmsg_flags&NLM_F_ECHO); | 660 | n->nlmsg_flags&NLM_F_ECHO); |
666 | if (ret > 0) | 661 | if (ret > 0) |
667 | return 0; | 662 | return 0; |
@@ -703,9 +698,9 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
703 | x->rta_len = skb->tail - (u8*)x; | 698 | x->rta_len = skb->tail - (u8*)x; |
704 | 699 | ||
705 | nlh->nlmsg_len = skb->tail - b; | 700 | nlh->nlmsg_len = skb->tail - b; |
706 | NETLINK_CB(skb).dst_groups = RTMGRP_TC; | 701 | NETLINK_CB(skb).dst_group = RTNLGRP_TC; |
707 | 702 | ||
708 | err = rtnetlink_send(skb, pid, RTMGRP_TC, flags&NLM_F_ECHO); | 703 | err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO); |
709 | if (err > 0) | 704 | if (err > 0) |
710 | err = 0; | 705 | err = 0; |
711 | return err; | 706 | return err; |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 3b5714ef4d1a..b4d89fbb3782 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -367,7 +367,7 @@ static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
367 | return -EINVAL; | 367 | return -EINVAL; |
368 | } | 368 | } |
369 | 369 | ||
370 | return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 370 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
371 | } | 371 | } |
372 | 372 | ||
373 | struct tcf_dump_args | 373 | struct tcf_dump_args |
diff --git a/net/sched/gact.c b/net/sched/gact.c index a811c89fef7f..d1c6d542912a 100644 --- a/net/sched/gact.c +++ b/net/sched/gact.c | |||
@@ -135,7 +135,7 @@ tcf_gact_cleanup(struct tc_action *a, int bind) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | static int | 137 | static int |
138 | tcf_gact(struct sk_buff **pskb, struct tc_action *a) | 138 | tcf_gact(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) |
139 | { | 139 | { |
140 | struct tcf_gact *p = PRIV(a, gact); | 140 | struct tcf_gact *p = PRIV(a, gact); |
141 | struct sk_buff *skb = *pskb; | 141 | struct sk_buff *skb = *pskb; |
diff --git a/net/sched/ipt.c b/net/sched/ipt.c index b114d994d523..f50136eed211 100644 --- a/net/sched/ipt.c +++ b/net/sched/ipt.c | |||
@@ -201,7 +201,7 @@ tcf_ipt_cleanup(struct tc_action *a, int bind) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | static int | 203 | static int |
204 | tcf_ipt(struct sk_buff **pskb, struct tc_action *a) | 204 | tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) |
205 | { | 205 | { |
206 | int ret = 0, result = 0; | 206 | int ret = 0, result = 0; |
207 | struct tcf_ipt *p = PRIV(a, ipt); | 207 | struct tcf_ipt *p = PRIV(a, ipt); |
diff --git a/net/sched/mirred.c b/net/sched/mirred.c index f309ce336803..20d06916dc0b 100644 --- a/net/sched/mirred.c +++ b/net/sched/mirred.c | |||
@@ -158,7 +158,7 @@ tcf_mirred_cleanup(struct tc_action *a, int bind) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | static int | 160 | static int |
161 | tcf_mirred(struct sk_buff **pskb, struct tc_action *a) | 161 | tcf_mirred(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) |
162 | { | 162 | { |
163 | struct tcf_mirred *p = PRIV(a, mirred); | 163 | struct tcf_mirred *p = PRIV(a, mirred); |
164 | struct net_device *dev; | 164 | struct net_device *dev; |
diff --git a/net/sched/pedit.c b/net/sched/pedit.c index 678be6a645fb..767d24f4610e 100644 --- a/net/sched/pedit.c +++ b/net/sched/pedit.c | |||
@@ -130,7 +130,7 @@ tcf_pedit_cleanup(struct tc_action *a, int bind) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static int | 132 | static int |
133 | tcf_pedit(struct sk_buff **pskb, struct tc_action *a) | 133 | tcf_pedit(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) |
134 | { | 134 | { |
135 | struct tcf_pedit *p = PRIV(a, pedit); | 135 | struct tcf_pedit *p = PRIV(a, pedit); |
136 | struct sk_buff *skb = *pskb; | 136 | struct sk_buff *skb = *pskb; |
diff --git a/net/sched/police.c b/net/sched/police.c index c03545faf523..eb39fb2f39b6 100644 --- a/net/sched/police.c +++ b/net/sched/police.c | |||
@@ -284,7 +284,8 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind) | |||
284 | return 0; | 284 | return 0; |
285 | } | 285 | } |
286 | 286 | ||
287 | static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a) | 287 | static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a, |
288 | struct tcf_result *res) | ||
288 | { | 289 | { |
289 | psched_time_t now; | 290 | psched_time_t now; |
290 | struct sk_buff *skb = *pskb; | 291 | struct sk_buff *skb = *pskb; |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b9a069af4a02..737681cb9a92 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -816,7 +816,7 @@ static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
816 | } | 816 | } |
817 | 817 | ||
818 | if (skb->len) | 818 | if (skb->len) |
819 | return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 819 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
820 | 820 | ||
821 | err_out: | 821 | err_out: |
822 | kfree_skb(skb); | 822 | kfree_skb(skb); |
@@ -1040,7 +1040,7 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
1040 | return -EINVAL; | 1040 | return -EINVAL; |
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); | 1043 | return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO); |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | struct qdisc_dump_args | 1046 | struct qdisc_dump_args |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 0d066c965342..99ceb91f0150 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -238,6 +238,20 @@ static void dev_watchdog_down(struct net_device *dev) | |||
238 | spin_unlock_bh(&dev->xmit_lock); | 238 | spin_unlock_bh(&dev->xmit_lock); |
239 | } | 239 | } |
240 | 240 | ||
241 | void netif_carrier_on(struct net_device *dev) | ||
242 | { | ||
243 | if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) | ||
244 | linkwatch_fire_event(dev); | ||
245 | if (netif_running(dev)) | ||
246 | __netdev_watchdog_up(dev); | ||
247 | } | ||
248 | |||
249 | void netif_carrier_off(struct net_device *dev) | ||
250 | { | ||
251 | if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) | ||
252 | linkwatch_fire_event(dev); | ||
253 | } | ||
254 | |||
241 | /* "NOOP" scheduler: the best scheduler, recommended for all interfaces | 255 | /* "NOOP" scheduler: the best scheduler, recommended for all interfaces |
242 | under all circumstances. It is difficult to invent anything faster or | 256 | under all circumstances. It is difficult to invent anything faster or |
243 | cheaper. | 257 | cheaper. |
@@ -600,6 +614,8 @@ void dev_shutdown(struct net_device *dev) | |||
600 | } | 614 | } |
601 | 615 | ||
602 | EXPORT_SYMBOL(__netdev_watchdog_up); | 616 | EXPORT_SYMBOL(__netdev_watchdog_up); |
617 | EXPORT_SYMBOL(netif_carrier_on); | ||
618 | EXPORT_SYMBOL(netif_carrier_off); | ||
603 | EXPORT_SYMBOL(noop_qdisc); | 619 | EXPORT_SYMBOL(noop_qdisc); |
604 | EXPORT_SYMBOL(noop_qdisc_ops); | 620 | EXPORT_SYMBOL(noop_qdisc_ops); |
605 | EXPORT_SYMBOL(qdisc_create_dflt); | 621 | EXPORT_SYMBOL(qdisc_create_dflt); |
diff --git a/net/sched/simple.c b/net/sched/simple.c index 3ab4c675ab5d..8a6ae4f491e8 100644 --- a/net/sched/simple.c +++ b/net/sched/simple.c | |||
@@ -44,7 +44,7 @@ static DEFINE_RWLOCK(simp_lock); | |||
44 | #include <net/pkt_act.h> | 44 | #include <net/pkt_act.h> |
45 | #include <net/act_generic.h> | 45 | #include <net/act_generic.h> |
46 | 46 | ||
47 | static int tcf_simp(struct sk_buff **pskb, struct tc_action *a) | 47 | static int tcf_simp(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) |
48 | { | 48 | { |
49 | struct sk_buff *skb = *pskb; | 49 | struct sk_buff *skb = *pskb; |
50 | struct tcf_defact *p = PRIV(a, defact); | 50 | struct tcf_defact *p = PRIV(a, defact); |