Page MenuHomeFreeBSD

D41547.diff
No OneTemporary

D41547.diff

diff --git a/sys/dev/iavf/iavf_iflib.h b/sys/dev/iavf/iavf_iflib.h
--- a/sys/dev/iavf/iavf_iflib.h
+++ b/sys/dev/iavf/iavf_iflib.h
@@ -122,9 +122,6 @@
((struct iavf_sc *)iflib_get_softc(_ctx))
/* Use the correct assert function for each lock type */
-#define IFLIB_CTX_ASSERT(_ctx) \
- sx_assert(iflib_ctx_lock_get(_ctx), SA_XLOCKED)
-
#define IAVF_VC_LOCK(_sc) mtx_lock(&(_sc)->vc_mtx)
#define IAVF_VC_UNLOCK(_sc) mtx_unlock(&(_sc)->vc_mtx)
#define IAVF_VC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->vc_mtx)
diff --git a/sys/dev/iavf/iavf_lib.h b/sys/dev/iavf/iavf_lib.h
--- a/sys/dev/iavf/iavf_lib.h
+++ b/sys/dev/iavf/iavf_lib.h
@@ -204,20 +204,6 @@
IAVF_DEFAULT_RSS_HENA_BASE | \
IAVF_DEFAULT_ADV_RSS_HENA)
-/* Pre-11 counter(9) compatibility */
-#define IAVF_SET_IPACKETS(vsi, count) (vsi)->ipackets = (count)
-#define IAVF_SET_IERRORS(vsi, count) (vsi)->ierrors = (count)
-#define IAVF_SET_OPACKETS(vsi, count) (vsi)->opackets = (count)
-#define IAVF_SET_OERRORS(vsi, count) (vsi)->oerrors = (count)
-#define IAVF_SET_COLLISIONS(vsi, count) /* Do nothing; collisions is always 0. */
-#define IAVF_SET_IBYTES(vsi, count) (vsi)->ibytes = (count)
-#define IAVF_SET_OBYTES(vsi, count) (vsi)->obytes = (count)
-#define IAVF_SET_IMCASTS(vsi, count) (vsi)->imcasts = (count)
-#define IAVF_SET_OMCASTS(vsi, count) (vsi)->omcasts = (count)
-#define IAVF_SET_IQDROPS(vsi, count) (vsi)->iqdrops = (count)
-#define IAVF_SET_OQDROPS(vsi, count) (vsi)->oqdrops = (count)
-#define IAVF_SET_NOPROTO(vsi, count) (vsi)->noproto = (count)
-
/* For stats sysctl naming */
#define IAVF_QUEUE_NAME_LEN 32
diff --git a/sys/dev/iavf/iavf_vc_common.c b/sys/dev/iavf/iavf_vc_common.c
--- a/sys/dev/iavf/iavf_vc_common.c
+++ b/sys/dev/iavf/iavf_vc_common.c
@@ -39,10 +39,6 @@
*/
#include "iavf_vc_common.h"
-/* busy wait delay in msec */
-#define IAVF_BUSY_WAIT_DELAY 10
-#define IAVF_BUSY_WAIT_COUNT 50
-
/* Static function decls */
static void iavf_handle_link_event(struct iavf_sc *sc,
struct virtchnl_pf_event *vpe);
@@ -662,27 +658,19 @@
iavf_update_stats_counters(struct iavf_sc *sc, struct iavf_eth_stats *es)
{
struct iavf_vsi *vsi = &sc->vsi;
- uint64_t tx_discards;
-
- tx_discards = es->tx_discards;
/* Update ifnet stats */
- IAVF_SET_IPACKETS(vsi, es->rx_unicast +
- es->rx_multicast +
- es->rx_broadcast);
- IAVF_SET_OPACKETS(vsi, es->tx_unicast +
- es->tx_multicast +
- es->tx_broadcast);
- IAVF_SET_IBYTES(vsi, es->rx_bytes);
- IAVF_SET_OBYTES(vsi, es->tx_bytes);
- IAVF_SET_IMCASTS(vsi, es->rx_multicast);
- IAVF_SET_OMCASTS(vsi, es->tx_multicast);
-
- IAVF_SET_OERRORS(vsi, es->tx_errors);
- IAVF_SET_IQDROPS(vsi, es->rx_discards);
- IAVF_SET_OQDROPS(vsi, tx_discards);
- IAVF_SET_NOPROTO(vsi, es->rx_unknown_protocol);
- IAVF_SET_COLLISIONS(vsi, 0);
+ vsi->ipackets = es->rx_unicast + es->rx_multicast + es->rx_broadcast;
+ vsi->opackets = es->tx_unicast + es->tx_multicast + es->tx_broadcast;
+ vsi->ibytes = es->rx_bytes;
+ vsi->obytes = es->tx_bytes;
+ vsi->imcasts = es->rx_multicast;
+ vsi->omcasts = es->tx_multicast;
+
+ vsi->oerrors = es->tx_errors;
+ vsi->iqdrops = es->rx_discards;
+ vsi->oqdrops = es->tx_discards;
+ vsi->noproto = es->rx_unknown_protocol;
vsi->eth_stats = *es;
}
diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c
--- a/sys/dev/iavf/if_iavf_iflib.c
+++ b/sys/dev/iavf/if_iavf_iflib.c
@@ -728,7 +728,7 @@
INIT_DBG_IF(ifp, "begin");
- IFLIB_CTX_ASSERT(ctx);
+ sx_assert(iflib_ctx_lock_get(ctx), SA_XLOCKED);
error = iavf_reset_complete(hw);
if (error) {
@@ -870,7 +870,7 @@
fail:
iflib_irq_free(ctx, &vsi->irq);
rx_que = vsi->rx_queues;
- for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++)
+ for (i = 0; i < vsi->num_rx_queues; i++, rx_que++)
iflib_irq_free(ctx, &rx_que->que_irq);
return (err);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 1, 4:45 PM (5 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28405549
Default Alt Text
D41547.diff (3 KB)

Event Timeline