summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
diff options
context:
space:
mode:
authorDavid S. Miller2017-03-28 06:16:03 +0200
committerDavid S. Miller2017-03-28 06:16:03 +0200
commitcc628c9680c212d9dbf68785fbf5d454ccb2313e (patch)
tree9e922614838252737b904f7a3f000dd10ce55f57 /drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
parentMerge branch 'bond-link-status-fixes' (diff)
parentnet/mlx5e: Fail safe mtu and lro setting (diff)
downloadkernel-qcow2-linux-cc628c9680c212d9dbf68785fbf5d454ccb2313e.tar.gz
kernel-qcow2-linux-cc628c9680c212d9dbf68785fbf5d454ccb2313e.tar.xz
kernel-qcow2-linux-cc628c9680c212d9dbf68785fbf5d454ccb2313e.zip
Merge tag 'mlx5e-failsafe' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
Saeed Mahameed says: ==================== mlx5e-failsafe 27-03-2017 This series provides a fail-safe mechanism to allow safely re-configuring mlx5e netdevice and provides a resiliency against sporadic configuration failures. To enable this we do some refactoring and code reorganizing to allow breaking the drivers open/close flows to stages: open -> activate -> deactivate -> close. In addition we need to allow creating fresh HW ring resources (mlx5e_channels) with their own "new" set of parameters, while keeping the current ones running and active until the new channels are successfully created with the new configuration, and only then we can safly replace (switch) old channels with new ones. For that we introduce mlx5e_channels object and an API to manage it: - channels = open_channels(new_params): open fresh TX/RX channels - activate_channels(channels): redirect traffic to them and attach them to the netdev - deactivate_channes(channels) stop traffic and detach from netdev - close(channels) Free the TX/RX HW resources of those channels With the above strategy it is straightforward to achieve the desired behavior of fail-safe configuration. In pseudo code: make_new_config(new_params) { old_channels = current_active_channels; new_channels = create_channels(new_params); if (!new_channels) return "Failed, but current channels are still active :)" deactivate_channels(old_channels); /* Can't fail */ set_hw_new_state(); /* If needed */ activate_channels(new_channels); /* Can't fail */ close_channels(old_channels); current_active_channels = new_channels; return "SUCCESS"; } At the top of this series, we change the following flows to be fail-safe: ethtool: - ring parameters - coalesce parameters - tx copy break parameters - cqe compressing/moderation mode setting (priv flags) ndos: - tc setup - set features: LRO - change mtu ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_tc.c')
0 files changed, 0 insertions, 0 deletions