Re: Dropped packets mapping IRQs for adjusted queue counts on i40e

Zvi Effron <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CAC1LvL1Kd-TCuPk0BEQyGvEiLzgUqkZHOKQNOUnxXSY6NjFMmw@mail.gmail.com>
On Tue, May 4, 2021 at 4:07 PM Zvi Effron <[email protected]> wrote:
> I'm suspecting it's something with how XDP_REDIRECT is implemented in
> the i40e driver, but I don't know if this is a) cross driver behavior,
> b) expected behavior, or c) a bug.
I think I've found the issue, and it appears to be specific to i40e
(and maybe other drivers, too, but not XDP itself).

When performing the XDP xmit, i40e uses the smp_processor_id() to
select the tx queue (see
https://elixir.bootlin.com/linux/v5.12.1/source/drivers/net/ethernet/intel/i40e/i40e_txrx.c#L3846).
I'm not 100% clear on how the CPU is selected (since we don't use
cores 0 and 1), we end up on a core whose id is higher than any
available queue.

I'm going to try to modify our IRQ mappings to test this.

If I'm correct, this feels like a bug to me, since it requires a user
to understand low level driver details to do IRQ remapping, which is a
bit higher level. But if it's intended, we'll just have to figure out
how to work around this. (Unfortunately, using split tx and rx queues
is not possible with i40e, so that easy solution is unavailable.)

--Zvi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.