Date: Fri, 17 Jan 2014 12:03:10 -0800 From: hiren panchasara <hiren.panchasara@gmail.com> To: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= <olivier@cochard.me> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: Problems with netmap pkt-gen (ip range and packet counter) Message-ID: <CALCpEUEpS1LMAOt-Nr%2BJvsHvsnV5Y-QmASHY=aOs2%2Bv=riDngg@mail.gmail.com> In-Reply-To: <CA%2Bq%2BTcr-ooALqEnpjW-YqFegW8Yb5bynoiYXq_WbbY_ow%2Bs0mA@mail.gmail.com> References: <CA%2Bq%2BTcqDisyY%2B_jxrMYSfwvHyZfuWtRnfy6nkt0wFrJD3RWPNw@mail.gmail.com> <CA%2Bq%2BTcr-ooALqEnpjW-YqFegW8Yb5bynoiYXq_WbbY_ow%2Bs0mA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 17, 2014 at 11:16 AM, Olivier Cochard-Labb=C3=A9 <olivier@cochard.me> wrote: > On Mon, Dec 23, 2013 at 11:16 AM, Olivier Cochard-Labb=C3=A9 > <olivier@cochard.me>wrote: > >> >> My second problem is with the latest -current version of pkt-gen only: T= he >> 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....) Appears to me that main_thread() doesn't have a terminating condition based on g.npackets (number of packets to send). Only condition seems to be: if (done =3D=3D g->nthreads) break; Can we add if (npkts >=3D g.npackets) then break? Would that work? cheers, Hiren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUEpS1LMAOt-Nr%2BJvsHvsnV5Y-QmASHY=aOs2%2Bv=riDngg>