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]
Date:   Thu, 30 Mar 2017 15:45:21 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with
 all ones

> +	for (dev = 0; dev < 32; ++dev) {
> +		for (port = 0; port < 16; ++port) {
> +			err = mv88e6xxx_pvt_map(chip, dev, port);
> +			if (err)
> +				return err;
> +		}
> +	}
> +
> +	return 0;

Hi Vivien

How about adding MV88E6XXX_MAX_PVT_SWITCHES and MV88E6XXX_MAX_PVT_PORTS?


> +static int mv88e6xxx_g2_pvt_op(struct mv88e6xxx_chip *chip, int src_dev,
> +			       int src_port, u16 op)
> +{
> +	int err;
> +
> +	/* 9-bit Cross-chip PVT pointer: with GLOBAL2_MISC_5_BIT_PORT cleared,
> +	 * source device is 5-bit, source port is 4-bit.
> +	 */
> +	op |= (src_dev & 0x1f) << 4;
> +	op |= (src_port & 0xf);

So here, are you hard coding the knowledge that we passed false to
mv88e6xxx_g2_misc_5_bit_port()?  It kind of defeats the point of
having the parameter. Maybe simplify the code and remove the
parameter?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ