Allocating my own skbuff data

From: Adrian Cox (apc@agelectronics.co.uk)
Date: Mon Sep 04 2000 - 11:25:56 EST


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/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:18 EST