Hi,

On Mon, Oct 14, 2013 at 09:07:03PM -0300, Werner Almesberger wrote:
> Alexander Aring wrote:
> > This patch drops the directly memcpy on skb and uses the right skb
> > memcpy functions. Also remove an unnecessary check if plen is non zero.
> 
> The memcpys actually looked a little easier :-) But your
> change looks correct.
> 
I will notice the point that:

skb_copy_from_linear_data_offset(skb, offset + mlen,
                                        skb_put(frag, plen), plen);

is change to:

skb_put(frag, plen);
skb_copy_to_linear_data_offset(frag, mlen + hlen,
                                        skb_network_header(skb) + offset, plen);

to use here frag instead of skb will make all copies in the same
behaviour otherwise it's hard to understand because the hlen is inside
tha already skb_put(frag, hlen).... it's not easy to understand why we
need now mlen + hlen here.

Other point is that offset + mlen is correct but better would be mlen +
offset, because it represents the memory order.

This is all fixed with this patch...

- Alex

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to