Re: Socket Buffers and Memory Managment

2007-07-20 Thread Andi Kleen
Evgeniy Polyakov <[EMAIL PROTECTED]> writes: > Hi. > > On Wed, Jul 18, 2007 at 11:51:03PM -0700, vinay ravuri ([EMAIL PROTECTED]) > wrote: > > How about the following approach: > > > > I allocate an skb of 0 bytes and replace data element > > of skb struct (i.e. skb.data = addr_given_by_hw) whe

Re: Socket Buffers and Memory Managment

2007-07-19 Thread Evgeniy Polyakov
Hi. On Wed, Jul 18, 2007 at 11:51:03PM -0700, vinay ravuri ([EMAIL PROTECTED]) wrote: > How about the following approach: > > I allocate an skb of 0 bytes and replace data element > of skb struct (i.e. skb.data = addr_given_by_hw) when > the h/w interrupts me with a packet. I register for a > d

Re: Socket Buffers and Memory Managment

2007-07-19 Thread Stephen Hemminger
On Wed, 18 Jul 2007 23:51:03 -0700 (PDT) vinay ravuri <[EMAIL PROTECTED]> wrote: > How about the following approach: > > I allocate an skb of 0 bytes and replace data element > of skb struct (i.e. skb.data = addr_given_by_hw) when > the h/w interrupts me with a packet. I register for a > destruc

Re: Socket Buffers and Memory Managment

2007-07-19 Thread pradeep singh
On 7/19/07, vinay ravuri <[EMAIL PROTECTED]> wrote: How about the following approach: I allocate an skb of 0 bytes and replace data element of skb struct (i.e. skb.data = addr_given_by_hw) when the h/w interrupts me with a packet. I register for a destructor for this skb and when the kernel is

Re: Socket Buffers and Memory Managment

2007-07-18 Thread vinay ravuri
How about the following approach: I allocate an skb of 0 bytes and replace data element of skb struct (i.e. skb.data = addr_given_by_hw) when the h/w interrupts me with a packet. I register for a destructor for this skb and when the kernel is ready to free the skb, I make sure that my free is inv

Re: Socket Buffers and Memory Managment

2007-07-18 Thread Stephen Hemminger
On Wed, 18 Jul 2007 13:13:21 -0400 Roy Pledge <[EMAIL PROTECTED]> wrote: > Stephen Hemminger wrote: > > > > You could play tricks with skb frags but it would be fragile > > and not worth the trouble. The problem is that the receive > > skb can stay in the system for a really long time (until the

Re: Socket Buffers and Memory Managment

2007-07-18 Thread Roy Pledge
Stephen Hemminger wrote: You could play tricks with skb frags but it would be fragile and not worth the trouble. The problem is that the receive skb can stay in the system for a really long time (until the application reads the data) so your fixed size buffer pool in hardware would get exhausted

Re: Socket Buffers and Memory Managment

2007-07-17 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Tue, 17 Jul 2007 20:41:29 +0100 > Sounds like sucky hardware... Although expect more of the same in the future, not less. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majord

Re: Socket Buffers and Memory Managment

2007-07-17 Thread Stephen Hemminger
On Tue, 17 Jul 2007 10:20:58 -0700 (PDT) vinay ravuri <[EMAIL PROTECTED]> wrote: > Hi, > > I am fairly new to linux socket buffers and have the > following questions! > > I am working with a custom ethernet MAC that does not > allow me to specify a particular memory location for > the h/w to DMA

Socket Buffers and Memory Managment

2007-07-17 Thread vinay ravuri
Hi, I am fairly new to linux socket buffers and have the following questions! I am working with a custom ethernet MAC that does not allow me to specify a particular memory location for the h/w to DMA the packet into (Rx side). Instead, it has a pool of fixed size buffers with some h/w specific h