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] [day] [month] [year] [list]
Message-ID:
 <TY4PR01MB14282AA649A90842E68F1E99E821AA@TY4PR01MB14282.jpnprd01.prod.outlook.com>
Date: Tue, 30 Sep 2025 11:36:07 +0000
From: Michael Dege <michael.dege@...esas.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, Yoshihiro Shimoda
	<yoshihiro.shimoda.uh@...esas.com>, niklas.soderlund
	<niklas.soderlund@...natech.se>, Paul Barker <paul@...rker.dev>, Andrew Lunn
	<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Nikita
 Yushchenko <nikita.yoush@...entembedded.com>
Subject: RE: [PATCH net-next v5 3/4] net: renesas: rswitch: add offloading for
 L2 switching



> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Sent: Monday, September 29, 2025 7:08 PM
> To: Michael Dege <michael.dege@...esas.com>; Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>;
> niklas.soderlund <niklas.soderlund@...natech.se>; Paul Barker <paul@...rker.dev>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>;
> Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>
> Cc: netdev@...r.kernel.org; linux-renesas-soc@...r.kernel.org; linux-kernel@...r.kernel.org; Nikita
> Yushchenko <nikita.yoush@...entembedded.com>
> Subject: Re: [PATCH net-next v5 3/4] net: renesas: rswitch: add offloading for L2 switching
>
> Le 01/09/2025 à 06:58, Michael Dege a écrit :
> > Add hardware offloading for L2 switching on R-Car S4.
> >
> > On S4 brdev is limited to one per-device (not per port). Reasoning is
> > that hw L2 forwarding support lacks any sort of source port based
> > filtering, which makes it unusable to offload more than one bridge
> > device. Either you allow hardware to forward destination MAC to a
> > port, or you have to send it to CPU. You can't make it forward only if
> > src and dst ports are in the same brdev.
> >
> > Signed-off-by: Nikita Yushchenko <nikita.yoush@...entembedded.com>
> > Signed-off-by: Michael Dege <michael.dege@...esas.com>
>
> ...
>
> > @@ -2153,6 +2210,8 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
> >     if (!priv->gwca.queues)
> >             return -ENOMEM;
> >
> > +   INIT_LIST_HEAD(&priv->port_list);
> > +
> >     pm_runtime_enable(&pdev->dev);
> >     pm_runtime_get_sync(&pdev->dev);
> >
> > @@ -2163,6 +2222,15 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
> >             return ret;
> >     }
> >
> > +   if (list_empty(&priv->port_list))
> > +           dev_warn(&pdev->dev, "could not initialize any ports\n");
> > +
> > +   ret = rswitch_register_notifiers();
> > +   if (ret) {
> > +           dev_err(&pdev->dev, "could not register notifiers\n");
> > +           return ret;
> > +   }
>
> The error handling of the probe should be updated, as done in the remove function.
>
> net-next is closed, so I'm just posting here
>
> CJ
>
Hello Christophe,

Thank you for your comment. I will look at your proposal and add it to the next patch set.

Michael

> > +
> >     device_set_wakeup_capable(&pdev->dev, 1);
> >
> >     return ret;
> > @@ -2196,6 +2264,7 @@ static void renesas_eth_sw_remove(struct platform_device *pdev)
> >   {
> >     struct rswitch_private *priv = platform_get_drvdata(pdev);
> >
> > +   rswitch_unregister_notifiers();
> >     rswitch_deinit(priv);
> >
> >     pm_runtime_put(&pdev->dev);
> >
>
>
> The proposed fix would be:
>
> diff --git a/drivers/net/ethernet/renesas/rswitch_main.c
> b/drivers/net/ethernet/renesas/rswitch_main.c
> index 8d8acc2124b8..0f17c2e12cea 100644
> --- a/drivers/net/ethernet/renesas/rswitch_main.c
> +++ b/drivers/net/ethernet/renesas/rswitch_main.c
> @@ -2213,11 +2213,8 @@ static int renesas_eth_sw_probe(struct platform_device *pdev)
>          pm_runtime_get_sync(&pdev->dev);
>
>          ret = rswitch_init(priv);
> -       if (ret < 0) {
> -               pm_runtime_put(&pdev->dev);
> -               pm_runtime_disable(&pdev->dev);
> -               return ret;
> -       }
> +       if (ret < 0)
> +               goto err_disable_pm_runtime;
>
>          if (list_empty(&priv->port_list))
>                  dev_warn(&pdev->dev, "could not initialize any ports\n"); @@ -2225,11 +2222,19 @@
> static int renesas_eth_sw_probe(struct platform_device *pdev)
>          ret = rswitch_register_notifiers();
>          if (ret) {
>                  dev_err(&pdev->dev, "could not register notifiers\n");
> -               return ret;
> +               goto err_deinit_rswitch;
>          }
>
>          device_set_wakeup_capable(&pdev->dev, 1);
>
> +       return 0;
> +
> +err_deinit_rswitch:
> +       rswitch_deinit(priv);
> +err_disable_pm_runtime:
> +       pm_runtime_put(&pdev->dev);
> +       pm_runtime_disable(&pdev->dev);
> +
>          return ret;
>   }
>
>
>

________________________________

Renesas Electronics Europe GmbH
Registered Office: Arcadiastrasse 10
DE-40472 Duesseldorf
Commercial Registry: Duesseldorf, HRB 3708
Managing Director: Carsten Jauch
VAT-No.: DE 14978647
Tax-ID-No: 105/5839/1793

Legal Disclaimer: This e-mail communication (and any attachment/s) is confidential and contains proprietary information, some or all of which may be legally privileged. It is intended solely for the use of the individual or entity to which it is addressed. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ