blob: 494467e4823d24ca12436d91a6e5dab00d83fa17 [file] [log] [blame]
From 3a3f18d28745758998e29a193e3ac9cca1c3238c Mon Sep 17 00:00:00 2001
From: Maciej Fijalkowski <>
Date: Wed, 5 Feb 2020 05:58:32 +0100
Subject: [PATCH] i40e: Relax i40e_xsk_wakeup's return value when PF is busy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit c77e9f09143822623dd71a0fdc84331129e97c3a upstream.
Return -EAGAIN instead of -ENETDOWN to provide a slightly milder
information to user space so that an application will know to retry the
syscall when __I40E_CONFIG_BUSY bit is set on pf->state.
Fixes: b3873a5be757 ("net/i40e: Fix concurrency issues between config flow and XSK")
Signed-off-by: Maciej Fijalkowski <>
Signed-off-by: Daniel Borkmann <>
Acked-by: Björn Töpel <>
[PG: note async_xmit ---> wakeup rename in mainline 9116e5e2b1ff.]
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index 30e731272df4..71ad5c93048d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -776,7 +776,7 @@ int i40e_xsk_async_xmit(struct net_device *dev, u32 queue_id)
struct i40e_ring *ring;
if (test_bit(__I40E_CONFIG_BUSY, pf->state))
- return -ENETDOWN;
+ return -EAGAIN;
if (test_bit(__I40E_VSI_DOWN, vsi->state))
return -ENETDOWN;