RE: [PATCH net-next 5/5] net: renesas: rswitch: Use per-queue rate limiter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Simon-san,

> From: Simon Horman, Sent: Wednesday, May 31, 2023 4:29 AM
> 
> 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@xxxxxxxxxxx>
> > ---
> >  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;

Thank you for your comment! I completely forgot that network driver should use
reverse xmas tree order...

JFYI, I found another way to improve the performance. So, I dropped this patch on v2 [1].

[1] https://lore.kernel.org/all/20230606085558.1708766-1-yoshihiro.shimoda.uh@xxxxxxxxxxx/

Best regards,
Yoshihiro Shimoda

> --
> pw-bot: cr





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux