From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH v2 1/6] net/sfc/base: don't ignore requested MAC stats update period
Date: Thu, 9 Mar 2017 17:22:58 +0000 [thread overview]
Message-ID: <1489080183-21467-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1489080183-21467-1-git-send-email-arybchenko@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/base/efx_mcdi.c | 24 ++++++++++++++----------
drivers/net/sfc/base/efx_mcdi.h | 2 +-
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/net/sfc/base/efx_mcdi.c b/drivers/net/sfc/base/efx_mcdi.c
index ac432a6..c9d29a7 100644
--- a/drivers/net/sfc/base/efx_mcdi.c
+++ b/drivers/net/sfc/base/efx_mcdi.c
@@ -1722,7 +1722,8 @@ static __checkReturn efx_rc_t
efx_mcdi_mac_stats(
__in efx_nic_t *enp,
__in_opt efsys_mem_t *esmp,
- __in efx_stats_action_t action)
+ __in efx_stats_action_t action,
+ __in uint16_t period_ms)
{
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_MAC_STATS_IN_LEN,
@@ -1747,7 +1748,7 @@ efx_mcdi_mac_stats(
MAC_STATS_IN_PERIODIC_CHANGE, enable | events | disable,
MAC_STATS_IN_PERIODIC_ENABLE, enable | events,
MAC_STATS_IN_PERIODIC_NOEVENT, !events,
- MAC_STATS_IN_PERIOD_MS, (enable | events) ? 1000 : 0);
+ MAC_STATS_IN_PERIOD_MS, (enable | events) ? period_ms : 0);
if (esmp != NULL) {
int bytes = MC_CMD_MAC_NSTATS * sizeof (uint64_t);
@@ -1797,7 +1798,7 @@ efx_mcdi_mac_stats_clear(
{
efx_rc_t rc;
- if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR)) != 0)
+ if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR, 0)) != 0)
goto fail1;
return (0);
@@ -1820,7 +1821,7 @@ efx_mcdi_mac_stats_upload(
* avoid having to pull the statistics buffer into the cache to
* maintain cumulative statistics.
*/
- if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD)) != 0)
+ if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD, 0)) != 0)
goto fail1;
return (0);
@@ -1835,7 +1836,7 @@ efx_mcdi_mac_stats_upload(
efx_mcdi_mac_stats_periodic(
__in efx_nic_t *enp,
__in efsys_mem_t *esmp,
- __in uint16_t period,
+ __in uint16_t period_ms,
__in boolean_t events)
{
efx_rc_t rc;
@@ -1844,14 +1845,17 @@ efx_mcdi_mac_stats_periodic(
* The MC DMAs aggregate statistics for our convenience, so we can
* avoid having to pull the statistics buffer into the cache to
* maintain cumulative statistics.
- * Huntington uses a fixed 1sec period, so use that on Siena too.
+ * Huntington uses a fixed 1sec period.
+ * Medford uses a fixed 1sec period before v6.2.1.1033 firmware.
*/
- if (period == 0)
- rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE);
+ if (period_ms == 0)
+ rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE, 0);
else if (events)
- rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS);
+ rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS,
+ period_ms);
else
- rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS);
+ rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS,
+ period_ms);
if (rc != 0)
goto fail1;
diff --git a/drivers/net/sfc/base/efx_mcdi.h b/drivers/net/sfc/base/efx_mcdi.h
index 814f3f4..7faabbb 100644
--- a/drivers/net/sfc/base/efx_mcdi.h
+++ b/drivers/net/sfc/base/efx_mcdi.h
@@ -216,7 +216,7 @@ extern __checkReturn efx_rc_t
efx_mcdi_mac_stats_periodic(
__in efx_nic_t *enp,
__in efsys_mem_t *esmp,
- __in uint16_t period,
+ __in uint16_t period_ms,
__in boolean_t events);
--
2.9.3
next prev parent reply other threads:[~2017-03-09 17:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 15:46 [dpdk-dev] [PATCH 0/6] Support running Solarflare PMD over PCI VFs Andrew Rybchenko
2017-03-02 15:46 ` [dpdk-dev] [PATCH 1/6] net/sfc: add VFs to the table of PCI IDs for supported NICs Andrew Rybchenko
2017-03-06 10:10 ` Ferruh Yigit
2017-03-06 14:00 ` Andrew Rybchenko
2017-03-02 15:46 ` [dpdk-dev] [PATCH 2/6] net/sfc/base: don't ignore requested MAC stats update period Andrew Rybchenko
2017-03-02 15:46 ` [dpdk-dev] [PATCH 3/6] net/sfc: add kvarg control for MAC statistics " Andrew Rybchenko
2017-03-02 15:46 ` [dpdk-dev] [PATCH 4/6] net/sfc: port HW stats must work if periodic DMA is absent Andrew Rybchenko
2017-03-02 15:46 ` [dpdk-dev] [PATCH 5/6] net/sfc: port must not fail to start if Rx mode is rejected Andrew Rybchenko
2017-03-06 10:24 ` Ferruh Yigit
2017-03-02 15:46 ` [dpdk-dev] [PATCH 6/6] net/sfc: add support for MCDI proxy Andrew Rybchenko
2017-03-09 17:22 ` [dpdk-dev] [PATCH v2 0/6] Support running Solarflare PMD over PCI VFs Andrew Rybchenko
2017-03-09 17:22 ` Andrew Rybchenko [this message]
2017-03-09 17:22 ` [dpdk-dev] [PATCH v2 2/6] net/sfc: add kvarg control for MAC statistics update period Andrew Rybchenko
2017-03-09 17:23 ` [dpdk-dev] [PATCH v2 3/6] net/sfc: poll MAC stats if periodic DMA is not supported Andrew Rybchenko
2017-03-09 17:23 ` [dpdk-dev] [PATCH v2 4/6] net/sfc: avoid failure on port start if Rx mode is rejected Andrew Rybchenko
2017-03-09 17:23 ` [dpdk-dev] [PATCH v2 5/6] net/sfc: add support for MCDI proxy Andrew Rybchenko
2017-03-15 11:13 ` Ferruh Yigit
2017-03-09 17:23 ` [dpdk-dev] [PATCH v2 6/6] net/sfc: add VFs to the table of PCI IDs for supported NICs Andrew Rybchenko
2017-03-15 11:11 ` [dpdk-dev] [PATCH v2 0/6] Support running Solarflare PMD over PCI VFs Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489080183-21467-2-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).