Thread (6 messages) flat view 6 messages, 2 authors, 2010-06-05

Re: [PATCH] act_mirred: don't clone skb when skb isn't shared

From: jamal <hidden>
Date: 2010-06-05 12:53:59

On Fri, 2010-06-04 at 21:43 +0800, Changli Gao wrote:
don't clone skb when skb isn't shared

When the tcf_action is TC_ACT_STOLEN, and the skb isn't shared, we don't need
to clone a new skb. As the skb will be freed after this function returns, we
can use it freely once we get a reference to it.
It looks like a good optimization - but i am not a big fan of one-offs
[because usability goes down and I am forced to explain it longer in the
rules (refer to: Documentation/networking/tc-actions-env-rules.txt)]

How about you update skb_act_clone to take take the action code as well
and do the check the if stolen/queued it does a skb_get otherwise it
calls skb_clone?

cheers,
jamal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help