diff options
author | Slava Shwartsman <slavash@FreeBSD.org> | 2018-12-05 14:21:59 +0000 |
---|---|---|
committer | Slava Shwartsman <slavash@FreeBSD.org> | 2018-12-05 14:21:59 +0000 |
commit | f292a94d6ba0bf4a3b255f0574f2ae0aa471f34f (patch) | |
tree | a362767d2a0e3c4c295e4244f52da56d90f1f003 | |
parent | 3e581cabf027e361c231a45aad252e979fdca353 (diff) | |
download | src-f292a94d6ba0bf4a3b255f0574f2ae0aa471f34f.tar.gz src-f292a94d6ba0bf4a3b255f0574f2ae0aa471f34f.zip |
mlx5en: Don't set rate on SQs when the SQ is already stopped.
This can happen when connections are short lived and leads to
a firmware error printout in dmesg, syndrome 0x51cfb0, because
the SQ is in the wrong state.
Submitted by: hselasky@
Approved by: hselasky (mentor)
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=341580
-rw-r--r-- | sys/dev/mlx5/mlx5_en/mlx5_en_rl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c index 32f3f53f7b07..1142c02800f3 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c @@ -458,9 +458,9 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_worker *rlw, howmany(rate, 1000), burst); } - /* set new rate */ + /* set new rate, if SQ is not stopped */ sq = channel->sq; - if (sq != NULL) { + if (sq != NULL && sq->stopped == 0) { error = mlx5e_rl_modify_sq(sq, index); if (error != 0) atomic_add_64(&rlw->priv->rl.stats.tx_modify_rate_failure, 1ULL); |