diff options
author | Andre Heider <a.heider@gmail.com> | 2021-10-03 12:07:41 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-10-21 00:17:36 +0200 |
commit | 70729d345414cdf1463dec042811813ff9a94e7a (patch) | |
tree | e1d98c41bf4b26c0850ebac171f8952f2c968f86 /package/network | |
parent | 276c80bdc02da59c2cafcfc874c9e7af0317e226 (diff) | |
download | upstream-70729d345414cdf1463dec042811813ff9a94e7a.tar.gz upstream-70729d345414cdf1463dec042811813ff9a94e7a.tar.bz2 upstream-70729d345414cdf1463dec042811813ff9a94e7a.zip |
ltq-vdsl-app: add error vector counters to the ubus metrics
These are useful stats to debug vector related line deteriorations,
see [0].
Example output:
"erb": {
"sent": 169925,
"discarded": 0
}
[0] https://forum.openwrt.org/t/vectoring-on-lantiq-vrx200-vr9-missing-callback-for-sending-error-samples/104046
Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c index ab18c9d4d6..707acdc606 100644 --- a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c +++ b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c @@ -502,6 +502,18 @@ static void get_vector_status(int fd, vector_t *status) { #endif } +static void vector_erb(int fd) { +#ifdef INCLUDE_DSL_CPE_API_VRX + if (fd < 0) + return; + + IOCTL(IOCTL_MEI_dsmStatistics_t, FIO_MEI_DSM_STATISTICS_GET); + + m_u32("sent", out.n_processed); + m_u32("discarded", out.n_fw_dropped_size + out.n_mei_dropped_size + out.n_mei_dropped_no_pp_cb + out.n_pp_dropped); +#endif +} + static void band_plan_status(int fd, profile_t *profile) { #if (INCLUDE_DSL_CPE_API_VDSL_SUPPORT == 1) IOCTL(DSL_BandPlanStatus_t, DSL_FIO_BAND_PLAN_STATUS_GET) @@ -803,6 +815,17 @@ static int metrics(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_close_table(&b, c2); blobmsg_close_table(&b, c); + switch (vector) { + case VECTOR_ON_DS: + case VECTOR_ON_DS_US: + c = blobmsg_open_table(&b, "erb"); + vector_erb(fd_mei); + blobmsg_close_table(&b, c); + break; + default: + break; + }; + ubus_send_reply(ctx, req, b.head); if (fd_mei >= 0) |