linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>
Subject: Re: [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload
Date: Mon, 17 Jan 2022 13:00:35 +0000	[thread overview]
Message-ID: <20220117130034.jzm72mj42354y6fe@skbuf> (raw)
In-Reply-To: <20220117125300.2399394-1-horatiu.vultur@microchip.com>

On Mon, Jan 17, 2022 at 01:53:00PM +0100, Horatiu Vultur wrote:
> In the blamed commit, the call to the function
> switchdev_bridge_port_offload was passing the wrong argument for
> atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
> This patch fixes this issue.
> 
> Fixes: 4e51bf44a03af6 ("net: bridge: move the switchdev object replay helpers to "push" mode")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  drivers/net/ethernet/mscc/ocelot_net.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
> index 8115c3db252e..e271b6225b72 100644
> --- a/drivers/net/ethernet/mscc/ocelot_net.c
> +++ b/drivers/net/ethernet/mscc/ocelot_net.c
> @@ -1187,7 +1187,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
>  	ocelot_port_bridge_join(ocelot, port, bridge);
>  
>  	err = switchdev_bridge_port_offload(brport_dev, dev, priv,
> -					    &ocelot_netdevice_nb,
> +					    &ocelot_switchdev_nb,
>  					    &ocelot_switchdev_blocking_nb,
>  					    false, extack);
>  	if (err)
> @@ -1201,7 +1201,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
>  
>  err_switchdev_sync:
>  	switchdev_bridge_port_unoffload(brport_dev, priv,
> -					&ocelot_netdevice_nb,
> +					&ocelot_switchdev_nb,
>  					&ocelot_switchdev_blocking_nb);
>  err_switchdev_offload:
>  	ocelot_port_bridge_leave(ocelot, port, bridge);
> @@ -1214,7 +1214,7 @@ static void ocelot_netdevice_pre_bridge_leave(struct net_device *dev,
>  	struct ocelot_port_private *priv = netdev_priv(dev);
>  
>  	switchdev_bridge_port_unoffload(brport_dev, priv,
> -					&ocelot_netdevice_nb,
> +					&ocelot_switchdev_nb,
>  					&ocelot_switchdev_blocking_nb);
>  }
>  
> -- 
> 2.33.0
>

Oh my... I remember noticing this issue when preparing those patches,
and also noticed that ocelot doesn't implement SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE
anyway. So I wanted to pass NULL anyway. I don't know what happened,
I must have made the fixup on a branch which wasn't the branch that I posted.
Anyway.

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

  reply	other threads:[~2022-01-17 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 12:53 [PATCH net] net: ocelot: Fix the call to switchdev_bridge_port_offload Horatiu Vultur
2022-01-17 13:00 ` Vladimir Oltean [this message]
2022-01-17 13:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220117130034.jzm72mj42354y6fe@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).