Send one packet and request offloads
Evaluate transmit operation correctness by sending one packet
Learn about protocol types from the traffic template
Initialize the Ethernet device to get its capabilities
Attempt to configure tunnel UDP port number in the PMD
If
vlan >= 0:Enable VLAN offload in the PMD
If
outer_ip_cksum:Enable outer IP checksum offload in the PMD
If
outer_udp_cksum:Enable outer UDP checksum offload in the PMD
If
innermost_ip_cksum:If not
tso != 0 && ol_ipv4_cs_capa == 0:Enable innermost IP checksum offload in the PMD
If
innermost_l4_cksum:Enable innermost L4 checksum offload in the PMD
If
tso != 0:Depending on
tmpl_protocols[TAPI_NDN_TUNNEL]:Enable non-tunnel TSO in the PMD
Enable VXLAN TSO in the PMD
Enable Geneve TSO in the PMD
If
segmentation.nb_seg_groups > 0:Enable multi-seg mbuf support in the PMD
Configure the Ethernet device
Setup the Ethernet device Rx queues
Cook the traffic template
Generate and customise a packet mbuf
If
vlan >= 0:Add VLAN offload request to the mbuf
If
outer_ip_cksum && tmpl_protocols[TAPI_NDN_OUTER_L3] == TE_PROTO_IP4:Add outer IP checksum offload request to the mbuf
If
outer_udp_cksum && tmpl_protocols[TAPI_NDN_OUTER_L4] == TE_PROTO_UDP:Add outer UDP checksum offload request to the mbuf
If
innermost_ip_cksum && tmpl_protocols[TAPI_NDN_INNER_L3] == TE_PROTO_IP4:Add innermost IP checksum offload request to the mbuf
If
innermost_l4_cksum && tmpl_protocols[TAPI_NDN_INNER_L4] == TE_PROTO_TCP:Add TCP checksum offload request to the mbuf
If
innermost_l4_cksum && tmpl_protocols[TAPI_NDN_INNER_L4] == TE_PROTO_UDP:Add innermost UDP checksum offload request to the mbuf
If
tso != 0:Add TSO request to the mbuf
Clone the mbuf from IUT RPCS to TST RPCS
If
segmentation.nb_seg_groups > 0:Redistribute the packet data across multiple mbuf segments
Evaluate TxQ ring size
If
tso != 0:Override the number of descriptors by the maximum supported value since the NIC may need additional descriptor room for TSO transaction while being unable to report this in limits
Setup the Ethernet device Tx queues
Start the Ethernet device and wait for link up
Check mbuf segmentation vs limits
Sanity check the packet mbuf with Tx prepare API
Derive the maximum packet length and the number of packets to be seen on Rx side
If
m_rx_size_max > ETHER_HDR_LEN + ETHER_DATA_LEN:Enlarge MTU on both ends
Deploy RTE af_packet on top of TST network interface
Ensure that interface is UP on Tester side
Squeeze out garbage packets possibly captured by RTE af_packet
Send the packet
Receive the packet(s)
Match Rx packet(s) and figure out what offloads took place
Ivan Malov Ivan.Malov@oktetlabs.ru
Parameters:
segmentation |
Mbuf segmentation pattern or an empty line |
innermost_ip_cksum |
Innermost IP checksum offload toggle |
innermost_l4_cksum |
Innermost L4 checksum offload toggle |
outer_udp_cksum |
Outer UDP checksum offload toggle |
outer_ip_cksum |
Outer IP checksum offload toggle |
tmpl |
Traffic template |
pld_size |
Payload size |
vlan |
VLAN offload: VLAN ID (ON) or |
tso |
TSO: segment size (ON) or |