Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2018 14:22:00 +0000 (UTC)
From:      Slava Shwartsman <slavash@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341580 - head/sys/dev/mlx5/mlx5_en
Message-ID:  <201812051422.wB5EM0DF004007@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: slavash
Date: Wed Dec  5 14:21:59 2018
New Revision: 341580
URL: https://svnweb.freebsd.org/changeset/base/341580

Log:
  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

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c	Wed Dec  5 14:21:28 2018	(r341579)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c	Wed Dec  5 14:21:59 2018	(r341580)
@@ -458,9 +458,9 @@ mlx5e_rlw_channel_set_rate_locked(struct mlx5e_rl_work
 		    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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812051422.wB5EM0DF004007>