lkml.org 
[lkml]   [2001]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: is eth header is not transmitted
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/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.025 / U:2.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site