cisco-system-traffic-generator/trex-core

jitter got 0 sometimes

zzsuki opened this issue · 2 comments

Question

  1. my stream is created by this Class
class StreamUtil:
    UDP_HEADER_SIZE = 42

    def create_latency_stream(self, src_ip, dst_ip, src_port, dst_port, payload, pg_id=1024):
        return STLStream(
            packet=STLPktBuilder(
                pkt=Ether() / IP(src=src_ip, dst=dst_ip) / UDP(sport=src_port, dport=dst_port) / payload
            ),
            mode=STLTXCont(pps=1000),
            flow_stats=STLFlowLatencyStats(pg_id=pg_id)
        )

    def calculate_udp_payload(self, size):
        # eth:6(dst mac) + 6(src mac) + 2(type)
        # ip: 4(src ip) + 4(dst ip) + 12(other arguments)
        # udp: 2(src port) + 2(dst port) + 4(length + checksum) + payload
        # total non data part = 14 + 20 + 8 = 42
        # so payload should be `packet_size - 42`
        return size - self.UDP_HEADER_SIZE
  1. When I run script based on this and useget_pgid_stats to get jitter 20times every 20s, it gets some 0 record (sometime even all records return 0) . I'm not sure if this is caused by calculating precision?

  2. I have some confusion about STLTXCont(pps=1000) which number is proper for pps, I read from official docs and realized it shouldn't increase too big; when i test this without DUT(connect two PORTS directly by cable)it still has almost 200us latency. Is latency has some relationship with this pps?

hhaim commented

please use our mailers to questions