lkml.org 
[lkml]   [2000]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectAllocating my own skbuff data
I'm working on network drivers emulating ethernet over a PCI backplane.
For receives I need packet data located in a region of memory visible to
the backplane. I also want this data to be referenced by an skb, without
the expense of an extra memcpy. This region of memory will be somewhere
between 4MB and total memory in size, and must be located at a local
address which is a multiple of its size.

Which is least ugly:
0) Making ZONE_DMA the smaller of my region and 16MB,
1) making a new zone, so I can use kmalloc/kfree
or
2) using my own allocator and doing the free with skb->destructor?

0 is a bit of a hack, and I'm using it now in PowerPC systems with no
ISA bus.
1 has logical consistency, but requires changes to the mm code.
2 has the huge advantage of not requiring changes to the mm code, but
I'm not sure that destructors are really meant for this sort of trick.

- Adrian Cox, AG Electronics
-
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:38    [W:0.028 / U:3.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site