Re: is eth header is not transmitted

Andi Kleen (ak@suse.de)
Thu, 4 Jan 2001 05:33:52 +0100


On Thu, Jan 04, 2001 at 09:39:43AM +0530, Sourav Sen wrote:
>
> Ya, I also noticed if it is skb_push() it may work, but where is
> skb_push() called?? ... the following
> is part of the fn. call trace for udp send :
>
> in ip_build_xmit()
>
> sock_alloc_send_skb() -- allocates the sk_buff
> skb_reserve() -- advances the data pointer to by
> sizeof(hard_hdr) amt.
> skb_put() -- puts the ip_hdr
> >> getfrag() --> udp_getfrag_nosum()(assuming chksum off) --
> sets udp_hdr.
> memcpy_fromiovecend() -- puts the data after that.
>
> r->u.dst.output() -- > dev_queue_xmit() -- queues the pkt.

dst.output() normally points to ip_output(), which fills the hh in (using
appropiate other neighbour callbacks or the hh cache)

> Another question is why in sock_alloc_send_skb() , 15 is added to
> length field?

So that you can use long word accesses and it doesn't fault when the packet
happens to be at the end of memory. Actually it is not required anymore with
the current memory allocator.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/