Re: is eth header is not transmitted

Sourav Sen (sourav@csa.iisc.ernet.in)
Thu, 4 Jan 2001 09:39:43 +0530 (IST)


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.

still the data ptr is after hh_hdr, ie. as follows :

+------------------------------------------------------+
| hh_hdr | ip_hdr | udp_hdr | payload |
+------------------------------------------------------+
^ ^ ^
| | |
sk->head sk->data sk->end

On a hadr_start_xmit(), ie say for rtl8129_start_xmit(), the
data sending takes place from skb->data and not from head. So is hh_hdr
not transmitted??

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

Sorry to disturb u like this :)

sourav

On Thu, 4 Jan 2001, Andi Kleen wrote:

> On Thu, Jan 04, 2001 at 09:08:06AM +0530, Sourav Sen wrote:
> >
> > Hi,
> > How can it be skb_put(), it only increments the tail/len ptr ??
>
> Oops typo, it's skb_push() for the header.
>
>
>
> -Andi
>
> > sourav
> >
> > On Wed, 3 Jan 2001, Andi Kleen wrote:
> >
> > > On Wed, Jan 03, 2001 at 10:59:48PM +0530, Sourav Sen wrote:
> > > >
> > > > Hi,
> > > > In the function ip_build_xmit(), immediately after
> > > > sk_alloc_send_skb(), skb_reserve(skb, hh_len) is called. Now
> > > > skb_reserve(skb,len) only increment the data pointer and tail pointer by
> > > > len amt.
> > > >
> > > > Now in a particular hard_start_xmit() say for rtl8139, the data
> > > > transfer is taking place from skb->data :
> > > > outl(virt_to_bus(skb->data), ioaddr + TxAddr0 + entry*4)
> > > >
> > > > So, I cannot understand, if transfer starts from data and not head, is
> > > > ethrnet header not transmitted? what I am missing?
> > >
> > > An skb_put()
> > >
> > >
> > > -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/