eal/linux: add interrupt counter size for vdev
[dpdk.git] / drivers / net / sfc / base / efx_mac.c
index 840b7db..752e720 100644 (file)
@@ -50,8 +50,12 @@ static const efx_mac_ops_t   __efx_siena_mac_ops = {
        siena_mac_multicast_list_set,           /* emo_multicast_list_set */
        NULL,                                   /* emo_filter_set_default_rxq */
        NULL,                           /* emo_filter_default_rxq_clear */
+#if EFSYS_OPT_LOOPBACK
+       siena_mac_loopback_set,                 /* emo_loopback_set */
+#endif /* EFSYS_OPT_LOOPBACK */
 #if EFSYS_OPT_MAC_STATS
        siena_mac_stats_get_mask,               /* emo_stats_get_mask */
+       efx_mcdi_mac_stats_clear,               /* emo_stats_clear */
        efx_mcdi_mac_stats_upload,              /* emo_stats_upload */
        efx_mcdi_mac_stats_periodic,            /* emo_stats_periodic */
        siena_mac_stats_update                  /* emo_stats_update */
@@ -71,8 +75,12 @@ static const efx_mac_ops_t   __efx_ef10_mac_ops = {
        ef10_mac_filter_default_rxq_set,        /* emo_filter_default_rxq_set */
        ef10_mac_filter_default_rxq_clear,
                                        /* emo_filter_default_rxq_clear */
+#if EFSYS_OPT_LOOPBACK
+       ef10_mac_loopback_set,                  /* emo_loopback_set */
+#endif /* EFSYS_OPT_LOOPBACK */
 #if EFSYS_OPT_MAC_STATS
        ef10_mac_stats_get_mask,                /* emo_stats_get_mask */
+       efx_mcdi_mac_stats_clear,               /* emo_stats_clear */
        efx_mcdi_mac_stats_upload,              /* emo_stats_upload */
        efx_mcdi_mac_stats_periodic,            /* emo_stats_periodic */
        ef10_mac_stats_update                   /* emo_stats_update */
@@ -701,6 +709,29 @@ efx_mac_stats_get_mask(
 
        return (0);
 
+fail1:
+       EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+       return (rc);
+}
+
+       __checkReturn                   efx_rc_t
+efx_mac_stats_clear(
+       __in                            efx_nic_t *enp)
+{
+       efx_port_t *epp = &(enp->en_port);
+       const efx_mac_ops_t *emop = epp->ep_emop;
+       efx_rc_t rc;
+
+       EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+       EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
+       EFSYS_ASSERT(emop != NULL);
+
+       if ((rc = emop->emo_stats_clear(enp)) != 0)
+               goto fail1;
+
+       return (0);
+
 fail1:
        EFSYS_PROBE1(fail1, efx_rc_t, rc);