Problems with netmap pkt-gen (ip range and packet counter)
hiren panchasara
hiren.panchasara at gmail.com
Fri Jan 17 20:03:54 UTC 2014
On Fri, Jan 17, 2014 at 11:16 AM, Olivier Cochard-Labbé
<olivier at cochard.me> wrote:
> On Mon, Dec 23, 2013 at 11:16 AM, Olivier Cochard-Labbé
> <olivier at cochard.me>wrote:
>
>>
>> My second problem is with the latest -current version of pkt-gen only: The
>> 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 == g->nthreads)
break;
Can we add if (npkts >= g.npackets) then break? Would that work?
cheers,
Hiren
More information about the freebsd-net
mailing list