linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* where is the sk_buff allocation
@ 2007-04-22 18:06 Ming Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Ming Liu @ 2007-04-22 18:06 UTC (permalink / raw)
  To: linuxppc-embedded

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.

Thanks for your telling.

BR
Ming

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* where is the sk_buff allocation
@ 2007-04-22 18:14 Ming Liu
  2007-04-23  3:02 ` Olof Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Ming Liu @ 2007-04-22 18:14 UTC (permalink / raw)
  To: linuxppc-embedded

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.

Thanks for your telling.

BR
Ming

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: where is the sk_buff allocation
  2007-04-22 18:14 where is the sk_buff allocation Ming Liu
@ 2007-04-23  3:02 ` Olof Johansson
  2007-04-23 17:54   ` Ming Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2007-04-23  3:02 UTC (permalink / raw)
  To: Ming Liu; +Cc: linuxppc-embedded

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: where is the sk_buff allocation
  2007-04-23  3:02 ` Olof Johansson
@ 2007-04-23 17:54   ` Ming Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Ming Liu @ 2007-04-23 17:54 UTC (permalink / raw)
  To: olof; +Cc: linuxppc-embedded

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@lixom.net (Olof Johansson)
>To: Ming Liu <eemingliu@hotmail.com>
>CC: linuxppc-embedded@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  

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-23 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-22 18:14 where is the sk_buff allocation Ming Liu
2007-04-23  3:02 ` Olof Johansson
2007-04-23 17:54   ` Ming Liu
  -- strict thread matches above, loose matches on Subject: below --
2007-04-22 18:06 Ming Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).