From: John Fastabend <john.fastabend@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: jhs@mojatatu.com, netdev@vger.kernel.org
Subject: Re: [net-next PATCH v2 1/2] net: pktgen: support injecting packets for qdisc testing
Date: Thu, 30 Jun 2016 09:42:01 -0700 [thread overview]
Message-ID: <57754BD9.5010709@gmail.com> (raw)
In-Reply-To: <20160630103758.37bc8d6f@redhat.com>
On 16-06-30 01:37 AM, Jesper Dangaard Brouer wrote:
> On Wed, 29 Jun 2016 13:03:06 -0700
> John Fastabend <john.fastabend@gmail.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@intel.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
next prev parent reply other threads:[~2016-06-30 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 20:03 [net-next PATCH v2 1/2] net: pktgen: support injecting packets for qdisc testing John Fastabend
2016-06-29 20:03 ` [net-next PATCH v2 2/2] net: samples: pktgen mode samples/tests for qdisc layer John Fastabend
2016-06-30 8:23 ` Jesper Dangaard Brouer
2016-06-30 16:39 ` John Fastabend
2016-06-30 8:37 ` [net-next PATCH v2 1/2] net: pktgen: support injecting packets for qdisc testing Jesper Dangaard Brouer
2016-06-30 16:42 ` John Fastabend [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-02 21:12 John Fastabend
2016-07-04 23:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57754BD9.5010709@gmail.com \
--to=john.fastabend@gmail.com \
--cc=brouer@redhat.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).