aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2020-02-05 05:58:32 +0100
committerPaul Gortmaker <paul.gortmaker@windriver.com>2020-03-20 23:11:50 -0400
commitf2967ee45f0d068b3a80d685fc055a5440571824 (patch)
tree2f5e3e776d91f62a285a46f0d48171f6b3dd85fa
parentb944998f1f0a842855cfe91251e63e275c8bf703 (diff)
downloadlinux-yocto-f2967ee45f0d068b3a80d685fc055a5440571824.tar.gz
linux-yocto-f2967ee45f0d068b3a80d685fc055a5440571824.tar.bz2
linux-yocto-f2967ee45f0d068b3a80d685fc055a5440571824.zip
i40e: Relax i40e_xsk_wakeup's return value when PF is busy
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 <maciej.fijalkowski@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Björn Töpel <bjorn.topel@intel.com> Link: https://lore.kernel.org/bpf/20200205045834.56795-2-maciej.fijalkowski@intel.com [PG: note async_xmit ---> wakeup rename in mainline 9116e5e2b1ff.] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_xsk.c2
1 files changed, 1 insertions, 1 deletions
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;