Subject: Re: pktgen question

From: Ben Greear <[email-masked]>
Date: Mon, 24 Sep 2007 11:22:50 -0700

Rick Jones wrote:
>>> Perf-wise, you could clone the skbs up front, then deliver them to 
>>> the nic in a tight loop.  This would mitigate the added overhead 
>>> introduced by calling skb_clone() in the loop doing transmits...
>>
>> That only works if you are sending a small number of skbs.  You can't 
>> pre-clone several minutes worth of 10Gbe traffic
>> with any normal amount of RAM.
> 
> Does pktgen really need to allocate anything more than some smallish 
> fraction more than the depth of the driver's transmit queue?

If you want to send sustained high rates of traffic, for more than
just a trivial amount of time, then you either have to play the current
trick with the skb_get(), or you have to allocate a real packet each time
(maybe with skb_clone() or similar, but it's still more overhead than the skb_get
which only bumps a reference count.)

I see no other way, but if you can think of one, please let me know.

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com