Re: [PATCH] cls_u32: use skb_copy_bits() to dereference data safely
From: David Miller <davem@davemloft.net>
Date: 2010-06-02 13:43:09
From: David Miller <davem@davemloft.net>
Date: 2010-06-02 13:43:09
From: jamal <redacted> Date: Wed, 02 Jun 2010 09:36:37 -0400
On Wed, 2010-06-02 at 21:14 +0800, Changli Gao wrote:quoted
Maybe skb_header_pointer() is lighter.A little worse than skb_copy_bits(). In any case, this change is going to hurt.
Umm, Jamal what are you talking about? Using skb_header_pointer(), if the offset is in range, there is no change from today other than a comparison. If it is not in range, we use skb_copy_bits(). It's only for the case where we have to fetch the value from the fragmented part of the SKB.