Fix indentation and remove duplicate queue stopped stats increment.

Found by:	Ryan Stone <rysto32@gmail.com>
Sponsored by:	Mellanox Technologies
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2016-10-28 12:36:59 +00:00
parent 1d6dfd1230
commit b133b47342
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308031

View File

@ -707,20 +707,19 @@ static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp
/* check if TX ring is full */
if (unlikely(mlx4_en_tx_ring_is_full(ring))) {
/* every full native Tx ring stops queue */
if (ring->blocked == 0)
atomic_add_int(&priv->blocked, 1);
/* Set HW-queue-is-full flag */
atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
priv->port_stats.queue_stopped++;
ring->blocked = 1;
/* every full native Tx ring stops queue */
if (ring->blocked == 0)
atomic_add_int(&priv->blocked, 1);
/* Set HW-queue-is-full flag */
atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
priv->port_stats.queue_stopped++;
ring->blocked = 1;
ring->queue_stopped++;
/* Use interrupts to find out when queue opened */
mlx4_en_arm_cq(priv, priv->tx_cq[tx_ind]);
return (ENOBUFS);
}
}
/* sanity check we are not wrapping around */
KASSERT(((~ring->prod) & ring->size_mask) >=