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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241021195140.442c0a4f@device-21.home>
Date: Mon, 21 Oct 2024 19:51:40 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Daniel Machon <daniel.machon@...rochip.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, <andrew@...n.ch>, Lars Povlsen
 <lars.povlsen@...rochip.com>, Steen Hegelund
 <Steen.Hegelund@...rochip.com>, <horatiu.vultur@...rochip.com>,
 <jensemil.schulzostergaard@...rochip.com>,
 <Parthiban.Veerasooran@...rochip.com>, <Raju.Lakkaraju@...rochip.com>,
 <UNGLinuxDriver@...rochip.com>, Richard Cochran <richardcochran@...il.com>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, <jacob.e.keller@...el.com>,
 <ast@...erby.net>, <netdev@...r.kernel.org>,
 <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
 <devicetree@...r.kernel.org>
Subject: Re: [PATCH net-next 11/15] net: lan969x: add function for
 calculating the DSM calendar

Hi Daniel,

On Mon, 21 Oct 2024 15:58:48 +0200
Daniel Machon <daniel.machon@...rochip.com> wrote:

> Lan969x has support for RedBox / HSR / PRP (not implemented yet). In
> order to accommodate for this in the future, we need to give lan969x it's
> own function for calculating the DSM calendar.
> 
> The function calculates the calendar for each taxi bus. The calendar is
> used for bandwidth allocation towards the ports attached to the taxi
> bus. A calendar configuration consists of up-to 64 slots, which may be
> allocated to ports or left unused. Each slot accounts for 1 clock cycle.
> 
> Also expose sparx5_cal_speed_to_value(), sparx5_get_port_cal_speed,
> sparx5_cal_bw and SPX5_DSM_CAL_EMPTY for use by lan969x.
> 
> Reviewed-by: Steen Hegelund <Steen.Hegelund@...rochip.com>
> Signed-off-by: Daniel Machon <daniel.machon@...rochip.com>

[...]

> +	/* Place the remaining devices */
> +	for (u32 i = 0; i < DSM_CAL_DEV_MAX; i++) {
> +		speed = &dev_speeds[i];
> +		for (u32 dev = 0; dev < speed->n_devs; dev++) {
> +			u32 idx = 0;
> +
> +			for (n_slots = 0; n_slots < speed->n_slots; n_slots++) {
> +				lan969x_dsm_cal_idx_find_next_free(data->schedule,
> +								   cal_len,
> +								   &idx);

You're not checking the return of lan969x_dsm_cal_idx_find_next_free(),
can this be a problem ?

Thanks,

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ