lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87373ndmbv.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date:   Wed, 03 Jan 2018 09:54:44 -0500
From:   Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:     Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        netdev <netdev@...r.kernel.org>,
        Russell King <rmk+kernel@....linux.org.uk>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next 3/5] net: dsa: mv88e6xxx: Allow the SERDES interfaces to have statistics

Hi Andrew,

Andrew Lunn <andrew@...n.ch> writes:

> When gettting the number of statistics, the strings and the actual

       getting
       
> statistics, call the SERDES ops if implemented. This means the stats
> code needs to return the number of strings/stats they have placed into
> the data, so that the SERDES strings/stats can follow on.
>  	/* Return the number of strings describing statistics */
>  	int (*stats_get_sset_count)(struct mv88e6xxx_chip *chip);
> -	void (*stats_get_strings)(struct mv88e6xxx_chip *chip,  uint8_t *data);
> -	void (*stats_get_stats)(struct mv88e6xxx_chip *chip,  int port,
> -				uint64_t *data);
> +	int (*stats_get_strings)(struct mv88e6xxx_chip *chip,  uint8_t *data);
> +	int (*stats_get_stats)(struct mv88e6xxx_chip *chip,  int port,
> +			       uint64_t *data);
>  	int (*set_cpu_port)(struct mv88e6xxx_chip *chip, int port);
>  	int (*set_egress_port)(struct mv88e6xxx_chip *chip, int port);
>  	const struct mv88e6xxx_irq_ops *watchdog_ops;
> @@ -337,6 +337,13 @@ struct mv88e6xxx_ops {
>  	/* Power on/off a SERDES interface */
>  	int (*serdes_power)(struct mv88e6xxx_chip *chip, int port, bool on);
>  
> +	/* Statistics from the SERDES interface */
> +	int (*serdes_get_sset_count)(struct mv88e6xxx_chip *chip, int port);
> +	void (*serdes_get_strings)(struct mv88e6xxx_chip *chip,  int port,
> +				   uint8_t *data);
> +	void (*serdes_get_stats)(struct mv88e6xxx_chip *chip,  int port,
> +				 uint64_t *data);
> +

Shouldn't serdes_get_{strings,stats} be symmetrical with
stats_get_{strings,stats} and return the count as well?


Thanks,

        Vivien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ