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: <20201109174415.GD1456319@lunn.ch>
Date:   Mon, 9 Nov 2020 18:44:15 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Tobias Waldekranz <tobias@...dekranz.com>
Cc:     davem@...emloft.net, kuba@...nel.org, vivien.didelot@...il.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Export VTU as devlink
 region

>  static void
> @@ -574,9 +670,16 @@ static int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds,
>  		ops = mv88e6xxx_regions[i].ops;
>  		size = mv88e6xxx_regions[i].size;
>  
> -		if (i == MV88E6XXX_REGION_ATU)
> +		switch (i) {
> +		case MV88E6XXX_REGION_ATU:
>  			size = mv88e6xxx_num_databases(chip) *
>  				sizeof(struct mv88e6xxx_devlink_atu_entry);
> +			break;
> +		case MV88E6XXX_REGION_VTU:
> +			size = chip->info->max_vid *
> +				sizeof(struct mv88e6xxx_devlink_vtu_entry);
> +			break;
> +		}

Hi Tobias

Maybe as a follow up patch, add a helper to get
chip->info->max_vid. It seems like many of the other members have a
helper, so it would help keep things consistent.

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ