Re: IRQ-CPU affinity for AF_XDP TX?

Magnus Karlsson <[email protected]> Tue, 10 Sep 2024 17:41:57 +0200
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CAJ8uoz06f26q8YvgN8X9yHen1OeOuWKqBc4=fxEgRvFT_p6-5w@mail.gmail.com>
On Tue, 10 Sept 2024 at 16:20, Srivats P <[email protected]> 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.

> Srivats
>