MCPcopy Create free account
hub / github.com/FDio/vpp / add_stream

Method add_stream

test/vpp_pg_interface.py:248–262  ·  view source on GitHub ↗

Add a stream of packets to this packet-generator :param pkts: iterable packets

(self, pkts, nb_replays=None, worker=None)

Source from the content-addressed store, hash-verified

246 self.test.vapi.pg_interface_enable_disable_coalesce(self.sw_if_index, 0)
247
248 def add_stream(self, pkts, nb_replays=None, worker=None):
249 """
250 Add a stream of packets to this packet-generator
251
252 :param pkts: iterable packets
253
254 """
255 in_pcap = self.get_in_path(worker)
256 if os.path.isfile(in_pcap):
257 self.remove_old_pcap_file(in_pcap)
258 wrpcap(in_pcap, pkts)
259 self.test.register_pcap(self, worker)
260 # FIXME this should be an API, but no such exists atm
261 self.test.vapi.cli(self.get_input_cli(nb_replays, worker))
262 self.link_pcap_file(self.get_in_path(worker), "inp", self.in_history_counter)
263
264 def generate_debug_aid(self, kind):
265 """Create a hardlink to the out file with a counter and a file

Callers 15

run_verify_testMethod · 0.45
sendMethod · 0.45
test_srv6_usid_srhMethod · 0.45
test_srv6_usidMethod · 0.45
test_srv6_usid_flexMethod · 0.45

Calls 6

get_in_pathMethod · 0.95
remove_old_pcap_fileMethod · 0.95
get_input_cliMethod · 0.95
link_pcap_fileMethod · 0.95
register_pcapMethod · 0.80
cliMethod · 0.45

Tested by 15

run_verify_testMethod · 0.36
sendMethod · 0.36
test_srv6_usid_srhMethod · 0.36
test_srv6_usidMethod · 0.36
test_srv6_usid_flexMethod · 0.36