On Tue, Sep 10, 2024 at 9:12 PM Magnus Karlsson <magnus.karlsson@xxxxxxxxx> wrote: > > On Tue, 10 Sept 2024 at 16:20, Srivats P <pstavirs@xxxxxxxxx> wrote: > > > > > For AF_XDP (in ZC or copy mode), the IRQ-CPU affinity plays a role in > > > the RX direction to bind a CPU core to a particular NIC queue (mapping > > > the CPU core to the NIC queue's IRQ). > > > > > > My question is does the IRQ or IRQ-CPU affinity play any role in the > > > TX direction? > > > > > > An xsk is specific to a NIC queue and assuming there is only one core > > > doing TX on that xsk, is there some IRQ/CPU configuration recommended > > > for better performance? > > > > > > Does the recommendation change if busy-polling mode is used or not > > > used? ZC or non-ZC? > > > > Any advice or recommendation about IRQ-CPU affinity or usage for AF_XDP TX path? > > For copy-mode, the majority of work is done in process context and > just a minority of the work is performed in the interrupt routine. > This is also true for zero-copy mode with busy-poll. In zero-copy mode > without busy-poll however, it is the opposite. So irq affinity mainly > matters in zero-copy mode without busy-poll. Thank you Magnus - this is very useful information to know to tune the application and system for high performance. One follow up question - the busy-poll mode is an infra thing or is there some driver specific work required to get the benefit of a single core being used? On an i40e I do see "xdpsock -t -B" using a single core, but on a mlx5 I still see "xdpcore -t -B" using 2 cores - one for the app userspace and another for SoftIRQ. Srivats Srivats