where is the sk_buff allocation

Ming Liu eemingliu at hotmail.com
Tue Apr 24 03:54:50 EST 2007


Dear Olof,
Thanks for your information first.

In fact, my aim is to avoid frequent copying between socket_buffer and my 
reserved memory block. So my idea is to just modify the protocal stack and 
allocate the socket buffer into my reserved memory space which is also 
accessible accessible for user application program, although perhaps it is 
not safe to do that. 

BTW, do you know in which specific file is the socket buffer allocated? 

BR
Ming


>From: olof at lixom.net (Olof Johansson)
>To: Ming Liu <eemingliu at hotmail.com>
>CC: linuxppc-embedded at ozlabs.org
>Subject: Re: where is the sk_buff allocation
>Date: Sun, 22 Apr 2007 22:02:04 -0500
>
>On Sun, Apr 22, 2007 at 06:14:18PM +0000, Ming Liu wrote:
> > Dear all,
> > I am reading and understanding the Xilinx Temac device driver. I know 
that
> > hard_start_xmit() is used to transmit the packets. In this function, a
> > pointer skb which points to a sk_buff needs to be passed to show the
> > location of the socket buffer. But where is that sk_buff allocation
> > sentence, and how its address (skb) is passed to the hard_start_xmit()
> > function? I want to change the address of the sk_buff in my system and 
try
> > to fit this socket buffer in a pre-defined location.
>
>The sk_buff is allocated by the network stack and passed down to the
>driver.  If you need the buffer to be located in a specific location
>before transmitting it, then you'll have to copy it there by hand.
>
>
>-Olof

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  




More information about the Linuxppc-embedded mailing list