net/sfc/base: share macro to increment per-event type stats
[dpdk.git] / drivers / net / sfc / base / efx_impl.h
index 56d293b..f148c87 100644 (file)
@@ -794,6 +794,16 @@ struct efx_evq_s {
 
 #define        EFX_EVQ_SIENA_TIMER_QUANTUM_NS  6144 /* 768 cycles */
 
+#if EFSYS_OPT_QSTATS
+#define        EFX_EV_QSTAT_INCR(_eep, _stat)                                  \
+       do {                                                            \
+               (_eep)->ee_stat[_stat]++;                               \
+       _NOTE(CONSTANTCONDITION)                                        \
+       } while (B_FALSE)
+#else
+#define        EFX_EV_QSTAT_INCR(_eep, _stat)
+#endif
+
 struct efx_rxq_s {
        uint32_t                        er_magic;
        efx_nic_t                       *er_enp;