* [PATCH net-next] net: skbuff: don't zero tc members when freeing skb
@ 2014-12-31 12:33 Florian Westphal
2015-01-02 21:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2014-12-31 12:33 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
Not needed, only four cases:
- kfree_skb (or one of its aliases).
Don't need to zero, memory will be freed.
- kfree_skb_partial and head was stolen: memory will be freed.
- skb_morph: The skb header fields (including tc ones) will be
copied over from the 'to-be-morphed' skb right after
skb_release_head_state returns.
- skb_segment: Same as before, all the skb header
fields are copied over from the original skb right away.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/core/skbuff.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index ae13ef6..8e20bfa 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -677,13 +677,6 @@ static void skb_release_head_state(struct sk_buff *skb)
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
nf_bridge_put(skb->nf_bridge);
#endif
-/* XXX: IS this still necessary? - JHS */
-#ifdef CONFIG_NET_SCHED
- skb->tc_index = 0;
-#ifdef CONFIG_NET_CLS_ACT
- skb->tc_verd = 0;
-#endif
-#endif
}
/* Free everything but the sk_buff shell. */
--
2.0.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: skbuff: don't zero tc members when freeing skb
2014-12-31 12:33 [PATCH net-next] net: skbuff: don't zero tc members when freeing skb Florian Westphal
@ 2015-01-02 21:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-01-02 21:05 UTC (permalink / raw)
To: fw; +Cc: netdev
From: Florian Westphal <fw@strlen.de>
Date: Wed, 31 Dec 2014 13:33:41 +0100
> Not needed, only four cases:
> - kfree_skb (or one of its aliases).
> Don't need to zero, memory will be freed.
> - kfree_skb_partial and head was stolen: memory will be freed.
> - skb_morph: The skb header fields (including tc ones) will be
> copied over from the 'to-be-morphed' skb right after
> skb_release_head_state returns.
> - skb_segment: Same as before, all the skb header
> fields are copied over from the original skb right away.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Agreed, applied, thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-02 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-31 12:33 [PATCH net-next] net: skbuff: don't zero tc members when freeing skb Florian Westphal
2015-01-02 21:05 ` 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).