Author: hselasky
Date: Mon Nov  7 08:24:29 2016
New Revision: 308399
URL: https://svnweb.freebsd.org/changeset/base/308399

Log:
  MFC r308031:
  Fix indentation and remove duplicate queue stopped stats increment.
  
  Found by:     Ryan Stone <ryst...@gmail.com>
  Sponsored by: Mellanox Technologies

Modified:
  stable/10/sys/ofed/drivers/net/mlx4/en_tx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ofed/drivers/net/mlx4/en_tx.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/en_tx.c Mon Nov  7 08:22:44 2016        
(r308398)
+++ stable/10/sys/ofed/drivers/net/mlx4/en_tx.c Mon Nov  7 08:24:29 2016        
(r308399)
@@ -702,20 +702,19 @@ static int mlx4_en_xmit(struct mlx4_en_p
 
        /* 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) >=
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to