Subject: Re: pktgen question

From: Evgeniy Polyakov <[email-masked]>
Date: Sun, 23 Sep 2007 21:28:04 +0400

Hi Steve.

On Sun, Sep 23, 2007 at 11:12:12AM -0500, Steve Wise ([email-masked]) wrote:
> The pktgen module provides a way to "clone" the skb its using for 
> transmission, and allows passing N clones of the originally created skb 
> to the driver under test.    However, it doesn't really use skb_clone(), 
> but rather it just bumps the skb->users count for each "clone" and 
> passes the same skb ptr to the driver.
> 
> Q: Is that a valid use of skb->users or should pktgen really be cloning 
> the skbuff?

It's a hack, but since skb is owned by pktgen only (no copies in some
outside queues or some other access) it is allowed just to bump reference
counter (i.e. 'share' skb in usual notation).

-- 
	Evgeniy Polyakov