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]
Date: Tue, 30 May 2023 21:29:21 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc: s.shtylyov@....ru, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	geert+renesas@...der.be, magnus.damm@...il.com,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH net-next 5/5] net: renesas: rswitch: Use per-queue rate
 limiter

On Mon, May 29, 2023 at 05:08:40PM +0900, Yoshihiro Shimoda wrote:
> Use per-queue rate limiter instead of global rate limiter. Otherwise
> TX performance will be low when we use multiple ports at the same time.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
> ---
>  drivers/net/ethernet/renesas/rswitch.c | 51 +++++++++++++++++---------
>  drivers/net/ethernet/renesas/rswitch.h | 15 +++++++-
>  2 files changed, 47 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
> index 4ae34b0206cd..a7195625a2c7 100644
> --- a/drivers/net/ethernet/renesas/rswitch.c
> +++ b/drivers/net/ethernet/renesas/rswitch.c
> @@ -156,22 +156,31 @@ static int rswitch_gwca_axi_ram_reset(struct rswitch_private *priv)
>  	return rswitch_reg_wait(priv->addr, GWARIRM, GWARIRM_ARR, GWARIRM_ARR);
>  }
>  
> -static void rswitch_gwca_set_rate_limit(struct rswitch_private *priv, int rate)
> +static void rswitch_gwca_set_rate_limit(struct rswitch_private *priv,
> +					struct rswitch_gwca_queue *txq)
>  {
> -	u32 gwgrlulc, gwgrlc;
> +	u64 period_ps;
> +	unsigned long rate;
> +	u32 gwrlc;

Hi Shimoda-san,

a minor not from my side: please use reverse xmas tree order - longest line
to shortest - for local variable declarations in networking code.

	unsigned long rate;
	u64 period_ps;
	u32 gwrlc;

-- 
pw-bot: cr


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ