Author: luigi
Date: Mon Apr 29 16:58:21 2013
New Revision: 250049
URL: http://svnweb.freebsd.org/changeset/base/250049

Log:
  explicitly mark some variables as const

Modified:
  head/sys/dev/netmap/ixgbe_netmap.h

Modified: head/sys/dev/netmap/ixgbe_netmap.h
==============================================================================
--- head/sys/dev/netmap/ixgbe_netmap.h  Mon Apr 29 15:58:04 2013        
(r250048)
+++ head/sys/dev/netmap/ixgbe_netmap.h  Mon Apr 29 16:58:21 2013        
(r250049)
@@ -226,7 +226,8 @@ ixgbe_netmap_txsync(struct ifnet *ifp, u
        struct netmap_adapter *na = NA(adapter->ifp);
        struct netmap_kring *kring = &na->tx_rings[ring_nr];
        struct netmap_ring *ring = kring->ring;
-       u_int j, k = ring->cur, l, n = 0, lim = kring->nkr_num_slots - 1;
+       u_int j, l, n = 0;
+       u_int const k = ring->cur, lim = kring->nkr_num_slots - 1;
 
        /*
         * ixgbe can generate an interrupt on every tx packet, but it
@@ -393,11 +394,10 @@ ring_reset:
            if (ix_use_dd) {
                struct ixgbe_legacy_tx_desc *txd =
                    (struct ixgbe_legacy_tx_desc *)txr->tx_base;
-
+               u_int k1 = netmap_idx_k2n(kring, kring->nr_hwcur);
                l = txr->next_to_clean;
-               k = netmap_idx_k2n(kring, kring->nr_hwcur);
                delta = 0;
-               while (l != k &&
+               while (l != k1 &&
                    txd[l].upper.fields.status & IXGBE_TXD_STAT_DD) {
                    delta++;
                    l = (l == lim) ? 0 : l + 1;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to