get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/17121/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17121,
    "url": "http://patches.dpdk.org/api/patches/17121/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1479740470-6723-24-git-send-email-arybchenko@solarflare.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1479740470-6723-24-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479740470-6723-24-git-send-email-arybchenko@solarflare.com",
    "date": "2016-11-21T15:00:37",
    "name": "[dpdk-dev,23/56] net/sfc: import libefx monitors statistics support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "eda3076e5bc522f784e55eb7d90675500b9cf522",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1479740470-6723-24-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/17121/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/17121/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id EF67BD4CA;\n\tMon, 21 Nov 2016 16:02:55 +0100 (CET)",
            "from nbfkord-smmo02.seg.att.com (nbfkord-smmo02.seg.att.com\n\t[209.65.160.78]) by dpdk.org (Postfix) with ESMTP id D28D5532C\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 16:01:33 +0100 (CET)",
            "from unknown [12.187.104.26]\n\tby nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) with SMTP id\n\td4c03385.0.1541296.00-2373.3424205.nbfkord-smmo02.seg.att.com\n\t(envelope-from <arybchenko@solarflare.com>); \n\tMon, 21 Nov 2016 15:01:33 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1044.25; Mon, 21 Nov 2016 07:01:21 -0800",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1044.25 via Frontend Transport; Mon, 21 Nov 2016 07:01:21 -0800",
            "from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com\n\t[10.17.10.10])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tuALF1KcV007167 for <dev@dpdk.org>; Mon, 21 Nov 2016 15:01:20 GMT",
            "from uklogin.uk.solarflarecom.com (localhost.localdomain\n\t[127.0.0.1])\n\tby uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tuALF1J3E006765 for <dev@dpdk.org>; Mon, 21 Nov 2016 15:01:20 GMT"
        ],
        "X-MXL-Hash": "58330c4d099ada6b-30a88fcdd70d8bcb943200a05aa40a7fcaca90af",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Mon, 21 Nov 2016 15:00:37 +0000",
        "Message-ID": "<1479740470-6723-24-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.2.3",
        "In-Reply-To": "<1479740470-6723-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1479740470-6723-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-AnalysisOut": [
            "[v=2.1 cv=UI/baXry c=1 sm=1 tr=0 a=8BlWFWvVlq5taO8ncb8nKg==]",
            "[:17 a=L24OOQBejmoA:10 a=zRKbQ67AAAAA:8 a=qIhezoK1lfj2Gwb_r]",
            "[A0A:9 a=9ryRj7BNDcSUwMkt:21 a=PA03WX8tBzeizutn5_OT:22]"
        ],
        "X-Spam": "[F=0.4999995958; CM=0.500; S=0.499(2015072901)]",
        "X-MAIL-FROM": "<arybchenko@solarflare.com>",
        "X-SOURCE-IP": "[12.187.104.26]",
        "Subject": "[dpdk-dev] [PATCH 23/56] net/sfc: import libefx monitors statistics\n\tsupport",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "EFSYS_OPT_MON_STATS should be enabled to use it.\n\nFrom Solarflare Communications Inc.\n\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/efx/base/ef10_ev.c   |  20 +++++\n drivers/net/sfc/efx/base/ef10_nic.c  |  15 ++++\n drivers/net/sfc/efx/base/efx.h       | 140 +++++++++++++++++++++++++++++++++++\n drivers/net/sfc/efx/base/efx_check.h |   7 ++\n drivers/net/sfc/efx/base/efx_ev.c    |  18 +++++\n drivers/net/sfc/efx/base/efx_impl.h  |   4 +\n drivers/net/sfc/efx/base/efx_mon.c   | 118 +++++++++++++++++++++++++++++\n drivers/net/sfc/efx/base/siena_nic.c |  12 +++\n 8 files changed, 334 insertions(+)",
    "diff": "diff --git a/drivers/net/sfc/efx/base/ef10_ev.c b/drivers/net/sfc/efx/base/ef10_ev.c\nindex f58ccc6..e93b458 100644\n--- a/drivers/net/sfc/efx/base/ef10_ev.c\n+++ b/drivers/net/sfc/efx/base/ef10_ev.c\n@@ -30,6 +30,9 @@\n \n #include \"efx.h\"\n #include \"efx_impl.h\"\n+#if EFSYS_OPT_MON_STATS\n+#include \"mcdi_mon.h\"\n+#endif\n \n #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD\n \n@@ -1085,6 +1088,23 @@ ef10_ev_mcdi(\n \t}\n \n \tcase MCDI_EVENT_CODE_SENSOREVT: {\n+#if EFSYS_OPT_MON_STATS\n+\t\tefx_mon_stat_t id;\n+\t\tefx_mon_stat_value_t value;\n+\t\tefx_rc_t rc;\n+\n+\t\t/* Decode monitor stat for MCDI sensor (if supported) */\n+\t\tif ((rc = mcdi_mon_ev(enp, eqp, &id, &value)) == 0) {\n+\t\t\t/* Report monitor stat change */\n+\t\t\tshould_abort = eecp->eec_monitor(arg, id, value);\n+\t\t} else if (rc == ENOTSUP) {\n+\t\t\tshould_abort = eecp->eec_exception(arg,\n+\t\t\t\tEFX_EXCEPTION_UNKNOWN_SENSOREVT,\n+\t\t\t\tMCDI_EV_FIELD(eqp, DATA));\n+\t\t} else {\n+\t\t\tEFSYS_ASSERT(rc == ENODEV);\t/* Wrong port */\n+\t\t}\n+#endif\n \t\tbreak;\n \t}\n \ndiff --git a/drivers/net/sfc/efx/base/ef10_nic.c b/drivers/net/sfc/efx/base/ef10_nic.c\nindex fec6a69..32706f4 100644\n--- a/drivers/net/sfc/efx/base/ef10_nic.c\n+++ b/drivers/net/sfc/efx/base/ef10_nic.c\n@@ -1382,10 +1382,22 @@ ef10_nic_probe(\n \t\tgoto fail6;\n #endif\n \n+#if EFSYS_OPT_MON_STATS\n+\tif ((rc = mcdi_mon_cfg_build(enp)) != 0) {\n+\t\t/* Unprivileged functions do not have access to sensors */\n+\t\tif (rc != EACCES)\n+\t\t\tgoto fail7;\n+\t}\n+#endif\n+\n \tencp->enc_features = enp->en_features;\n \n \treturn (0);\n \n+#if EFSYS_OPT_MON_STATS\n+fail7:\n+\tEFSYS_PROBE(fail7);\n+#endif\n #if EFSYS_OPT_LOOPBACK\n fail6:\n \tEFSYS_PROBE(fail6);\n@@ -1781,6 +1793,9 @@ ef10_nic_fini(\n ef10_nic_unprobe(\n \t__in\t\tefx_nic_t *enp)\n {\n+#if EFSYS_OPT_MON_STATS\n+\tmcdi_mon_cfg_free(enp);\n+#endif /* EFSYS_OPT_MON_STATS */\n \t(void) efx_mcdi_drv_attach(enp, B_FALSE);\n }\n \ndiff --git a/drivers/net/sfc/efx/base/efx.h b/drivers/net/sfc/efx/base/efx.h\nindex 70569e7..4fc0207 100644\n--- a/drivers/net/sfc/efx/base/efx.h\n+++ b/drivers/net/sfc/efx/base/efx.h\n@@ -615,6 +615,125 @@ extern\t__checkReturn\tefx_rc_t\n efx_mon_init(\n \t__in\t\tefx_nic_t *enp);\n \n+#if EFSYS_OPT_MON_STATS\n+\n+#define\tEFX_MON_STATS_PAGE_SIZE 0x100\n+#define\tEFX_MON_MASK_ELEMENT_SIZE 32\n+\n+/* START MKCONFIG GENERATED MonitorHeaderStatsBlock 5d4ee5185e419abe */\n+typedef enum efx_mon_stat_e {\n+\tEFX_MON_STAT_2_5V,\n+\tEFX_MON_STAT_VCCP1,\n+\tEFX_MON_STAT_VCC,\n+\tEFX_MON_STAT_5V,\n+\tEFX_MON_STAT_12V,\n+\tEFX_MON_STAT_VCCP2,\n+\tEFX_MON_STAT_EXT_TEMP,\n+\tEFX_MON_STAT_INT_TEMP,\n+\tEFX_MON_STAT_AIN1,\n+\tEFX_MON_STAT_AIN2,\n+\tEFX_MON_STAT_INT_COOLING,\n+\tEFX_MON_STAT_EXT_COOLING,\n+\tEFX_MON_STAT_1V,\n+\tEFX_MON_STAT_1_2V,\n+\tEFX_MON_STAT_1_8V,\n+\tEFX_MON_STAT_3_3V,\n+\tEFX_MON_STAT_1_2VA,\n+\tEFX_MON_STAT_VREF,\n+\tEFX_MON_STAT_VAOE,\n+\tEFX_MON_STAT_AOE_TEMP,\n+\tEFX_MON_STAT_PSU_AOE_TEMP,\n+\tEFX_MON_STAT_PSU_TEMP,\n+\tEFX_MON_STAT_FAN0,\n+\tEFX_MON_STAT_FAN1,\n+\tEFX_MON_STAT_FAN2,\n+\tEFX_MON_STAT_FAN3,\n+\tEFX_MON_STAT_FAN4,\n+\tEFX_MON_STAT_VAOE_IN,\n+\tEFX_MON_STAT_IAOE,\n+\tEFX_MON_STAT_IAOE_IN,\n+\tEFX_MON_STAT_NIC_POWER,\n+\tEFX_MON_STAT_0_9V,\n+\tEFX_MON_STAT_I0_9V,\n+\tEFX_MON_STAT_I1_2V,\n+\tEFX_MON_STAT_0_9V_ADC,\n+\tEFX_MON_STAT_INT_TEMP2,\n+\tEFX_MON_STAT_VREG_TEMP,\n+\tEFX_MON_STAT_VREG_0_9V_TEMP,\n+\tEFX_MON_STAT_VREG_1_2V_TEMP,\n+\tEFX_MON_STAT_INT_VPTAT,\n+\tEFX_MON_STAT_INT_ADC_TEMP,\n+\tEFX_MON_STAT_EXT_VPTAT,\n+\tEFX_MON_STAT_EXT_ADC_TEMP,\n+\tEFX_MON_STAT_AMBIENT_TEMP,\n+\tEFX_MON_STAT_AIRFLOW,\n+\tEFX_MON_STAT_VDD08D_VSS08D_CSR,\n+\tEFX_MON_STAT_VDD08D_VSS08D_CSR_EXTADC,\n+\tEFX_MON_STAT_HOTPOINT_TEMP,\n+\tEFX_MON_STAT_PHY_POWER_SWITCH_PORT0,\n+\tEFX_MON_STAT_PHY_POWER_SWITCH_PORT1,\n+\tEFX_MON_STAT_MUM_VCC,\n+\tEFX_MON_STAT_0V9_A,\n+\tEFX_MON_STAT_I0V9_A,\n+\tEFX_MON_STAT_0V9_A_TEMP,\n+\tEFX_MON_STAT_0V9_B,\n+\tEFX_MON_STAT_I0V9_B,\n+\tEFX_MON_STAT_0V9_B_TEMP,\n+\tEFX_MON_STAT_CCOM_AVREG_1V2_SUPPLY,\n+\tEFX_MON_STAT_CCOM_AVREG_1V2_SUPPLY_EXT_ADC,\n+\tEFX_MON_STAT_CCOM_AVREG_1V8_SUPPLY,\n+\tEFX_MON_STAT_CCOM_AVREG_1V8_SUPPLY_EXT_ADC,\n+\tEFX_MON_STAT_CONTROLLER_MASTER_VPTAT,\n+\tEFX_MON_STAT_CONTROLLER_MASTER_INTERNAL_TEMP,\n+\tEFX_MON_STAT_CONTROLLER_MASTER_VPTAT_EXT_ADC,\n+\tEFX_MON_STAT_CONTROLLER_MASTER_INTERNAL_TEMP_EXT_ADC,\n+\tEFX_MON_STAT_CONTROLLER_SLAVE_VPTAT,\n+\tEFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP,\n+\tEFX_MON_STAT_CONTROLLER_SLAVE_VPTAT_EXT_ADC,\n+\tEFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP_EXT_ADC,\n+\tEFX_MON_STAT_SODIMM_VOUT,\n+\tEFX_MON_STAT_SODIMM_0_TEMP,\n+\tEFX_MON_STAT_SODIMM_1_TEMP,\n+\tEFX_MON_STAT_PHY0_VCC,\n+\tEFX_MON_STAT_PHY1_VCC,\n+\tEFX_MON_STAT_CONTROLLER_TDIODE_TEMP,\n+\tEFX_MON_STAT_BOARD_FRONT_TEMP,\n+\tEFX_MON_STAT_BOARD_BACK_TEMP,\n+\tEFX_MON_NSTATS\n+} efx_mon_stat_t;\n+\n+/* END MKCONFIG GENERATED MonitorHeaderStatsBlock */\n+\n+typedef enum efx_mon_stat_state_e {\n+\tEFX_MON_STAT_STATE_OK = 0,\n+\tEFX_MON_STAT_STATE_WARNING = 1,\n+\tEFX_MON_STAT_STATE_FATAL = 2,\n+\tEFX_MON_STAT_STATE_BROKEN = 3,\n+\tEFX_MON_STAT_STATE_NO_READING = 4,\n+} efx_mon_stat_state_t;\n+\n+typedef struct efx_mon_stat_value_s {\n+\tuint16_t\temsv_value;\n+\tuint16_t\temsv_state;\n+} efx_mon_stat_value_t;\n+\n+#if EFSYS_OPT_NAMES\n+\n+extern\t\t\t\t\tconst char *\n+efx_mon_stat_name(\n+\t__in\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\tefx_mon_stat_t id);\n+\n+#endif\t/* EFSYS_OPT_NAMES */\n+\n+extern\t__checkReturn\t\t\tefx_rc_t\n+efx_mon_stats_update(\n+\t__in\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\tefsys_mem_t *esmp,\n+\t__inout_ecount(EFX_MON_NSTATS)\tefx_mon_stat_value_t *values);\n+\n+#endif\t/* EFSYS_OPT_MON_STATS */\n+\n extern\t\tvoid\n efx_mon_fini(\n \t__in\tefx_nic_t *enp);\n@@ -973,6 +1092,10 @@ typedef struct efx_nic_cfg_s {\n #endif\n \tchar\t\t\tenc_phy_revision[21];\n \tefx_mon_type_t\t\tenc_mon_type;\n+#if EFSYS_OPT_MON_STATS\n+\tuint32_t\t\tenc_mon_stat_dma_buf_size;\n+\tuint32_t\t\tenc_mon_stat_mask[(EFX_MON_NSTATS + 31) / 32];\n+#endif\n \tunsigned int\t\tenc_features;\n \tuint8_t\t\t\tenc_mac_addr[6];\n \tuint8_t\t\t\tenc_port;\t/* PHY port number */\n@@ -1009,6 +1132,10 @@ typedef struct efx_nic_cfg_s {\n #if EFSYS_OPT_PHY_STATS\n \tuint32_t\t\tenc_mcdi_phy_stat_mask;\n #endif\t/* EFSYS_OPT_PHY_STATS */\n+#if EFSYS_OPT_MON_STATS\n+\tuint32_t\t\t*enc_mcdi_sensor_maskp;\n+\tuint32_t\t\tenc_mcdi_sensor_mask_size;\n+#endif\t/* EFSYS_OPT_MON_STATS */\n #endif\t/* EFSYS_OPT_MCDI */\n #if EFSYS_OPT_BIST\n \tuint32_t\t\tenc_bist_mask;\n@@ -1358,6 +1485,16 @@ typedef __checkReturn\tboolean_t\n \t__in_opt\tvoid *arg,\n \t__in\t\tefx_link_mode_t\tlink_mode);\n \n+#if EFSYS_OPT_MON_STATS\n+\n+typedef __checkReturn\tboolean_t\n+(*efx_monitor_ev_t)(\n+\t__in_opt\tvoid *arg,\n+\t__in\t\tefx_mon_stat_t id,\n+\t__in\t\tefx_mon_stat_value_t value);\n+\n+#endif\t/* EFSYS_OPT_MON_STATS */\n+\n #if EFSYS_OPT_MAC_STATS\n \n typedef __checkReturn\tboolean_t\n@@ -1381,6 +1518,9 @@ typedef struct efx_ev_callbacks_s {\n \tefx_wake_up_ev_t\t\teec_wake_up;\n \tefx_timer_ev_t\t\t\teec_timer;\n \tefx_link_change_ev_t\t\teec_link_change;\n+#if EFSYS_OPT_MON_STATS\n+\tefx_monitor_ev_t\t\teec_monitor;\n+#endif\t/* EFSYS_OPT_MON_STATS */\n #if EFSYS_OPT_MAC_STATS\n \tefx_mac_stats_ev_t\t\teec_mac_stats;\n #endif\t/* EFSYS_OPT_MAC_STATS */\ndiff --git a/drivers/net/sfc/efx/base/efx_check.h b/drivers/net/sfc/efx/base/efx_check.h\nindex 22cf892..3e4e9ba 100644\n--- a/drivers/net/sfc/efx/base/efx_check.h\n+++ b/drivers/net/sfc/efx/base/efx_check.h\n@@ -159,6 +159,13 @@\n #  error \"MON_HUNTINGTON is obsolete (replaced by MON_MCDI).\"\n #endif\n \n+#if EFSYS_OPT_MON_STATS\n+/* Support monitor statistics (voltage/temperature) */\n+# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)\n+#  error \"MON_STATS requires SIENA or HUNTINGTON or MEDFORD\"\n+# endif\n+#endif /* EFSYS_OPT_MON_STATS */\n+\n #if EFSYS_OPT_NAMES\n /* Support printable names for statistics */\n # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \\\ndiff --git a/drivers/net/sfc/efx/base/efx_ev.c b/drivers/net/sfc/efx/base/efx_ev.c\nindex 9f6a309..ac3ebe3 100644\n--- a/drivers/net/sfc/efx/base/efx_ev.c\n+++ b/drivers/net/sfc/efx/base/efx_ev.c\n@@ -1100,6 +1100,9 @@ siena_ev_mcdi(\n \n \tEFSYS_ASSERT(eecp->eec_link_change != NULL);\n \tEFSYS_ASSERT(eecp->eec_exception != NULL);\n+#if EFSYS_OPT_MON_STATS\n+\tEFSYS_ASSERT(eecp->eec_monitor != NULL);\n+#endif\n \n \tEFX_EV_QSTAT_INCR(eep, EV_MCDI_RESPONSE);\n \n@@ -1124,7 +1127,22 @@ siena_ev_mcdi(\n \t\tbreak;\n \t}\n \tcase MCDI_EVENT_CODE_SENSOREVT: {\n+#if EFSYS_OPT_MON_STATS\n+\t\tefx_mon_stat_t id;\n+\t\tefx_mon_stat_value_t value;\n+\t\tefx_rc_t rc;\n+\n+\t\tif ((rc = mcdi_mon_ev(enp, eqp, &id, &value)) == 0)\n+\t\t\tshould_abort = eecp->eec_monitor(arg, id, value);\n+\t\telse if (rc == ENOTSUP) {\n+\t\t\tshould_abort = eecp->eec_exception(arg,\n+\t\t\t\tEFX_EXCEPTION_UNKNOWN_SENSOREVT,\n+\t\t\t\tMCDI_EV_FIELD(eqp, DATA));\n+\t\t} else\n+\t\t\tEFSYS_ASSERT(rc == ENODEV);\t/* Wrong port */\n+#else\n \t\tshould_abort = B_FALSE;\n+#endif\n \t\tbreak;\n \t}\n \tcase MCDI_EVENT_CODE_SCHEDERR:\ndiff --git a/drivers/net/sfc/efx/base/efx_impl.h b/drivers/net/sfc/efx/base/efx_impl.h\nindex 12a8a4f..c9d2d11 100644\n--- a/drivers/net/sfc/efx/base/efx_impl.h\n+++ b/drivers/net/sfc/efx/base/efx_impl.h\n@@ -291,6 +291,10 @@ typedef struct efx_port_s {\n } efx_port_t;\n \n typedef struct efx_mon_ops_s {\n+#if EFSYS_OPT_MON_STATS\n+\tefx_rc_t\t(*emo_stats_update)(efx_nic_t *, efsys_mem_t *,\n+\t\t\t\t\t    efx_mon_stat_value_t *);\n+#endif\t/* EFSYS_OPT_MON_STATS */\n } efx_mon_ops_t;\n \n typedef struct efx_mon_s {\ndiff --git a/drivers/net/sfc/efx/base/efx_mon.c b/drivers/net/sfc/efx/base/efx_mon.c\nindex d3ed40d..68314cf 100644\n--- a/drivers/net/sfc/efx/base/efx_mon.c\n+++ b/drivers/net/sfc/efx/base/efx_mon.c\n@@ -100,6 +100,124 @@ efx_mon_init(\n \treturn (rc);\n }\n \n+#if EFSYS_OPT_MON_STATS\n+\n+#if EFSYS_OPT_NAMES\n+\n+/* START MKCONFIG GENERATED MonitorStatNamesBlock 31f437eafb0b0437 */\n+static const char * const __mon_stat_name[] = {\n+\t\"value_2_5v\",\n+\t\"value_vccp1\",\n+\t\"value_vcc\",\n+\t\"value_5v\",\n+\t\"value_12v\",\n+\t\"value_vccp2\",\n+\t\"value_ext_temp\",\n+\t\"value_int_temp\",\n+\t\"value_ain1\",\n+\t\"value_ain2\",\n+\t\"controller_cooling\",\n+\t\"ext_cooling\",\n+\t\"1v\",\n+\t\"1_2v\",\n+\t\"1_8v\",\n+\t\"3_3v\",\n+\t\"1_2va\",\n+\t\"vref\",\n+\t\"vaoe\",\n+\t\"aoe_temperature\",\n+\t\"psu_aoe_temperature\",\n+\t\"psu_temperature\",\n+\t\"fan0\",\n+\t\"fan1\",\n+\t\"fan2\",\n+\t\"fan3\",\n+\t\"fan4\",\n+\t\"vaoe_in\",\n+\t\"iaoe\",\n+\t\"iaoe_in\",\n+\t\"nic_power\",\n+\t\"0_9v\",\n+\t\"i0_9v\",\n+\t\"i1_2v\",\n+\t\"0_9v_adc\",\n+\t\"controller_temperature2\",\n+\t\"vreg_temperature\",\n+\t\"vreg_0_9v_temperature\",\n+\t\"vreg_1_2v_temperature\",\n+\t\"int_vptat\",\n+\t\"controller_internal_adc_temperature\",\n+\t\"ext_vptat\",\n+\t\"controller_external_adc_temperature\",\n+\t\"ambient_temperature\",\n+\t\"airflow\",\n+\t\"vdd08d_vss08d_csr\",\n+\t\"vdd08d_vss08d_csr_extadc\",\n+\t\"hotpoint_temperature\",\n+\t\"phy_power_switch_port0\",\n+\t\"phy_power_switch_port1\",\n+\t\"mum_vcc\",\n+\t\"0v9_a\",\n+\t\"i0v9_a\",\n+\t\"0v9_a_temp\",\n+\t\"0v9_b\",\n+\t\"i0v9_b\",\n+\t\"0v9_b_temp\",\n+\t\"ccom_avreg_1v2_supply\",\n+\t\"ccom_avreg_1v2_supply_ext_adc\",\n+\t\"ccom_avreg_1v8_supply\",\n+\t\"ccom_avreg_1v8_supply_ext_adc\",\n+\t\"controller_master_vptat\",\n+\t\"controller_master_internal_temp\",\n+\t\"controller_master_vptat_ext_adc\",\n+\t\"controller_master_internal_temp_ext_adc\",\n+\t\"controller_slave_vptat\",\n+\t\"controller_slave_internal_temp\",\n+\t\"controller_slave_vptat_ext_adc\",\n+\t\"controller_slave_internal_temp_ext_adc\",\n+\t\"sodimm_vout\",\n+\t\"sodimm_0_temp\",\n+\t\"sodimm_1_temp\",\n+\t\"phy0_vcc\",\n+\t\"phy1_vcc\",\n+\t\"controller_tdiode_temp\",\n+\t\"board_front_temp\",\n+\t\"board_back_temp\",\n+};\n+\n+/* END MKCONFIG GENERATED MonitorStatNamesBlock */\n+\n+extern\t\t\t\t\tconst char *\n+efx_mon_stat_name(\n+\t__in\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\tefx_mon_stat_t id)\n+{\n+\t_NOTE(ARGUNUSED(enp))\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\n+\tEFSYS_ASSERT3U(id, <, EFX_MON_NSTATS);\n+\treturn (__mon_stat_name[id]);\n+}\n+\n+#endif\t/* EFSYS_OPT_NAMES */\n+\n+\t__checkReturn\t\t\tefx_rc_t\n+efx_mon_stats_update(\n+\t__in\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\tefsys_mem_t *esmp,\n+\t__inout_ecount(EFX_MON_NSTATS)\tefx_mon_stat_value_t *values)\n+{\n+\tefx_mon_t *emp = &(enp->en_mon);\n+\tconst efx_mon_ops_t *emop = emp->em_emop;\n+\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\tEFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MON);\n+\n+\treturn (emop->emo_stats_update(enp, esmp, values));\n+}\n+\n+#endif\t/* EFSYS_OPT_MON_STATS */\n+\n \t\tvoid\n efx_mon_fini(\n \t__in\tefx_nic_t *enp)\ndiff --git a/drivers/net/sfc/efx/base/siena_nic.c b/drivers/net/sfc/efx/base/siena_nic.c\nindex d28d1d2..5d0f6e8 100644\n--- a/drivers/net/sfc/efx/base/siena_nic.c\n+++ b/drivers/net/sfc/efx/base/siena_nic.c\n@@ -221,10 +221,19 @@ siena_nic_probe(\n \t\tgoto fail11;\n #endif\n \n+#if EFSYS_OPT_MON_STATS\n+\tif ((rc = mcdi_mon_cfg_build(enp)) != 0)\n+\t\tgoto fail12;\n+#endif\n+\n \tencp->enc_features = enp->en_features;\n \n \treturn (0);\n \n+#if EFSYS_OPT_MON_STATS\n+fail12:\n+\tEFSYS_PROBE(fail12);\n+#endif\n #if EFSYS_OPT_LOOPBACK\n fail11:\n \tEFSYS_PROBE(fail11);\n@@ -376,6 +385,9 @@ siena_nic_fini(\n siena_nic_unprobe(\n \t__in\t\tefx_nic_t *enp)\n {\n+#if EFSYS_OPT_MON_STATS\n+\tmcdi_mon_cfg_free(enp);\n+#endif /* EFSYS_OPT_MON_STATS */\n \t(void) efx_mcdi_drv_attach(enp, B_FALSE);\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "23/56"
    ]
}