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: <20170217214909.GK6096@lunn.ch>
Date:   Fri, 17 Feb 2017 22:49:09 +0100
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 v2 5/6] net: dsa: mv88e6xxx: add VTU ops

On Fri, Feb 17, 2017 at 10:05:30AM -0500, Vivien Didelot wrote:
> Because there are several variant of the VTU operations and because
> checking for the presence of an STU is not enough, add new ops to the
> info structure to describe the VTU operations that a chip supports.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c      | 58 +++++++++++++++++++++++++----------
>  drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |  8 ++++-
>  2 files changed, 49 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 7010c3313e35..256a209eef9b 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -1220,33 +1220,19 @@ static void mv88e6xxx_port_fast_age(struct dsa_switch *ds, int port)
>  static int mv88e6xxx_vtu_getnext(struct mv88e6xxx_chip *chip,
>  				 struct mv88e6xxx_vtu_entry *entry)
>  {
> -	int err;
> -
>  	if (!mv88e6xxx_has_vtu(chip))
>  		return -EOPNOTSUPP;
>  
> -	if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_STU))
> -		err = mv88e6352_g1_vtu_getnext(chip, entry);
> -	else
> -		err = mv88e6185_g1_vtu_getnext(chip, entry);
> -
> -	return err;
> +	return chip->info->ops->vtu_getnext(chip, entry);
>  }

You appear to be taking out code you just added in the previous patch.

Please think about structuring these patches different. We want these
ops, but i don't think you have the best way of getting there.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ