mbox series

[v3,0/3] Fix lack of XDP TX queues

Message ID 20210713142129.17077-1-ihuguet@redhat.com (mailing list archive)
Headers show
Series Fix lack of XDP TX queues | expand

Message

Íñigo Huguet July 13, 2021, 2:21 p.m. UTC
A change introduced in commit e26ca4b53582 ("sfc: reduce the number of
requested xdp ev queues") created a bug in XDP_TX and XDP_REDIRECT
because it unintentionally reduced the number of XDP TX queues, letting
not enough queues to have one per CPU, which leaded to errors if XDP
TX/REDIRECT was done from a high numbered CPU.

This patchs make the following changes:
- Fix the bug mentioned above
- Revert commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count with
  the real number of initialized queues") which intended to fix a related
  problem, created by mentioned bug, but it's no longer necessary
- Add a new error log message if there are not enough resources to make
  XDP_TX/REDIRECT work

V1 -> V2: keep the calculation of how many tx queues can handle a single
event queue, but apply the "max. tx queues per channel" upper limit.
V2 -> V3: WARN_ON if the number of initialized XDP TXQs differs from the
expected.

Íñigo Huguet (3):
  sfc: fix lack of XDP TX queues - error XDP TX failed (-22)
  sfc: ensure correct number of XDP queues
  sfc: add logs explaining XDP_TX/REDIRECT is not available

 drivers/net/ethernet/sfc/efx_channels.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

Comments

Edward Cree July 13, 2021, 2:41 p.m. UTC | #1
On 13/07/2021 15:21, Íñigo Huguet wrote:
> A change introduced in commit e26ca4b53582 ("sfc: reduce the number of
> requested xdp ev queues") created a bug in XDP_TX and XDP_REDIRECT
> because it unintentionally reduced the number of XDP TX queues, letting
> not enough queues to have one per CPU, which leaded to errors if XDP
> TX/REDIRECT was done from a high numbered CPU.
> 
> This patchs make the following changes:
> - Fix the bug mentioned above
> - Revert commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count with
>   the real number of initialized queues") which intended to fix a related
>   problem, created by mentioned bug, but it's no longer necessary
> - Add a new error log message if there are not enough resources to make
>   XDP_TX/REDIRECT work
> 
> V1 -> V2: keep the calculation of how many tx queues can handle a single
> event queue, but apply the "max. tx queues per channel" upper limit.
> V2 -> V3: WARN_ON if the number of initialized XDP TXQs differs from the
> expected.
> 
> Íñigo Huguet (3):
>   sfc: fix lack of XDP TX queues - error XDP TX failed (-22)
>   sfc: ensure correct number of XDP queues
>   sfc: add logs explaining XDP_TX/REDIRECT is not available
> 
>  drivers/net/ethernet/sfc/efx_channels.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 

For the series:
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
patchwork-bot+netdevbpf@kernel.org July 13, 2021, 8:10 p.m. UTC | #2
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue, 13 Jul 2021 16:21:26 +0200 you wrote:
> A change introduced in commit e26ca4b53582 ("sfc: reduce the number of
> requested xdp ev queues") created a bug in XDP_TX and XDP_REDIRECT
> because it unintentionally reduced the number of XDP TX queues, letting
> not enough queues to have one per CPU, which leaded to errors if XDP
> TX/REDIRECT was done from a high numbered CPU.
> 
> This patchs make the following changes:
> - Fix the bug mentioned above
> - Revert commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count with
>   the real number of initialized queues") which intended to fix a related
>   problem, created by mentioned bug, but it's no longer necessary
> - Add a new error log message if there are not enough resources to make
>   XDP_TX/REDIRECT work
> 
> [...]

Here is the summary with links:
  - [v3,1/3] sfc: fix lack of XDP TX queues - error XDP TX failed (-22)
    https://git.kernel.org/netdev/net/c/f28100cb9c96
  - [v3,2/3] sfc: ensure correct number of XDP queues
    https://git.kernel.org/netdev/net/c/788bc000d4c2
  - [v3,3/3] sfc: add logs explaining XDP_TX/REDIRECT is not available
    https://git.kernel.org/netdev/net/c/d2a16bde7732

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html