linux 2.4, net drivers, are "skb->data" physically continuous?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm writting a network driver for a DMA-enabled Fast Ethernet card,
for linux 2.4. If I'm not mistaken, whenever it wants to transmit a
packet, the kernel 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 (using of-course "pci_map_single()",
in order to synchronize it, and get its physical address) directly to
the card and let it do all the work.

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. This indicates that, since data
come directly for user-space, they might be non-continuous.

What really goes on?

Thanks in advance
/npat

-- 
That's right. Being a kernel maintainer suddenly turns your sex appeal
up by about 1000% for some magic reason.  
  -- Linus
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux