diff options
author | hselasky <hselasky@FreeBSD.org> | 2016-11-07 08:22:44 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2016-11-07 08:22:44 +0000 |
commit | 7fa1d4ac3f1e9c0244c9fea96875bb5b6b0bc8ce (patch) | |
tree | a6cba03676a840ebef645acd36be98a34c126352 | |
parent | 488648cae1e4ea461f350f88c25dca054fdc713a (diff) | |
download | FreeBSD-src-7fa1d4ac3f1e9c0244c9fea96875bb5b6b0bc8ce.zip FreeBSD-src-7fa1d4ac3f1e9c0244c9fea96875bb5b6b0bc8ce.tar.gz |
MFC r308031:
Fix indentation and remove duplicate queue stopped stats increment.
Found by: Ryan Stone <rysto32@gmail.com>
Sponsored by: Mellanox Technologies
-rw-r--r-- | sys/ofed/drivers/net/mlx4/en_tx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_tx.c b/sys/ofed/drivers/net/mlx4/en_tx.c index 9090c51..e98aec3 100644 --- a/sys/ofed/drivers/net/mlx4/en_tx.c +++ b/sys/ofed/drivers/net/mlx4/en_tx.c @@ -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) >= |