net: TX_RING and packet mmap

New packet socket feature that makes packet socket more efficient for
transmission.

- It reduces number of system call through a PACKET_TX_RING mechanism,
  based on PACKET_RX_RING (Circular buffer allocated in kernel space
  which is mmapped from user space).

- It minimizes CPU copy using fragmented SKB (almost zero copy).

Signed-off-by: Johann Baudy <johann.baudy@gnu-log.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Johann Baudy
2009-05-18 22:11:22 -07:00
committed by David S. Miller
parent f67f340849
commit 69e3c75f4d
4 changed files with 622 additions and 141 deletions

View File

@ -203,6 +203,9 @@ struct skb_shared_info {
#ifdef CONFIG_HAS_DMA
dma_addr_t dma_maps[MAX_SKB_FRAGS + 1];
#endif
/* Intermediate layers must ensure that destructor_arg
* remains valid until skb destructor */
void * destructor_arg;
};
/* We divide dataref into two halves. The higher 16 bits hold references