diff options
| -rw-r--r-- | net/sched/act_mirred.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 2e9a7b91aa10..a16b0175f890 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
| @@ -160,6 +160,8 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a, | |||
| 160 | 160 | ||
| 161 | spin_lock(&m->tcf_lock); | 161 | spin_lock(&m->tcf_lock); |
| 162 | m->tcf_tm.lastuse = jiffies; | 162 | m->tcf_tm.lastuse = jiffies; |
| 163 | m->tcf_bstats.bytes += qdisc_pkt_len(skb); | ||
| 164 | m->tcf_bstats.packets++; | ||
| 163 | 165 | ||
| 164 | dev = m->tcfm_dev; | 166 | dev = m->tcfm_dev; |
| 165 | if (!(dev->flags & IFF_UP)) { | 167 | if (!(dev->flags & IFF_UP)) { |
| @@ -174,8 +176,6 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a, | |||
| 174 | if (skb2 == NULL) | 176 | if (skb2 == NULL) |
| 175 | goto out; | 177 | goto out; |
| 176 | 178 | ||
| 177 | m->tcf_bstats.bytes += qdisc_pkt_len(skb2); | ||
| 178 | m->tcf_bstats.packets++; | ||
| 179 | if (!(at & AT_EGRESS)) { | 179 | if (!(at & AT_EGRESS)) { |
| 180 | if (m->tcfm_ok_push) | 180 | if (m->tcfm_ok_push) |
| 181 | skb_push(skb2, skb2->dev->hard_header_len); | 181 | skb_push(skb2, skb2->dev->hard_header_len); |
| @@ -193,8 +193,6 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a, | |||
| 193 | out: | 193 | out: |
| 194 | if (err) { | 194 | if (err) { |
| 195 | m->tcf_qstats.overlimits++; | 195 | m->tcf_qstats.overlimits++; |
| 196 | m->tcf_bstats.bytes += qdisc_pkt_len(skb); | ||
| 197 | m->tcf_bstats.packets++; | ||
| 198 | /* should we be asking for packet to be dropped? | 196 | /* should we be asking for packet to be dropped? |
| 199 | * may make sense for redirect case only | 197 | * may make sense for redirect case only |
| 200 | */ | 198 | */ |
