* Re: [dpdk-users] PKTGEN option to limit sending packets per second
@ 2017-04-04 22:58 Chris Hall
0 siblings, 0 replies; 5+ messages in thread
From: Chris Hall @ 2017-04-04 22:58 UTC (permalink / raw)
To: Wiles, Keith; +Cc: users
Nice! These certainly help achieve finer granularity we were looking for. :)
Thanks Keith.
-Chris
>> On Apr 3, 2017, at 1:02 PM, Chris Hall <chris.hall@stackpath.com> wrote:
>>
>> Hi Keith,
>>
>> Just figured I would ask. ��
>> I was able to whip up some LUA that seems to work thus far.
>
>
>BTW, the current version of Pktgen 3.2.x has support for decimal numbers in the rate values. e.g. 10.1, 0.01, 93.4, ...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-users] PKTGEN option to limit sending packets per second
2017-04-03 18:02 ` Chris Hall
@ 2017-04-03 18:58 ` Wiles, Keith
0 siblings, 0 replies; 5+ messages in thread
From: Wiles, Keith @ 2017-04-03 18:58 UTC (permalink / raw)
To: Chris Hall; +Cc: users
> On Apr 3, 2017, at 1:02 PM, Chris Hall <chris.hall@stackpath.com> wrote:
>
> Hi Keith,
>
> Just figured I would ask. ��
> I was able to whip up some LUA that seems to work thus far.
BTW, the current version of Pktgen 3.2.x has support for decimal numbers in the rate values. e.g. 10.1, 0.01, 93.4, ...
>
> fwiw, LUA snippet:
>
> -- ?? may add logic to adjust these values over each interation(s) ?? *shrug*
> pktgen.set(sendport, 'rate', 1);
> pktgen.set(sendport, 'burst', 32);
>
> ……
>
> local total_rt = 60; -- total script runtime
> local loop_rt = 30; -- loop runtime (in seconds) before increasing packet count ("pkt_m")
> local pkt_m = 100; -- increase packet count by pkt_m at each interation ("loop_rt")
>
> function main()
>
> loadSettings();
>
> local run_t = 0;
> local start_t = os.time();
>
> print(string.format("Starting - %.2fs", start_t));
> pktgen.clear('all');
> pkt_cnt = 0;
>
> while run_t <= total_rt do
>
> pkt_cnt = (pkt_cnt + pkt_m);
> print(string.format("Sending %d packets for %d seconds",pkt_cnt,loop_rt));
>
> local pkt_send_t = 0;
> local pkt_send_sart_t = os.time();
>
> while pkt_send_t <= loop_rt do
> pktgen.set(sendport, "count", pkt_cnt);
> pktgen.start(sendport);
> doWait(sendport,10);
> pkt_send_t = os.time() - pkt_send_sart_t;
> end
>
> run_t = os.time() - start_t;
>
> -- *meh* no harm here
> if(run_t >= total_rt) then
> goto exit;
> end
> end
>
>
> ::exit::
> pktgen.stop(sendport);
> print(string.format("Completed - elapsed: %.2fs",run_t));
> return;
>
>
>
>
> From: Wiles, Keith
> Sent: Monday, April 3, 2017 12:31 PM
> To: Chris Hall
> Cc: users@dpdk.org
> Subject: Re: [dpdk-users] PKTGEN option to limit sending packets per second
>
>
> > On Apr 3, 2017, at 11:59 AM, Chris Hall <chris.hall@stackpath.com> wrote:
> >
> > Hello,
> >
> > We are doing various tests using dpdk-pktgen. One thing we were looking at is sending a consent stream of packets at a specified number of pps over a period of time. Was wondering if this could be an added feature ? something like “set 0 pps N” ? I’ve played with the rate/burst delay, etc.. but I can’t really put a cap on packets per second.
>
> I have not thought about rate at PPS, but it is a good idea. I do not think it will be hard to do at least I do not think so :-)
>
> At this time I send a burst of packets up to 32 at a time using an interval or cycles. Did you really want the packets spaced equally over the second or do you want the burst of packets to be used in the calculations. At very low PPS it is possible to have 1 packet per second. The reason for the burst size is to get the best performance, but if we space the single packets across time then getting to wire rate maybe hard.
>
> >
> > Thanks much
> > Chris
> >
> >
>
> Regards,
> Keith
Regards,
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-users] PKTGEN option to limit sending packets per second
2017-04-03 17:30 ` Wiles, Keith
@ 2017-04-03 18:02 ` Chris Hall
2017-04-03 18:58 ` Wiles, Keith
0 siblings, 1 reply; 5+ messages in thread
From: Chris Hall @ 2017-04-03 18:02 UTC (permalink / raw)
To: Wiles, Keith; +Cc: users
Hi Keith,
Just figured I would ask. ??
I was able to whip up some LUA that seems to work thus far.
fwiw, LUA snippet:
-- ?? may add logic to adjust these values over each interation(s) ?? *shrug*
pktgen.set(sendport, 'rate', 1);
pktgen.set(sendport, 'burst', 32);
……
local total_rt = 60; -- total script runtime
local loop_rt = 30; -- loop runtime (in seconds) before increasing packet count ("pkt_m")
local pkt_m = 100; -- increase packet count by pkt_m at each interation ("loop_rt")
function main()
loadSettings();
local run_t = 0;
local start_t = os.time();
print(string.format("Starting - %.2fs", start_t));
pktgen.clear('all');
pkt_cnt = 0;
while run_t <= total_rt do
pkt_cnt = (pkt_cnt + pkt_m);
print(string.format("Sending %d packets for %d seconds",pkt_cnt,loop_rt));
local pkt_send_t = 0;
local pkt_send_sart_t = os.time();
while pkt_send_t <= loop_rt do
pktgen.set(sendport, "count", pkt_cnt);
pktgen.start(sendport);
doWait(sendport,10);
pkt_send_t = os.time() - pkt_send_sart_t;
end
run_t = os.time() - start_t;
-- *meh* no harm here
if(run_t >= total_rt) then
goto exit;
end
end
::exit::
pktgen.stop(sendport);
print(string.format("Completed - elapsed: %.2fs",run_t));
return;
From: Wiles, Keith<mailto:keith.wiles@intel.com>
Sent: Monday, April 3, 2017 12:31 PM
To: Chris Hall<mailto:chris.hall@stackpath.com>
Cc: users@dpdk.org<mailto:users@dpdk.org>
Subject: Re: [dpdk-users] PKTGEN option to limit sending packets per second
> On Apr 3, 2017, at 11:59 AM, Chris Hall <chris.hall@stackpath.com> wrote:
>
> Hello,
>
> We are doing various tests using dpdk-pktgen. One thing we were looking at is sending a consent stream of packets at a specified number of pps over a period of time. Was wondering if this could be an added feature ? something like “set 0 pps N” ? I’ve played with the rate/burst delay, etc.. but I can’t really put a cap on packets per second.
I have not thought about rate at PPS, but it is a good idea. I do not think it will be hard to do at least I do not think so :-)
At this time I send a burst of packets up to 32 at a time using an interval or cycles. Did you really want the packets spaced equally over the second or do you want the burst of packets to be used in the calculations. At very low PPS it is possible to have 1 packet per second. The reason for the burst size is to get the best performance, but if we space the single packets across time then getting to wire rate maybe hard.
>
> Thanks much
> Chris
>
>
Regards,
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-users] PKTGEN option to limit sending packets per second
2017-04-03 16:59 Chris Hall
@ 2017-04-03 17:30 ` Wiles, Keith
2017-04-03 18:02 ` Chris Hall
0 siblings, 1 reply; 5+ messages in thread
From: Wiles, Keith @ 2017-04-03 17:30 UTC (permalink / raw)
To: Chris Hall; +Cc: users
> On Apr 3, 2017, at 11:59 AM, Chris Hall <chris.hall@stackpath.com> wrote:
>
> Hello,
>
> We are doing various tests using dpdk-pktgen. One thing we were looking at is sending a consent stream of packets at a specified number of pps over a period of time. Was wondering if this could be an added feature ? something like “set 0 pps N” ? I’ve played with the rate/burst delay, etc.. but I can’t really put a cap on packets per second.
I have not thought about rate at PPS, but it is a good idea. I do not think it will be hard to do at least I do not think so :-)
At this time I send a burst of packets up to 32 at a time using an interval or cycles. Did you really want the packets spaced equally over the second or do you want the burst of packets to be used in the calculations. At very low PPS it is possible to have 1 packet per second. The reason for the burst size is to get the best performance, but if we space the single packets across time then getting to wire rate maybe hard.
>
> Thanks much
> Chris
>
>
Regards,
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-users] PKTGEN option to limit sending packets per second
@ 2017-04-03 16:59 Chris Hall
2017-04-03 17:30 ` Wiles, Keith
0 siblings, 1 reply; 5+ messages in thread
From: Chris Hall @ 2017-04-03 16:59 UTC (permalink / raw)
To: users
Hello,
We are doing various tests using dpdk-pktgen. One thing we were looking at is sending a consent stream of packets at a specified number of pps over a period of time. Was wondering if this could be an added feature ? something like “set 0 pps N” ? I’ve played with the rate/burst delay, etc.. but I can’t really put a cap on packets per second.
Thanks much
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-04 22:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 22:58 [dpdk-users] PKTGEN option to limit sending packets per second Chris Hall
-- strict thread matches above, loose matches on Subject: below --
2017-04-03 16:59 Chris Hall
2017-04-03 17:30 ` Wiles, Keith
2017-04-03 18:02 ` Chris Hall
2017-04-03 18:58 ` Wiles, Keith
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).