netdev
[Top] [All Lists]

[PATCH PKT_SCHED 5/6]: tcf_exts: rate_tlv is optional

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [PATCH PKT_SCHED 5/6]: tcf_exts: rate_tlv is optional
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Tue, 11 Jan 2005 22:46:32 +0100
Cc: Maillist netdev <netdev@xxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041008 Debian/1.7.3-5
rate_tlv is optional, fixes using actions/policer without a rate estimator.


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/11 22:12:44+01:00 kaber@xxxxxxxxxxxx 
#   [PKT_SCHED]: tcf_exts: rate_tlv is optional
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
# net/sched/cls_api.c
#   2005/01/11 22:12:34+01:00 kaber@xxxxxxxxxxxx +3 -3
#   [PKT_SCHED]: tcf_exts: rate_tlv is optional
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c
--- a/net/sched/cls_api.c       2005-01-11 22:32:25 +01:00
+++ b/net/sched/cls_api.c       2005-01-11 22:32:25 +01:00
@@ -479,7 +479,7 @@
        int err;
        struct tc_action *act;
 
-       if (map->police && tb[map->police-1] && rate_tlv) {
+       if (map->police && tb[map->police-1]) {
                act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
                        TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
                if (act == NULL)
@@ -487,7 +487,7 @@
 
                act->type = TCA_OLD_COMPAT;
                exts->action = act;
-       } else if (map->action && tb[map->action-1] && rate_tlv) {
+       } else if (map->action && tb[map->action-1]) {
                act = tcf_action_init(tb[map->action-1], rate_tlv, NULL,
                        TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
                if (act == NULL)
@@ -496,7 +496,7 @@
                exts->action = act;
        }
 #elif defined CONFIG_NET_CLS_POLICE
-       if (map->police && tb[map->police-1] && rate_tlv) {
+       if (map->police && tb[map->police-1]) {
                struct tcf_police *p;
                
                p = tcf_police_locate(tb[map->police-1], rate_tlv);
<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH PKT_SCHED 5/6]: tcf_exts: rate_tlv is optional, Patrick McHardy <=