[Intel-wired-lan] [PATCH bpf v2 0/4] Fix concurrency issues between XSK wakeup and control path using RCU

Maxim Mikityanskiy maximmi at mellanox.com
Tue Dec 17 16:20:41 UTC 2019


This series addresses the issue described in the commit message of the
first patch: lack of synchronization between XSK wakeup and destroying
the resources used by XSK wakeup. The idea is similar to
napi_synchronize. The series contains fixes for the drivers that
implement XSK. I haven't tested the changes to Intel's drivers, so,
Intel guys, please review them.

v2 changes:

Incorporated changes suggested by Björn:

1. Call synchronize_rcu in Intel drivers only if the XDP program is
being unloaded.

2. Don't forget rcu_read_lock when wakeup is called from xsk_poll.

3. Use xs->zc as the condition to call ndo_xsk_wakeup.

Maxim Mikityanskiy (4):
  xsk: Add rcu_read_lock around the XSK wakeup
  net/mlx5e: Fix concurrency issues between config flow and XSK
  net/i40e: Fix concurrency issues between config flow and XSK
  net/ixgbe: Fix concurrency issues between config flow and XSK

 drivers/net/ethernet/intel/i40e/i40e.h        |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 10 ++++++---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c    |  4 ++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  7 +++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c  |  8 +++++--
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |  2 +-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.h  | 22 ++++++++-----------
 .../mellanox/mlx5/core/en/xsk/setup.c         |  1 +
 .../ethernet/mellanox/mlx5/core/en/xsk/tx.c   |  2 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 19 +---------------
 net/xdp/xsk.c                                 | 22 ++++++++++++-------
 11 files changed, 51 insertions(+), 48 deletions(-)

-- 
2.20.1



More information about the Intel-wired-lan mailing list