diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /net/sched/act_mirred.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'net/sched/act_mirred.c')
-rw-r--r-- | net/sched/act_mirred.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 9c0fd0c7881..e051398fdf6 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -174,8 +174,9 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, | |||
174 | } | 174 | } |
175 | 175 | ||
176 | if (!(dev->flags & IFF_UP)) { | 176 | if (!(dev->flags & IFF_UP)) { |
177 | net_notice_ratelimited("tc mirred to Houston: device %s is down\n", | 177 | if (net_ratelimit()) |
178 | dev->name); | 178 | pr_notice("tc mirred to Houston: device %s is down\n", |
179 | dev->name); | ||
179 | goto out; | 180 | goto out; |
180 | } | 181 | } |
181 | 182 | ||
@@ -200,12 +201,13 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, | |||
200 | out: | 201 | out: |
201 | if (err) { | 202 | if (err) { |
202 | m->tcf_qstats.overlimits++; | 203 | m->tcf_qstats.overlimits++; |
203 | if (m->tcfm_eaction != TCA_EGRESS_MIRROR) | 204 | /* should we be asking for packet to be dropped? |
204 | retval = TC_ACT_SHOT; | 205 | * may make sense for redirect case only |
205 | else | 206 | */ |
206 | retval = m->tcf_action; | 207 | retval = TC_ACT_SHOT; |
207 | } else | 208 | } else { |
208 | retval = m->tcf_action; | 209 | retval = m->tcf_action; |
210 | } | ||
209 | spin_unlock(&m->tcf_lock); | 211 | spin_unlock(&m->tcf_lock); |
210 | 212 | ||
211 | return retval; | 213 | return retval; |
@@ -225,13 +227,11 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i | |||
225 | }; | 227 | }; |
226 | struct tcf_t t; | 228 | struct tcf_t t; |
227 | 229 | ||
228 | if (nla_put(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt)) | 230 | NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt); |
229 | goto nla_put_failure; | ||
230 | t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); | 231 | t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); |
231 | t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); | 232 | t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); |
232 | t.expires = jiffies_to_clock_t(m->tcf_tm.expires); | 233 | t.expires = jiffies_to_clock_t(m->tcf_tm.expires); |
233 | if (nla_put(skb, TCA_MIRRED_TM, sizeof(t), &t)) | 234 | NLA_PUT(skb, TCA_MIRRED_TM, sizeof(t), &t); |
234 | goto nla_put_failure; | ||
235 | return skb->len; | 235 | return skb->len; |
236 | 236 | ||
237 | nla_put_failure: | 237 | nla_put_failure: |