]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'sfc-tx-queues'
authorDavid S. Miller <davem@davemloft.net>
Tue, 13 Jul 2021 17:02:41 +0000 (10:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jul 2021 17:02:41 +0000 (10:02 -0700)
commitc105661b6a70902ae8a24203c7cf9908968a0093
tree419aea1d7f617070210309d4e9b417c885d68c1a
parent64588446a18b13e89a9b7b16762204b0538c2418
parent19ff1dd8452bfdf9af82889567b1aa79b1a600af
Merge branch 'sfc-tx-queues'

Íñigo Huguet says:

====================
sfc: Fix lack of XDP TX queues

A change introduced in commit 22f4acfb1b58 ("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 783d3dbb4f4c ("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.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>