diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2007-10-26 02:47:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-26 02:47:23 -0700 |
commit | 12da81d11a34d3bdef52d731cc75f7ec72d0e815 (patch) | |
tree | c57948efbbb8b9fe6c760148f93db1b6951b8763 /include/net | |
parent | c7da57a183a255f53caa73b1f688a01b097fa5bc (diff) | |
download | kernel_samsung_smdk4412-12da81d11a34d3bdef52d731cc75f7ec72d0e815.zip kernel_samsung_smdk4412-12da81d11a34d3bdef52d731cc75f7ec72d0e815.tar.gz kernel_samsung_smdk4412-12da81d11a34d3bdef52d731cc75f7ec72d0e815.tar.bz2 |
[NET_CLS_ACT]: Introduce skb_act_clone
Reworked skb_clone looks uglier with the single ifdef
CONFIG_NET_CLS_ACT This patch introduces skb_act_clone which will
replace skb_clone in tc actions
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sch_generic.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a02ec9e..c926551 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -316,4 +316,19 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) return rtab->data[slot]; } +#ifdef CONFIG_NET_CLS_ACT +static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask) +{ + struct sk_buff *n = skb_clone(skb, gfp_mask); + + if (n) { + n->tc_verd = SET_TC_VERD(n->tc_verd, 0); + n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); + n->tc_verd = CLR_TC_MUNGED(n->tc_verd); + n->iif = skb->iif; + } + return n; +} +#endif + #endif |