XDP-REDIRECT cpu affinity
Sanjay Rao <[email protected]> Thu, 4 May 2023 23:58:36 +0530
| Newsgroups | org.kernel.vger.xdp-newbies |
|---|---|
| Message-ID | <CA+t96KBZiDLde7WvG9R95ENg8r0iQUVofe5jRWDpQmx+SnbabQ@mail.gmail.com> |
I am looking at the implementation of ndo_xdp_xmit() in
mlx5/core/en/xdp.c (most other drivers also have similar
implementations). This function is called for XDP-REDIRECT.
int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame
**frames, u32 flags)
{
------
------
sq_num = smp_processor_id();
if (unlikely(sq_num >= priv->channels.num))
return -ENXIO;
--------
}
Doesn't this restrict all ports to be bound to the same CPUs via
smp_affinity? In my setup, one port has CPUs 1-63 and the other has
65-127 for a 63 queue configuration. XDP_REDIRECT will fail because
65-127 will exceed the channel count. Is that by design, or am I
missing something? We can find a similar implementation for the i40e
driver as well.
Regards,
Sanjay