Skip to content

Commit

Permalink
Do not assume packets are IP necesseraly
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette authored and supercoolin committed Oct 4, 2024
1 parent 08400c4 commit c47f1ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions modules/fastclick-play-single-mt.npf
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,15 @@ ig :: Script(TYPE ACTIVE,
set sent $(avgSIN.add count),
set bytessent $(avgSIN.add byte_count),
set bytes $(RIN/avg.add byte_count),
print "IG-$t-RESULT-${PREFIX}IGCOUNT $(sub $count $lastcount)",
print "IG-$t-RESULT-${PREFIX}IGSENT $(sub $sent $lastsent)",
print "IG-$t-RESULT-${PREFIX}IGBYTESSENT $(sub $bytessent $lastbytessent)",
set drop $(sub $sent $count),
print "IG-$t-RESULT-${PREFIX}IGDROPPED $(sub $drop $lastdrop)",
set lastdrop $drop,
{% if GEN_RX %}
print "IG-$t-RESULT-${PREFIX}IGCOUNT $(sub $count $lastcount)",
print "IG-$t-RESULT-${PREFIX}IGDROPPED $(sub $drop $lastdrop)",
print "IG-$t-RESULT-${PREFIX}IGTHROUGHPUT $(div $(mul $(add $(mul $(sub $count $lastcount) 24) $(sub $bytes $lastbytes)) 8) $elapsed)",
{% endif %}
goto next $(eq $DOLAT 0),
// print "IG-$t-RESULT-${PREFIX}ILAT01 $(RIN/tsd0.perc01 $indexA)",
// print "IG-$t-RESULT-${PREFIX}ILAT50 $(RIN/tsd0.median $indexA)",
Expand Down Expand Up @@ -369,20 +371,22 @@ dm :: DriverManager( print "Waiting ${GEN_START_DELAY} seconds before launching
goto perc $(le $i 100.0),
label alatval,
print "RESULT-${PREFIX}TESTTIME $(sub $stoptime $starttime)",
print "RESULT-${PREFIX}RCVTIME $(RIN/avg.avg time)",
print "RESULT-${PREFIX}THROUGHPUT $(RIN/avg.add link_rate)",
set sent $(avgSIN.add count),
set count $(RIN/avg.add count),
set bytes $(RIN/avg.add byte_count),
{% if GEN_RX %}
print "RESULT-${PREFIX}RCVTIME $(RIN/avg.avg time)",
print "RESULT-${PREFIX}THROUGHPUT $(RIN/avg.add link_rate)",
print "RESULT-${PREFIX}COUNT $count",
print "RESULT-${PREFIX}BYTES $bytes",
print "RESULT-${PREFIX}SENT $sent",
print "RESULT-${PREFIX}DROPPED $(sub $sent $count)",
print "RESULT-${PREFIX}DROPPEDPC $(div $(sub $sent $count) $sent)",
// print "RESULT-${PREFIX}DROPPEDPS $(div $(sub $sent $count) $(RIN/avg.avg time))",
print "RESULT-${PREFIX}DROPPEDPS $(div $(sub $sent $count) $(RIN/avg.avg time))",
print "RESULT-${PREFIX}PPS $(RIN/avg.add rate)",
{% endif %}
print "RESULT-${PREFIX}SENT $sent",
print "RESULT-${PREFIX}TX $(avgSIN.add link_rate)",
print "RESULT-${PREFIX}TXPPS $(avgSIN.add rate)",
print "RESULT-${PREFIX}PPS $(RIN/avg.add rate)",
print "EVENT GEN_POST",
stop);

Expand Down
2 changes: 1 addition & 1 deletion modules/fastclick-replay-single-mt.npf
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ elementclass Numberise { $magic |
}

elementclass NoNumberise { $magic |
input-> Strip(14) -> check :: CheckIPHeader(CHECKSUM false) -> Unstrip(14) -> output
input-> MarkIPHeader(OFFSET 14) -> output
}

fdIN
Expand Down

0 comments on commit c47f1ec

Please sign in to comment.