Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/net/net-intro/2.html
Дата изменения: Thu Mar 23 12:38:17 2000
Дата индексирования: Wed Sep 15 04:17:54 2010
Кодировка:

Поисковые слова: starspots
Question on alloc_skb() The HyperNews Linux KHG Discussion Pages

Question: Question on alloc_skb()

Forum: Network Buffers And Memory Management
Keywords: network interface
Date: Mon, 31 Mar 1997 18:16:47 GMT
From: Joern Wohlrab <unknown>

Hi, 
  As I read in that introduction a network device driver
has to alloc a sk_buff in it's ISR and this has to happen
atomically, isn't it? Well my experiences are that unfortunately
it often happens that alloc_skb returns NULL. So my idea was
I alloc a few sk_buff's (with GFP_KERNEL flag) in the device
drivers open function. The device driver would organize these 
sk_buff's as ring. Else the device driver must forbid the 
higher layer to free the sk_buff's. Is this possible just 
by setting the lock flag inside sk_buff?
The only problem with this scheme is when the user process
doesn't read frequently from the socket the device driver
overrides unread sk_buff data again and the packet order would
be destroyed. But let's assume we don't care. So is this plan
possible at all?
  Thank you very much.
--
Joern Wohlrab


Messages

1. Disagree: Re: Question on alloc_skb() by Erik Petersen