Skip to contentSkip to conversation

Introduce skb_act_clone

PATCH Applied jamal 2 participants 2 messages Oct 21, 2007 – Oct 26, 2007

Subsystems (2)
lore
Share & tools
lore

jamal

author
#0 lore raw

PATCH 1/3 Introduce skb_act_clone

A resubmit against net-2.6 from about an hour ago.

cheers,
jamal

Quoted 1 line

From 3a7ec98d982b541361bbd6d539720df32431c3de Mon Sep 17 00:00:00 2001

From: Jamal Hadi Salim <[email protected]>
Date: Sun, 21 Oct 2007 15:01:40 -0400
Subject: [PATCH 1/3] [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

---
 include/net/sch_generic.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
include/net/sch_generic.h +15 -0
index a02ec9e..c926551 100644
@@ -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
Signature · 1 line
1.4.4.1.gaed4
maintainer Applied
#1 lore raw

From: jamal <[email protected]>
Date: Sun, 21 Oct 2007 15:18:46 -0400

Quoted 1 line

A resubmit against net-2.6 from about an hour ago.

Applied.