Bug Summary
In VPP 19.01 and later versions, the TX counter of loopback interface is double-counted, showing 2x the actual number of sent packets.
Root Cause
The loopback interface's forwarding path increments the TX counter twice for a single packet:
- First count: All interfaces (including loopback) pass through the universal
interface-output node , where vlib_increment_combined_counter is called to increment the TX counter once.
- Second count: After
interface-output, the loopback packet enters the simulated_ethernet_interface_tx, which calls vlib_increment_combined_counter again to increment the TX counter a second time。
Bug Summary
In VPP 19.01 and later versions, the TX counter of loopback interface is double-counted, showing 2x the actual number of sent packets.
Root Cause
The loopback interface's forwarding path increments the TX counter twice for a single packet:
interface-outputnode , wherevlib_increment_combined_counteris called to increment the TX counter once.interface-output, the loopback packet enters the simulated_ethernet_interface_tx, which callsvlib_increment_combined_counteragain to increment the TX counter a second time。