linux_dsm_epyc7002/include/linux/mlx5
Erez Shitrit 97834eba7c net/mlx5: Delay events till ib registration ends
When mlx5_ib registers itself to mlx5_core as an interface, it will
call mlx5_add_device which will call mlx5_ib interface add callback,
in case the latter successfully returns, only then mlx5_core will add
it to the interface list and async events will be forwarded to mlx5_ib.
Between mlx5_ib interface add callback and mlx5_core adding the mlx5_ib
interface to its devices list, arriving mlx5_core events can be missed
by the new mlx5_ib registering interface.

In other words:
thread 1: mlx5_ib: mlx5_register_interface(dev)
thread 1: mlx5_core: mlx5_add_device(dev)
thread 1: mlx5_core: ctx = dev->add => (mlx5_ib)->mlx5_ib_add
thread 2: mlx5_core_event: **new event arrives, forward to dev_list
thread 1: mlx5_core: add_ctx_to_dev_list(ctx)
/* previous event was missed by the new interface.*/
It is ok to miss events before dev->add (mlx5_ib)->mlx5_ib_add_device
but not after.

We fix this race by accumulating the events that come between the
ib_register_device (inside mlx5_add_device->(dev->add)) till the adding
to the list completes and fire them to the new registering interface
after that.

Fixes: f1ee87fe55 ("net/mlx5: Organize device list API in one place")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2017-08-07 10:47:07 +03:00
..
cmd.h
cq.h IB/mlx5: Support 4k UAR for libmlx5 2017-01-09 20:25:09 +02:00
device.h net/mlx5: FPGA, Add SBU infrastructure 2017-06-27 16:36:47 +03:00
doorbell.h IB/mlx5: Use blue flame register allocator in mlx5_ib 2017-01-09 20:25:08 +02:00
driver.h net/mlx5: Delay events till ib registration ends 2017-08-07 10:47:07 +03:00
fs.h net/mlx5: Use underlay QPN from the root name space 2017-05-14 13:33:45 +03:00
mlx5_ifc_fpga.h net/mlx5: Accel, Add IPSec acceleration interface 2017-06-27 16:36:47 +03:00
mlx5_ifc.h net/mlx5e: Add field select to MTPPS register 2017-07-27 16:40:17 +03:00
port.h net/mlx5e: Add support for reading connector type from PTYS 2017-06-08 14:12:00 +03:00
qp.h net/mlx5e: IPSec, Innova IPSec offload infrastructure 2017-06-27 16:36:47 +03:00
srq.h net/mlx5: Ensure SRQ physical address structure endianness 2016-10-30 15:43:10 +02:00
transobj.h
vport.h net/mlx5: Push min-inline mode resolution helper into the core 2017-01-24 21:14:05 +02:00