[PATCH v2 3/8] mbuf: fix Tx checksum offload examples
Morten Brørup
mb at smartsharesystems.com
Fri Apr 5 18:20:08 CEST 2024
> From: David Marchand [mailto:david.marchand at redhat.com]
> Sent: Friday, 5 April 2024 16.46
>
> Mandate use of rte_eth_tx_prepare() in the mbuf Tx checksum offload
> examples.
I strongly disagree with this change!
It will cause a huge performance degradation for shaping applications:
A packet will be processed and finalized at an output or forwarding pipeline stage, where some other fields might also be written, so zeroing e.g. the out_ip checksum at this stage has low cost (no new cache misses).
Then, the packet might be queued for QoS or similar.
If rte_eth_tx_prepare() must be called at the egress pipeline stage, it has to write to the packet and cause a cache miss per packet, instead of simply passing on the packet to the NIC hardware.
It must be possible to finalize the packet at the output/forwarding pipeline stage!
Also, how is rte_eth_tx_prepare() supposed to work for cloned packets egressing on different NIC hardware?
In theory, it might get even worse if we make this opaque instead of transparent and standardized:
One PMD might reset out_ip checksum to 0x0000, and another PMD might reset it to 0xFFFF.
I can only see one solution:
We need to standardize on common minimum requirements for how to prepare packets for each TX offload.
More information about the stable
mailing list