...sorry for coming around yet again, but we're currently running in a no-good situation during our FW testings. The vendor showed us that some packets generated by TRex have a bad UDP checksum and thus, are dropped by the FW. After a long troubleshooting session, it turned out, that only the packets of the streams configured with STLFlowLatencyStats are showing the problem. When I changed to STLFlowStats for the streams, packets seem to be alright...
This is quite an urgent issue for us currently, so it would be great to get an answer to this rather soon. Is there anything we might have missed when configuring flowlatencystats (or is there anything different to stlflowstats)?
Code is pretty straightforward:
for stream_id in range(1,(latency_streams + 1)):
p = base_pkt/UDP(sport=20000, dport=(20000+stream_id))/("X" * 30)
packets.append(STLStream(packet = STLPktBuilder(pkt = p), mode = STLTXCont(pps=1000),
flow_stats = STLFlowLatencyStats(pg_id = ((port+1) + (direction*10) + (stream_id*100) ))))
...where
- latency_streams is typically "1"
- base_pkt is s.th. like:
base_pkt = Ether()/IP(src="172.28.0.1",dst="172.30.0.1")
Thanks in advance,
Andreas
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/d17805f1-84f2-44c7-818f-ce6613c7cfee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Yaroslav,
…thanks for your very fast response! Zeroing the UDP checksum helped! I thought I tried that yesterday already, but I must have been doing s.th. wrong.
BTW – stlvmixchecksumhw didn’t help im my case ?!
Regards,
Andreas
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/d17805f1-84f2-44c7-818f-ce6613c7cfee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/004101d41802%24089e72b0%2419db5810%24%40googlemail.com.
..turns out that IPv6 has mandatory UDP checksum, so I tried to implement your suggested change:
# vm
vm = STLScVmRaw( [
STLVmFixChecksumHw(l3_offset = "IP",
l4_offset = "UDP",
l4_type = CTRexVmInsFixHwCs.L4_TYPE_UDP )# hint, TRex can know that
]
)
...and for each packet/stream I generate, I supply vm:
packets.append(STLStream(
packet = STLPktBuilder(pkt = full_pkt, vm=vm),
mode = STLTXCont(pps=pps),
flow_stats = STLFlowLatencyStats(pg_id = (direction * 10) + port + 1 )
))
But unfortunately the simulator is aborting, since I don't have any tuple generator or similar:
labadmin@dest515x-lbtrex01:~/TREX$ ./stl-sim -f profiles/PERF04/bidir-fix-checksum.py -m 1 -tpacket_len=64,stream_count=200 -d 10 -o /tmp/stl-cs-fix.pcap
executing command: '/home/labadmin/TREX/bp-sim-64-debug --pcap --sl --cores 1 --limit 5000 -f /tmp/tmptDWOq4 -o /tmp/stl-cs-fix.pcap'
*** test failed ***
failed with:
{
"code" : -32000,
"message" : "Failed To Execute Method",
"specific_err" : "*** error: It is not valid to have a VM program without a variable or tuple generator "
}
******
Exception stack (most recent call last):
#3 trex_stl_sim.py:634 - 'tunables = options.tunables)'
#2 trex_stl_sim.py:227 - 'self.__run(cmds_json)'
#1 trex_stl_sim.py:243 - 'self.execute_bp_sim(f.name)'
#0 trex_stl_sim.py:294 - 'raise STLError('simulation has failed with error code {0}'.format(rc))'
Summary error message:
simulation has failed with error code 255
Do I need to implement a tuple generator here?
Thanks,
Andreas
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/19f24630-bcf5-4aed-b2b9-da17bde393be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am using virtio driver in VM, and guess it does not support hardware offload.
I tried the STLVmFixChecksumHw with the virtio but it does not correctly replace checksum. It modifies checksum but to the same value for every packet also noticed that the UDP length field incorrectly steps with one for every packet sent.
Uning trex version 2.39. With below code
vm = STLScVmRaw( [ STLVmFlowVar ( "dst_port"),
STLVmWrFlowVar (fv_name="dst_port",
pkt_offset= 56 ), # write port to packet UDP.sport
STLVmFixChecksumHw(l3_offset = 14,
l4_offset = 14+40,
l4_type = CTRexVmInsFixHwCs.L4_TYPE_UDP )# hint, TRex can know that
]
)
pkt1 = STLPktBuilder(pkt = Ether()/IPv6(src=ipv6_port_0,dst=ipv6_port_1)/UDP(dport=12,sport=1001,chksum=0x0000)/pad,vm=vm)
Thanks/Hakan
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/2aaa5723-ce18-4da7-8fcf-efa669e15f80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/bc17d281-1954-4e2b-9e57-16a4ba64a444%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.