diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2019-04-11 21:45:45 +0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-05-20 21:17:57 +0200 |
commit | 01c0d7f86f68ec355bb87b755d52c3dcf9fe68bd (patch) | |
tree | 9fa36eddb60ec6cae21bf66bd7da664d3f018e53 /target/linux/generic/files/drivers/net/phy/ar8327.c | |
parent | 107dc4326ccfaff27bd1e698b8bc7fb942233559 (diff) | |
download | upstream-01c0d7f86f68ec355bb87b755d52c3dcf9fe68bd.tar.gz upstream-01c0d7f86f68ec355bb87b755d52c3dcf9fe68bd.tar.bz2 upstream-01c0d7f86f68ec355bb87b755d52c3dcf9fe68bd.zip |
generic: ar8216: group MIB counters and use two basic ones only by default
There are too many MIB counters that almost nobody needs since commit
d6366ce3665f ("generic: ar8216: mib_work_func: read all port mibs
everytime").
In the worker function to poll MIB data, it deals with all ports instead
of only one port every time, which introduces too many mdio operations
that it becomes a heavy CPU load even on not-emulated MDIO bus.
This commit groups MIB counters and enable only TxBytes and RxGoodBytes
by default (both of which are necessary to get swconfig led working.)
and adds an swconfig attribute to allow enabling all counters if users
need them.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8327.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index c2964169eb..1878585b0c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -1330,6 +1330,13 @@ static const struct switch_attr ar8327_sw_attr_globals[] = { }, { .type = SWITCH_TYPE_INT, + .name = "ar8xxx_mib_type", + .description = "MIB type (0=basic 1=extended)", + .set = ar8xxx_sw_set_mib_type, + .get = ar8xxx_sw_get_mib_type + }, + { + .type = SWITCH_TYPE_INT, .name = "enable_mirror_rx", .description = "Enable mirroring of RX packets", .set = ar8xxx_sw_set_mirror_rx_enable, |