[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57754BD9.5010709@gmail.com>
Date: Thu, 30 Jun 2016 09:42:01 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: jhs@...atatu.com, netdev@...r.kernel.org
Subject: Re: [net-next PATCH v2 1/2] net: pktgen: support injecting packets
for qdisc testing
On 16-06-30 01:37 AM, Jesper Dangaard Brouer wrote:
> On Wed, 29 Jun 2016 13:03:06 -0700
> John Fastabend <john.fastabend@...il.com> wrote:
>
>> Add another xmit_mode to pktgen to allow testing xmit functionality
>> of qdiscs. The new mode "queue_xmit" injects packets at
>> __dev_queue_xmit() so that qdisc is called.
>>
>> Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
>
> I generally like this.
>
[...]
>> @@ -3434,6 +3442,36 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
>> #endif
>> } while (--burst > 0);
>> goto out; /* Skips xmit_mode M_START_XMIT */
>> + } else if (pkt_dev->xmit_mode == M_QUEUE_XMIT) {
>> + local_bh_disable();
>> + atomic_add(burst, &pkt_dev->skb->users);
>
> Reading the code, people might think that "burst" is allowed for this
> mode, which it is not. (You do handle this earlier in this patch when
> configuring this mode).
Right we never get here without burst == 1 but sure it does read
a bit strange I'll use atomic_inc().
Thanks,
John
Powered by blists - more mailing lists