Merge branch 'mlx5-next'
authorDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2016 04:21:51 +0000 (21:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2016 04:21:51 +0000 (21:21 -0700)
commit55fdbb01b19fbc16e633ae4f5bc3d61f18dce897
treeeb402961d33d629479e50266cc5cae873059d1a9
parent48b4e51fa7ede17830a2655ed6edde2c738c4461
parentf1ee87fe55c86d4c5adc804db15b3ed06169fba5
Merge branch 'mlx5-next'

Saeed Mahameed says:

====================
Mellanox 100G mlx5 seamless error recovery

This series from Mohamad improves the driver load/unload flows
to seamlessly handle pci errors and device internal errors recovery
reset flows.

Current pci and internal error handling is too heavy and is done
with a full restart of the driver by unregistering mlx5 interfaces
(mlx5e netedevs and mlx5_ib) which will cause losing all the current
interfaces and mlx5 core configurations.

To improve this, we add new callback functions of mlx5 interface
object (attach/detach) to be called upon reset flows when errors are
detected rather than calling register and unregister interfaces.

On their side, interfaces such as (mlx5e and mlx5_ib) can choose to implement
those callback, if not, the old heavy reset will be called for that interface.

For non-interface mlx5 modules such as sriov and eswitch, we refactored
and reorganized the code in a way that the software state objects are created
only once on driver load.  Those software state objects are kept upon reset recovery
flows and only freed once on driver unload. On seamless soft reset flows, only
hardware resources are released on stop and re-allocated on start according to the
current soft state.

In this series only mlx5e interface implements attach/detach callbacks
so that the netdevice will be kept alive on reset. On detach only hardware resources
are released and the netdevice will be marked as detached to the stack. Once
attached again it will re-allocate the hardware resources according to the current
netdevice state, and all the configurations and the software state will be kept or restored
after recovery.

Note: I will be out of office all next week, in case of any updates
or V2 is required, Tariq will post the new series, I hope it is ok.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>