Date: Thu, 29 Nov 2018 06:46:44 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341211 - head/sys/dev/sfxge/common Message-ID: <201811290646.wAT6kieO026101@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Thu Nov 29 06:46:44 2018 New Revision: 341211 URL: https://svnweb.freebsd.org/changeset/base/341211 Log: sfxge(4): support RxDP scatter disabled truncate counter Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18242 Modified: head/sys/dev/sfxge/common/ef10_mac.c Modified: head/sys/dev/sfxge/common/ef10_mac.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_mac.c Thu Nov 29 06:46:33 2018 (r341210) +++ head/sys/dev/sfxge/common/ef10_mac.c Thu Nov 29 06:46:44 2018 (r341211) @@ -560,8 +560,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: @@ -1004,6 +1017,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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811290646.wAT6kieO026101>