net/sfc/base: support RxDP scatter disabled truncate counter

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
This commit is contained in:
Andrew Rybchenko 2018-05-03 15:41:18 +01:00 committed by Ferruh Yigit
parent 7bbd316b69
commit c928f7ca60

View File

@ -533,8 +533,21 @@ ef10_mac_stats_get_mask(
goto fail7;
}
if (encp->enc_mac_stats_nstats >= MC_CMD_MAC_NSTATS_V4) {
const struct efx_mac_stats_range ef10_rxdp_sdt[] = {
{ EFX_MAC_RXDP_SCATTER_DISABLED_TRUNC,
EFX_MAC_RXDP_SCATTER_DISABLED_TRUNC },
};
if ((rc = efx_mac_stats_mask_add_ranges(maskp, mask_size,
ef10_rxdp_sdt, EFX_ARRAY_SIZE(ef10_rxdp_sdt))) != 0)
goto fail8;
}
return (0);
fail8:
EFSYS_PROBE(fail8);
fail7:
EFSYS_PROBE(fail7);
fail6:
@ -978,6 +991,14 @@ ef10_mac_stats_update(
EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_CTPIO_ERASE, &value);
EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_CTPIO_ERASE]), &value);
if (encp->enc_mac_stats_nstats < MC_CMD_MAC_NSTATS_V4)
goto done;
EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_SCATTER_DISABLED_TRUNC,
&value);
EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_SCATTER_DISABLED_TRUNC]),
&value);
done:
/* Read START generation counter */
EFSYS_DMA_SYNC_FOR_KERNEL(esmp, 0, EFSYS_MEM_SIZE(esmp));