From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0083.outbound.protection.outlook.com [104.47.34.83]) by dpdk.org (Postfix) with ESMTP id 9A4B2316B for ; Mon, 3 Apr 2017 20:02:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackpath.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Y+DAvpDBJq1V96+9NGsxr4CcpwxjN5+VcdiDEJDZfs8=; b=V277LdOKcTv5uqQQo1Vtyy56CQukya5StbbmRvt5PGql54mw5vfBRqtdlwpntfBAEKs1CENEB2hkrOgqesbvy9w0nNygLEsvfVlMjdNBd9WX58VzRDT7ZpBy+QefVm78pYQc4yWOeZHc/zu5tMV1zA4dpC4A/2MnTqIoHOcgwZY= Received: from MWHPR10MB1453.namprd10.prod.outlook.com (10.169.233.22) by MWHPR10MB1454.namprd10.prod.outlook.com (10.169.233.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Mon, 3 Apr 2017 18:02:22 +0000 Received: from MWHPR10MB1453.namprd10.prod.outlook.com ([10.169.233.22]) by MWHPR10MB1453.namprd10.prod.outlook.com ([10.169.233.22]) with mapi id 15.01.1005.018; Mon, 3 Apr 2017 18:02:22 +0000 From: Chris Hall To: "Wiles, Keith" CC: "users@dpdk.org" Thread-Topic: [dpdk-users] PKTGEN option to limit sending packets per second Thread-Index: AQHSrJukZrjqXtMh00+bxNVAP8UUGKG0XDkA//+Tcfo= Date: Mon, 3 Apr 2017 18:02:21 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=stackpath.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [64.47.96.210] x-microsoft-exchange-diagnostics: 1; MWHPR10MB1454; 7:O2j3sE4HSEmzyoFhFuxUED/bn4x/jIWIhuBhJHoy6/Cu1NhytlP4EhAnwAntCN3E8T9A7h1DpTIZBcT+B5SZ2Z+k1pO4OXu7EF62pimtoPly+CWt+YmSXRV3LQjF8zOJ6Lkk9qzqd4wgiX3GbQVQ579NLCAApmQjaB5GbnD9eSh9bx3CxWdBaZDUneVxyVcRRph40+o/IeHaXmNRbseyZ0EmiUH4w4aMf5oIvCoIIwIUv79T99o8gogc051hIoSqO8iIdbfbmn5d840MMi7pp43Mx+mfnHaXQoTCXa3k9IkrWWLcRpWwLtjO9vAZI6pUQgln/13P1yiwT8F5r2Y+yg== x-ms-office365-filtering-correlation-id: 3bfa8eff-cc4f-4031-870f-08d47abb93a6 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR10MB1454; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:MWHPR10MB1454; BCL:0; PCL:0; RULEID:; SRVR:MWHPR10MB1454; x-forefront-prvs: 0266491E90 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39400400002)(39850400002)(39840400002)(39450400003)(39410400002)(377454003)(24454002)(2900100001)(81166006)(8936002)(189998001)(99286003)(8676002)(7696004)(229853002)(122556002)(86362001)(54356999)(76176999)(50986999)(53936002)(236005)(66066001)(4326008)(25786009)(53546009)(9686003)(2950100002)(77096006)(3660700001)(110136004)(6506006)(7736002)(6916009)(38730400002)(2906002)(54896002)(6436002)(6246003)(74316002)(3280700002)(5660300001)(55016002)(6116002)(102836003)(3846002)(33656002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR10MB1454; H:MWHPR10MB1453.namprd10.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: stackpath.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2017 18:02:21.8628 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd04f7e7-8712-48a5-bd2d-688fe1861f4b X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1454 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] PKTGEN option to limit sending packets per second X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2017 18:02:25 -0000 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) ?? *shru= g* pktgen.set(sendport, 'rate', 1); pktgen.set(sendport, 'burst', 32); =85=85 local total_rt =3D 60; -- total script runtime local loop_rt =3D 30; -- loop runtime (in seconds) before increasing pa= cket count ("pkt_m") local pkt_m =3D 100; -- increase packet count by pkt_m at each intera= tion ("loop_rt") function main() loadSettings(); local run_t =3D 0; local start_t =3D os.time(); print(string.format("Starting - %.2fs", start_t)); pktgen.clear('all'); pkt_cnt =3D 0; while run_t <=3D total_rt do pkt_cnt =3D (pkt_cnt + pkt_m); print(string.format("Sending %d packets for %d seconds",pkt_cnt,loo= p_rt)); local pkt_send_t =3D 0; local pkt_send_sart_t =3D os.time(); while pkt_send_t <=3D loop_rt do pktgen.set(sendport, "count", pkt_cnt); pktgen.start(sendport); doWait(sendport,10); pkt_send_t =3D os.time() - pkt_send_sart_t; end run_t =3D os.time() - start_t; -- *meh* no harm here if(run_t >=3D 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 wrote: > > Hello, > > We are doing various tests using dpdk-pktgen. One thing we were looking a= t 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 ? somethi= ng like =93set 0 pps N=94 ? I=92ve played with the rate/burst delay, etc..= but I can=92t 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 bur= st 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