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  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]
Date:   Fri, 10 Mar 2017 01:29:28 +0100
From:   Andrew Lunn <>
To:     Vivien Didelot <>
        "David S. Miller" <>,
        Florian Fainelli <>
Subject: Re: [PATCH net-next 10/14] net: dsa: mv88e6xxx: rework port mode

Hi Vivien

> +static int mv88e6xxx_set_port_mode_normal(struct mv88e6xxx_chip *chip, int port)
> +{
> +	return mv88e6xxx_set_port_mode(chip, port, MV88E6XXX_FRAME_MODE_NORMAL,
> +				       PORT_CONTROL_EGRESS_UNMODIFIED, 0x9100);

It would be nice to replace this magic number with a #define. How does
the datasheet describe this? 0x9100 is ETH_P_QINQ1. Would that
actually fit?

> +static int mv88e6xxx_setup_port_mode(struct mv88e6xxx_chip *chip, int port)
> +{
> +	if (dsa_is_dsa_port(chip->ds, port))
> +		return mv88e6xxx_set_port_mode_dsa(chip, port);
> +
> +	if (!dsa_is_cpu_port(chip->ds, port))
> +		return mv88e6xxx_set_port_mode_normal(chip, port);

Maybe add a dsa_is_normal_port() helper? It just makes the code even
easier to read.


Powered by blists - more mailing lists