> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Bruce Richardson > Sent: Wednesday, 23 June 2021 11.41 > > [Also, you are not likely to want to offload a small > copy, are you?]
Maybe. I would consider it for two reasons: 1. To avoid CPU cache pollution. E.g. copy packet data (or part of it) to memory that is not going to be used any time soon, such as a packet capture buffer. When a packet has been DPI analyzed at ingress and put in a QoS queue for holding, the packet data will be cold at the time of egress. If such a packet is to be captured at egress, the CPU is not going to touch the data in the original packet anymore (only the TX NIC will). And if the copy of the packet is queued to be processed by a "capture storage readout" pipeline stage, the CPU core that copied the packet will not touch the copy either (only the CPU core in the "capture storage readout" pipeline stage will; but that may be minutes or hours later). 2. To simplify code by using the same method, regardless of size. Although it might be more efficient copying 64 B packets using CPU instructions and 1518 B packets using DMA, writing code that only uses one of the methods might simplify things. -Morten