]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: last resort fallback for lack of xdp tx queues
authorÍñigo Huguet <ihuguet@redhat.com>
Thu, 9 Sep 2021 09:28:46 +0000 (11:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Sep 2021 10:17:37 +0000 (11:17 +0100)
commitc979c71ad24db3fc66ecbd966dbbb70e99590753
tree431f8e5d54c7145882a05f1819e238209088a79b
parente4cf5c4035876f13cc01bcd525d33a55db10d138
sfc: last resort fallback for lack of xdp tx queues

Previous patch addressed the situation of having some free resources for
xdp tx but not enough for one tx queue per CPU. This patch address the
worst case of not having resources at all for xdp tx.

Instead of using queues dedicated to xdp, normal queues used by network
stack are shared for both cases, using __netif_tx_lock for
synchronization. Also queue stop/restart must be considered in the xdp
path to avoid freezing the queue.

This is not the ideal situation we might want to be, and a performance
penalty is expected both for normal and xdp traffic, but at least XDP
will work in all possible situations (with a warning in the logs),
improving a bit the pain of not knowing in what situations we can use it
and in what situations we cannot.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/tx.c