From: Greg Kroah-Hartman Date: Sun, 28 May 2023 17:17:45 +0000 (+0100) Subject: drop queue-5.4/net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch X-Git-Tag: review~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=113a8fbe9f5c218a52e0c7a0a41b3176bbf9cbbd;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.4/net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch --- diff --git a/queue-5.4/net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch b/queue-5.4/net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch deleted file mode 100644 index 5c6a735ded7..00000000000 --- a/queue-5.4/net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch +++ /dev/null @@ -1,78 +0,0 @@ -From afbed3f74830163f9559579dee382cac3cff82da Mon Sep 17 00:00:00 2001 -From: Jakub Kicinski -Date: Tue, 16 May 2023 18:59:35 -0700 -Subject: net/mlx5e: do as little as possible in napi poll when budget is 0 - -From: Jakub Kicinski - -commit afbed3f74830163f9559579dee382cac3cff82da upstream. - -NAPI gets called with budget of 0 from netpoll, which has interrupts -disabled. We should try to free some space on Tx rings and nothing -else. - -Specifically do not try to handle XDP TX or try to refill Rx buffers - -we can't use the page pool from IRQ context. Don't check if IRQs moved, -either, that makes no sense in netpoll. Netpoll calls _all_ the rings -from whatever CPU it happens to be invoked on. - -In general do as little as possible, the work quickly adds up when -there's tens of rings to poll. - -The immediate stack trace I was seeing is: - - __do_softirq+0xd1/0x2c0 - __local_bh_enable_ip+0xc7/0x120 - - - page_pool_put_defragged_page+0x267/0x320 - mlx5e_free_xdpsq_desc+0x99/0xd0 - mlx5e_poll_xdpsq_cq+0x138/0x3b0 - mlx5e_napi_poll+0xc3/0x8b0 - netpoll_poll_dev+0xce/0x150 - -AFAIU page pool takes a BH lock, releases it and since BH is now -enabled tries to run softirqs. - -Reviewed-by: Tariq Toukan -Fixes: 60bbf7eeef10 ("mlx5: use page_pool for xdp_return_frame call") -Signed-off-by: Jakub Kicinski -Reviewed-by: Simon Horman -Signed-off-by: David S. Miller -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - ---- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c -+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c -@@ -126,20 +126,22 @@ int mlx5e_napi_poll(struct napi_struct * - for (i = 0; i < c->num_tc; i++) - busy |= mlx5e_poll_tx_cq(&c->sq[i].cq, budget); - -+ /* budget=0 means we may be in IRQ context, do as little as possible */ -+ if (unlikely(!budget)) -+ goto out; -+ - busy |= mlx5e_poll_xdpsq_cq(&c->xdpsq.cq); - - if (c->xdp) - busy |= mlx5e_poll_xdpsq_cq(&c->rq_xdpsq.cq); - -- if (likely(budget)) { /* budget=0 means: don't poll rx rings */ -- if (xsk_open) -- work_done = mlx5e_poll_rx_cq(&xskrq->cq, budget); -+ if (xsk_open) -+ work_done = mlx5e_poll_rx_cq(&xskrq->cq, budget); - -- if (likely(budget - work_done)) -- work_done += mlx5e_poll_rx_cq(&rq->cq, budget - work_done); -+ if (likely(budget - work_done)) -+ work_done += mlx5e_poll_rx_cq(&rq->cq, budget - work_done); - -- busy |= work_done == budget; -- } -+ busy |= work_done == budget; - - mlx5e_poll_ico_cq(&c->icosq.cq); - diff --git a/queue-5.4/series b/queue-5.4/series index cd633521b88..653a4837b70 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -156,7 +156,6 @@ xen-pvcalls-back-fix-double-frees-with-pvcalls_new_active_socket.patch x86-show_trace_log_lvl-ensure-stack-pointer-is-aligned-again.patch asoc-intel-skylake-fix-declaration-of-enum-skl_ch_cfg.patch forcedeth-fix-an-error-handling-path-in-nv_probe.patch -net-mlx5e-do-as-little-as-possible-in-napi-poll-when-budget-is-0.patch net-mlx5-fix-error-message-when-failing-to-allocate-device-memory.patch net-mlx5-devcom-fix-error-flow-in-mlx5_devcom_register_device.patch 3c589_cs-fix-an-error-handling-path-in-tc589_probe.patch