total_pkts = burst_size
s1 = STLStream(name = 'rx',
packet = pkt,
- flow_stats = STLRxStats(pg_id = 5),
+ flow_stats = STLFlowStats(pg_id = 5),
mode = STLTXSingleBurst(total_pkts = total_pkts, bps_L2 = 250000000))
# connect to server
STLStreamDstMAC_ARP =2
# RX stats class
-class STLRxStats(object):
+class STLFlowStats(object):
def __init__ (self, pg_id):
self.fields = {}
self.packet_desc = None
if not flow_stats:
- self.fields['flow_stats'] = STLRxStats.defaults()
+ self.fields['flow_stats'] = STLFlowStats.defaults()
else:
self.fields['flow_stats'] = flow_stats.to_json()
if default_STLStream.fields['isg'] != self.fields['isg']:
stream_params_list.append('isg = %s' % self.fields['isg'])
if default_STLStream.fields['flow_stats'] != self.fields['flow_stats']:
- stream_params_list.append('flow_stats = STLRxStats(%s)' % self.fields['flow_stats']['stream_id'])
+ stream_params_list.append('flow_stats = STLFlowStats(%s)' % self.fields['flow_stats']['stream_id'])
if default_STLStream.next != self.next:
stream_params_list.append('next = %s' % STLStream.__add_quotes(self.next))
if default_STLStream.id != self.id:
if pg_id == None:
raise STLError("enabled RX stats section must contain 'stream_id' field")
- return STLRxStats(pg_id = pg_id)
+ return STLFlowStats(pg_id = pg_id)
def __parse_stream (self, yaml_object):
def get_streams (self, direction = 0):
return [STLStream(packet = STLPktBuilder(pkt ="stl/yaml/udp_64B_no_crc.pcap"), # path relative to pwd
-# mode = STLTXCont(pps=10),
- mode = STLTXSingleBurst(pps=1000, total_pkts=100000),
- flow_stats = STLRxStats(pg_id = 7))
+ mode = STLTXCont(pps=10),
+ flow_stats = STLFlowStats(pg_id = 7))
]