netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] [NET_CLS_ACT] Introduce skb_act_clone
@ 2007-10-16 12:29 jamal
  0 siblings, 0 replies; 3+ messages in thread
From: jamal @ 2007-10-16 12:29 UTC (permalink / raw)
  To: David Miller; +Cc: Alexey Kuznetsov, Herbert Xu, Patrick McHardy, netdev

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]


cheers,
jamal

[-- Attachment #2: 0001-NET_CLS_ACT-Introduce-skb_act_clone --]
[-- Type: text/plain, Size: 1024 bytes --]

[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>
---
 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
-- 
1.4.4.1.gaed4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/3] [NET_CLS_ACT] Introduce skb_act_clone
@ 2007-10-21 19:18 jamal
  2007-10-26  9:52 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: jamal @ 2007-10-21 19:18 UTC (permalink / raw)
  To: David Miller; +Cc: Alexey Kuznetsov, Herbert Xu, Patrick McHardy, netdev

[-- Attachment #1: Type: text/plain, Size: 66 bytes --]

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

cheers,
jamal

[-- Attachment #2: 0001-NET_CLS_ACT-Introduce-skb_act_clone.txt --]
[-- Type: application/mbox, Size: 1196 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] [NET_CLS_ACT] Introduce skb_act_clone
  2007-10-21 19:18 jamal
@ 2007-10-26  9:52 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2007-10-26  9:52 UTC (permalink / raw)
  To: hadi; +Cc: kuznet, herbert, kaber, netdev

From: jamal <hadi@cyberus.ca>
Date: Sun, 21 Oct 2007 15:18:46 -0400

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

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-26  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 12:29 [PATCH 1/3] [NET_CLS_ACT] Introduce skb_act_clone jamal
  -- strict thread matches above, loose matches on Subject: below --
2007-10-21 19:18 jamal
2007-10-26  9:52 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).