diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-03-19 18:32:37 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-04-23 12:09:21 -0700 |
commit | 74bbaebf3c69eb2f92ac8f703399598a5feed316 (patch) | |
tree | 7ab96d9cbd03e70c82aec4c86ca6f4b28ad0062b | |
parent | 83b2fd64bac36c2fdf25eb5d87e2455408ead1fb (diff) |
net/mlx5e: Report mlx5e_xdp_set errors
If the channels fail to reopen after setting an XDP program, return the
error code instead of 0. A proper fix is still needed, as now any error
while reopening the channels brings the interface down. This patch only
adds error reporting.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 8185773a7bed..a3397d5bfa76 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4313,7 +4313,7 @@ static int mlx5e_xdp_set(struct net_device *netdev, struct bpf_prog *prog) mlx5e_set_rq_type(priv->mdev, &priv->channels.params); if (was_opened && reset) - mlx5e_open_locked(netdev); + err = mlx5e_open_locked(netdev); if (!test_bit(MLX5E_STATE_OPENED, &priv->state) || reset) goto unlock; |