From owner-freebsd-net@FreeBSD.ORG Fri Jan 17 19:17:08 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E2BABFA for ; Fri, 17 Jan 2014 19:17:08 +0000 (UTC) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [IPv6:2607:f8b0:400c:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC39D117F for ; Fri, 17 Jan 2014 19:17:07 +0000 (UTC) Received: by mail-vb0-f51.google.com with SMTP id 11so1760837vbe.10 for ; Fri, 17 Jan 2014 11:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=4j7q+NL347gXrWEmJZbxW2fCflx8wRbTLuZX4IiOQC0=; b=crLabw7XJ+IGLW2BOuffHPDswvks+5S/G3RM3icXvPmSepXc0mIQ8IUuJjoAxcAnCe iUnmVBjPDMewnsVjJSjt1UK2N2d1khxj0lOOjtbpOM6fvqHt4MKjO2pfPR7nWksaozy7 JefrBudwg49r2EQitxIooBRWRRplo6JoRefnCby4a/KgjurDZQDI6ULIuIlqElR5gOQF /2P6Wbh/Mg/CsnlKHad7jw1Qar+VtFoHSvfEIk4fGeS/S3Iji/qRFgPrJqBVY9ynyuK8 EMbgJVjQOACN/Gv7cjOJfhGNwxDtmwv3ZJE6uRkbBe74zDX3kMr/bJ1+/YtcwGeJL8cd j8BA== X-Received: by 10.52.117.176 with SMTP id kf16mr1470866vdb.6.1389986226859; Fri, 17 Jan 2014 11:17:06 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.171.1 with HTTP; Fri, 17 Jan 2014 11:16:46 -0800 (PST) In-Reply-To: References: From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Fri, 17 Jan 2014 20:16:46 +0100 X-Google-Sender-Auth: k5XDxN-16U_0tDzWiXTH1okpUkM Message-ID: Subject: Re: Problems with netmap pkt-gen (ip range and packet counter) To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jan 2014 19:17:08 -0000 On Mon, Dec 23, 2013 at 11:16 AM, Olivier Cochard-Labb=E9 wrote: > > My second problem is with the latest -current version of pkt-gen only: Th= e > first time (and only the first time) I'm using the pk-gen in sender mode > with a max number of packet (-n option) to send: It doesn't stop and > doesn't exit automatically when counter is reached. > > > I've added some DEBUG messages to the pkt-gen code and found an infinite loop when it wait all the TX queues to be empty at "nm_tx_pending(txring)". (etc..) main_thread [1397] 12829932 pps (12842762 pkts in 1001000 usec) main_thread [1397] 12829621 pps (12842463 pkts in 1001001 usec) main_thread [1397] 12835472 pps (12861092 pkts in 1001996 usec) main_thread [1397] 12834919 pps (13078782 pkts in 1019000 usec) sender_body [1040] [DEBUG] End for while sent < n sender_body [1043] [DEBUG] End flush remaining packets sender_body [1048] [DEBUG] wait for TX queue 0 be empty... main_thread [1397] 8271783 pps (8797049 pkts in 1063501 usec) main_thread [1397] 0 pps (0 pkts in 1007501 usec) main_thread [1397] 0 pps (0 pkts in 1063499 usec) (etc....)