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: <20170427185912.GK17364@lunn.ch>
Date:   Thu, 27 Apr 2017 20:59:12 +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 08/18] net: dsa: mv88e6xxx: move generic VTU
 GetNext

On Wed, Apr 26, 2017 at 11:53:26AM -0400, Vivien Didelot wrote:
> Even though every switch model has a different way to access the VTU
> Data bits, the base implementation of the VTU GetNext operation remains
> the same: wait, write the first VID to iterate from, start the
> operation, and read the next VID.
> 
> Move this generic implementation into global_vtu.c and abstract the

global1_vtu.c

> +int mv88e6xxx_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
> +			     struct mv88e6xxx_vtu_entry *entry)
> +{
> +	int err;
> +
> +	err = mv88e6xxx_g1_vtu_op_wait(chip);
> +	if (err)
> +		return err;
> +
> +	/* Write the VID to iterate from only once */
> +	if (!entry->valid) {
> +		err = mv88e6xxx_g1_vtu_vid_write(chip, entry);
> +		if (err)
> +			return err;
> +	}

Please could you add a bigger comment. It is not clear why you write
it, when it is invalid. That just seems wrong, and needs a good
comment to explain why it is correct, more than what you currently
have as a comment.

Thanks
	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ