Subject: Re: [PATCH] net: pktgen: support injecting packets for qdisc testing

From: John Fastabend <[email-masked]>
Date: Sun, 10 Jan 2016 21:21:41 -0800

On 16-01-10 06:09 AM, Jamal Hadi Salim wrote:
> On 16-01-08 10:24 AM, John Fastabend wrote:
>> On 16-01-08 06:38 AM, Jamal Hadi Salim wrote:
>>> On 16-01-07 09:28 PM, John Fastabend wrote:
>>>>
>>>> Hi Jamal,
>>>>
>>>> per your comment about using pktgen to test qdiscs here is the
>>>> patch I've been using most the day which has been working well.
>>>> I'm guessing this is more or less what you had in mind.
>>>>
>>>
>>> I have attached the one i used over the holidays - see if there are
>>> any differences(sorry dont have much time right now).
>>>
>>> cheers,
>>> jamal
>>
>> Close except I don't back off the qdisc when I get
>> xmit_{drop|cn|policed} return codes because I'm trying to
>> stress the qdisc.
>>
> 
> In that case we need two modes. I think it is important to stress
> the qdisc backoff. It doesnt make sense to send packets that will
> be dropped. You said you were testing over vlan - how were you
> enforcing no backoff?

it was aborting so I wasn't able to do this with vlans. It is
interesting for example with pfifo_tail_enqueue where we return
NET_XMIT_CN but still enqueue the packet. If only to test the
qdisc, agreed though "real" users should backoff.

> 
>> Also I don't see the point to doing the skb_get_tx_queue and
>> txq_trans_update() this should be called by dev_queue_xmit
>> anyways.
>>
> 
> Yes, those could go away. They are leftovers of another experiment.
> 
> 
>> If its all the same to you I would just assume have my version in
>> pktgen and later if its useful for you add an option to back-off
>> when the qdisc throws an error.
> 
> 
> Refer to above. If you can fix it so we can do either i will ACK it.

I'll send a Jamal approved version when net-next opens again ;)

Thanks!
John