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

Method create_packet_info

test/framework.py:321–345  ·  view source on GitHub ↗

Create packet info object containing the source and destination indexes and add it to the testcase's packet info list :param VppInterface src_if: source interface :param VppInterface dst_if: destination interface :returns: _PacketInfo object

(cls, src_if, dst_if)

Source from the content-addressed store, hash-verified

319
320 @classmethod
321 def create_packet_info(cls, src_if, dst_if):
322 """
323 Create packet info object containing the source and destination indexes
324 and add it to the testcase's packet info list
325
326 :param VppInterface src_if: source interface
327 :param VppInterface dst_if: destination interface
328
329 :returns: _PacketInfo object
330
331 """
332 info = _PacketInfo()
333 info.index = len(cls._packet_infos)
334 info.src = src_if.sw_if_index
335 info.dst = dst_if.sw_if_index
336 if isinstance(dst_if, VppSubInterface):
337 dst_idx = dst_if.parent.sw_if_index
338 else:
339 dst_idx = dst_if.sw_if_index
340 if dst_idx in cls._packet_count_for_dst_if_idx:
341 cls._packet_count_for_dst_if_idx[dst_idx] += 1
342 else:
343 cls._packet_count_for_dst_if_idx[dst_idx] = 1
344 cls._packet_infos[info.index] = info
345 return info
346
347 @staticmethod
348 def info_to_payload(info):

Callers 15

create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamFunction · 0.80
create_streamMethod · 0.80
create_stream_ip4Method · 0.80
create_stream_ip6Method · 0.80

Calls 1

_PacketInfoClass · 0.85

Tested by 15

create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamFunction · 0.64
create_streamMethod · 0.64
create_stream_ip4Method · 0.64
create_stream_ip6Method · 0.64