Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203198
b: refs/heads/master
c: 210d6de
h: refs/heads/master
v: v3
  • Loading branch information
Changli Gao authored and David S. Miller committed Jun 29, 2010
1 parent dba96da commit 93e7863
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4ead4c595cd54cf7b1a184d4f888ce0d7cce7d4
refs/heads/master: 210d6de78c5d7c785fc532556cea340e517955e1
11 changes: 9 additions & 2 deletions trunk/include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,16 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
}

#ifdef CONFIG_NET_CLS_ACT
static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask)
static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
int action)
{
struct sk_buff *n = skb_clone(skb, gfp_mask);
struct sk_buff *n;

if ((action == TC_ACT_STOLEN || action == TC_ACT_QUEUED) &&
!skb_shared(skb))
n = skb_get(skb);
else
n = skb_clone(skb, gfp_mask);

if (n) {
n->tc_verd = SET_TC_VERD(n->tc_verd, 0);
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sched/act_mirred.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
goto out;
}

skb2 = skb_act_clone(skb, GFP_ATOMIC);
at = G_TC_AT(skb->tc_verd);
skb2 = skb_act_clone(skb, GFP_ATOMIC, m->tcf_action);
if (skb2 == NULL)
goto out;

m->tcf_bstats.bytes += qdisc_pkt_len(skb2);
m->tcf_bstats.packets++;
at = G_TC_AT(skb->tc_verd);
if (!(at & AT_EGRESS)) {
if (m->tcfm_ok_push)
skb_push(skb2, skb2->dev->hard_header_len);
Expand All @@ -185,8 +185,8 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
if (m->tcfm_eaction != TCA_EGRESS_MIRROR)
skb2->tc_verd = SET_TC_FROM(skb2->tc_verd, at);

skb2->dev = dev;
skb2->skb_iif = skb->dev->ifindex;
skb2->dev = dev;
dev_queue_xmit(skb2);
err = 0;

Expand Down

0 comments on commit 93e7863

Please sign in to comment.