Are "skb->data" physically continuous?

From: Nick Patavalis (npat@inaccessnetworks.com)
Date: Sat Sep 13 2003 - 17:36:37 EST


Hi,

I'm not sure if this is the correct list to post this; sory if it
isn't.

I'm writting a network driver for a DMA-enabled Fast Ethernet card,
for linux 2.4. If I'm not mistaken the kernel, whenever it wants to
transmit a packet, calls the driver's "hard_start_xmit()" function,
passing it a pointer to the "skb" holding the packet.

My question is: is there any guarantee that the packet's data at
"skb->data" are stored in physically-continuous memory locations?

If it is so, then I can pass the "skb->data" pointer directly to the
card and let it do all the work (using of-course "pci_map_single()" or
similar means, in order to synchronize it, and get its physical
address). If not then I have to copy the packet to a
known-to-be-continuous area (e.g. a kmalloc-allocated one); this
caries a certain performance penalty.

Existing drivers I've studied (namely: "eepro100.c") seem to make this
assumption, but I have also heard that "zero-copy" networking was
added to the kernel at some point. Zero-copy indicates that data come
directly for user-space and, hence, they might be non-continuous.

Thanks in advance
/npat

--
What strange patches have you been smoking?
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html