Subject: Re: [PATCH] pktgen: nowait parameter.

From: Rusty Russell <[email-masked]>
Date: Thu, 11 Sep 2014 09:07:29 +0930

David Miller <[email-masked]> writes:
> From: Rusty Russell <[email-masked]>
> Date: Wed, 03 Sep 2014 13:50:01 +0930
>
>> While trying to measure speed of virtio_net, I was getting hangs.
>> This is because we skb_orphan() but delay the tx interrupt
>> indefinitely (by number of slots).
>> 
>> With nowait, pktgen won't wait for the skb to be released.  This
>> introduces an error, but it's ok if count >> ringsize.
>> 
>> I updated the documentation, but it needs far more work (it
>> refers to pgset and an examples directory, none of which exist
>> in the kernel tree).
>> 
>> Signed-off-by: Rusty Russell <[email-masked]>
>
> Please just make this a flag, like UDPCSUM, NO_TIMESTAMP, et al.
> Which also means that it should be capitalized.

Agreed, though I prefer Jason's IFF_TX_SKB_FREE_DELAY, which doesn't
require intimate knowledge of the driver to get the option correct.

> BTW, wrt. holding onto TX frames for unbounded amounts of time, I
> think this is a bad idea even with skb_orphan().  There are resources
> from the SKB you are hanging onto which can stall the removal of
> modules indefinitely, such as netfilter references.

We could certainly have a once-a-second timer which did this, but should
skb_orphan() do that work instead?

Cheers,
Rusty.