All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
@ 2022-02-17 14:45 Casper Andersson
  2022-02-18  4:18 ` Jakub Kicinski
  2022-02-21  7:59 ` Steen Hegelund
  0 siblings, 2 replies; 7+ messages in thread
From: Casper Andersson @ 2022-02-17 14:45 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Lars Povlsen, Steen Hegelund,
	UNGLinuxDriver
  Cc: netdev

Though the SparX-5i can control IPv4/6 multicasts separately from non-IP
multicasts, these are all muxed onto the bridge's BR_MCAST_FLOOD flag.

Signed-off-by: Casper Andersson <casper@casan.se>
---
 drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
index 649ca609884a..27a9eed38316 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
@@ -22,8 +22,15 @@ struct sparx5_switchdev_event_work {
 static void sparx5_port_attr_bridge_flags(struct sparx5_port *port,
 					  struct switchdev_brport_flags flags)
 {
+	int pgid;
+
 	if (flags.mask & BR_MCAST_FLOOD)
-		sparx5_pgid_update_mask(port, PGID_MC_FLOOD, true);
+		for (pgid = PGID_MC_FLOOD; pgid <= PGID_IPV6_MC_CTRL; pgid++)
+			sparx5_pgid_update_mask(port, pgid, !!(flags.val & BR_MCAST_FLOOD));
+	if (flags.mask & BR_FLOOD)
+		sparx5_pgid_update_mask(port, PGID_UC_FLOOD, !!(flags.val & BR_FLOOD));
+	if (flags.mask & BR_BCAST_FLOOD)
+		sparx5_pgid_update_mask(port, PGID_BCAST, !!(flags.val & BR_BCAST_FLOOD));
 }

 static void sparx5_attr_stp_state_set(struct sparx5_port *port,
--
2.30.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-17 14:45 [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags Casper Andersson
@ 2022-02-18  4:18 ` Jakub Kicinski
  2022-02-18  9:01   ` Casper Andersson
  2022-02-21  7:59 ` Steen Hegelund
  1 sibling, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2022-02-18  4:18 UTC (permalink / raw)
  To: Casper Andersson
  Cc: David S. Miller, Lars Povlsen, Steen Hegelund, UNGLinuxDriver, netdev

On Thu, 17 Feb 2022 14:45:38 +0000 Casper Andersson wrote:

Can others see this patch? My email client apparently does not have
enough PGP support enabled. I'm worried I'm not the only one. That said
lore and patchwork seem to have gotten it just fine:

https://lore.kernel.org/all/20220217144534.sqntzdjltzvxslqo@wse-c0155/
https://patchwork.kernel.org/project/netdevbpf/patch/20220217144534.sqntzdjltzvxslqo@wse-c0155/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-18  4:18 ` Jakub Kicinski
@ 2022-02-18  9:01   ` Casper Andersson
  2022-02-19  4:26     ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Casper Andersson @ 2022-02-18  9:01 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David S. Miller, Lars Povlsen, Steen Hegelund, UNGLinuxDriver, netdev

On 22/02/17 08:18, Jakub Kicinski wrote:
> On Thu, 17 Feb 2022 14:45:38 +0000 Casper Andersson wrote:
>
> Can others see this patch? My email client apparently does not have
> enough PGP support enabled. I'm worried I'm not the only one. That said
> lore and patchwork seem to have gotten it just fine:
>
> https://lore.kernel.org/all/20220217144534.sqntzdjltzvxslqo@wse-c0155/
> https://patchwork.kernel.org/project/netdevbpf/patch/20220217144534.sqntzdjltzvxslqo@wse-c0155/

I apologize. This seems to be Protonmail's doing. When I look at the
web interface for Protonmail I can see that you are the only recipient
it says PGP encrypted for. This is probably because Protonmail will
automatically encrypt when both ends use Protonmail. Though I do not see
this indication on your reply. I tried switching to PGP/Inline instead
of PGP/MIME for this message. I hope this works.  Otherwise, I can
resubmit this patch using another email address. I did not find a way
to disable the automatic encryption. Or if you have any other
suggestions to get around this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-18  9:01   ` Casper Andersson
@ 2022-02-19  4:26     ` Jakub Kicinski
  2022-02-19 14:56       ` Horatiu Vultur
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2022-02-19  4:26 UTC (permalink / raw)
  To: Casper Andersson, Steen Hegelund
  Cc: David S. Miller, Lars Povlsen, UNGLinuxDriver, netdev

On Fri, 18 Feb 2022 09:01:30 +0000 Casper Andersson wrote:
> On 22/02/17 08:18, Jakub Kicinski wrote:
> > On Thu, 17 Feb 2022 14:45:38 +0000 Casper Andersson wrote:
> >
> > Can others see this patch? My email client apparently does not have
> > enough PGP support enabled. I'm worried I'm not the only one. That said
> > lore and patchwork seem to have gotten it just fine:
> >
> > https://lore.kernel.org/all/20220217144534.sqntzdjltzvxslqo@wse-c0155/
> > https://patchwork.kernel.org/project/netdevbpf/patch/20220217144534.sqntzdjltzvxslqo@wse-c0155/  
> 
> I apologize. This seems to be Protonmail's doing. When I look at the
> web interface for Protonmail I can see that you are the only recipient
> it says PGP encrypted for. This is probably because Protonmail will
> automatically encrypt when both ends use Protonmail. Though I do not see
> this indication on your reply. I tried switching to PGP/Inline instead
> of PGP/MIME for this message. I hope this works.  Otherwise, I can
> resubmit this patch using another email address. I did not find a way
> to disable the automatic encryption. Or if you have any other
> suggestions to get around this.

If I'm the only one who didn't get the plain text version - it's not 
a big deal.

Steen, can we get a review? 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-19  4:26     ` Jakub Kicinski
@ 2022-02-19 14:56       ` Horatiu Vultur
  2022-02-22 18:30         ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Horatiu Vultur @ 2022-02-19 14:56 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Casper Andersson, Steen Hegelund, David S. Miller, Lars Povlsen,
	UNGLinuxDriver, netdev

The 02/18/2022 20:26, Jakub Kicinski wrote:

Hi

> 
> On Fri, 18 Feb 2022 09:01:30 +0000 Casper Andersson wrote:
> > On 22/02/17 08:18, Jakub Kicinski wrote:
> > > On Thu, 17 Feb 2022 14:45:38 +0000 Casper Andersson wrote:
> > >
> > > Can others see this patch? My email client apparently does not have
> > > enough PGP support enabled. I'm worried I'm not the only one. That said
> > > lore and patchwork seem to have gotten it just fine:
> > >
> > > https://lore.kernel.org/all/20220217144534.sqntzdjltzvxslqo@wse-c0155/
> > > https://patchwork.kernel.org/project/netdevbpf/patch/20220217144534.sqntzdjltzvxslqo@wse-c0155/
> >
> > I apologize. This seems to be Protonmail's doing. When I look at the
> > web interface for Protonmail I can see that you are the only recipient
> > it says PGP encrypted for. This is probably because Protonmail will
> > automatically encrypt when both ends use Protonmail. Though I do not see
> > this indication on your reply. I tried switching to PGP/Inline instead
> > of PGP/MIME for this message. I hope this works.  Otherwise, I can
> > resubmit this patch using another email address. I did not find a way
> > to disable the automatic encryption. Or if you have any other
> > suggestions to get around this.
> 
> If I'm the only one who didn't get the plain text version - it's not
> a big deal.

I also have problems seeing Casper's patch.

The only comment that I have to the patch, it would be nice to implement
also the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS callback. But I presume
that can be added later on.

> 
> Steen, can we get a review?

-- 
/Horatiu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-17 14:45 [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags Casper Andersson
  2022-02-18  4:18 ` Jakub Kicinski
@ 2022-02-21  7:59 ` Steen Hegelund
  1 sibling, 0 replies; 7+ messages in thread
From: Steen Hegelund @ 2022-02-21  7:59 UTC (permalink / raw)
  To: Casper Andersson, David S. Miller, Jakub Kicinski, Lars Povlsen,
	UNGLinuxDriver, Horatiu Vultur
  Cc: netdev

On Thu, 2022-02-17 at 14:45 +0000, Casper Andersson wrote:
> [Some people who received this message don't often get email from casper@casan.se. Learn why this
> is important at http://aka.ms/LearnAboutSenderIdentification.]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Though the SparX-5i can control IPv4/6 multicasts separately from non-IP
> multicasts, these are all muxed onto the bridge's BR_MCAST_FLOOD flag.
> 
> Signed-off-by: Casper Andersson <casper@casan.se>
> ---
>  drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
> b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
> index 649ca609884a..27a9eed38316 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
> @@ -22,8 +22,15 @@ struct sparx5_switchdev_event_work {
>  static void sparx5_port_attr_bridge_flags(struct sparx5_port *port,
>                                           struct switchdev_brport_flags flags)
>  {
> +       int pgid;
> +
>         if (flags.mask & BR_MCAST_FLOOD)
> -               sparx5_pgid_update_mask(port, PGID_MC_FLOOD, true);
> +               for (pgid = PGID_MC_FLOOD; pgid <= PGID_IPV6_MC_CTRL; pgid++)
> +                       sparx5_pgid_update_mask(port, pgid, !!(flags.val & BR_MCAST_FLOOD));
> +       if (flags.mask & BR_FLOOD)
> +               sparx5_pgid_update_mask(port, PGID_UC_FLOOD, !!(flags.val & BR_FLOOD));
> +       if (flags.mask & BR_BCAST_FLOOD)
> +               sparx5_pgid_update_mask(port, PGID_BCAST, !!(flags.val & BR_BCAST_FLOOD));
>  }
> 
>  static void sparx5_attr_stp_state_set(struct sparx5_port *port,
> --
> 2.30.2
> 
> 

Reviewed-by: Steen Hegelund <steen.hegelund@microchip.com>

BR
Steen


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
  2022-02-19 14:56       ` Horatiu Vultur
@ 2022-02-22 18:30         ` Jakub Kicinski
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2022-02-22 18:30 UTC (permalink / raw)
  To: Horatiu Vultur, Casper Andersson
  Cc: Steen Hegelund, David S. Miller, Lars Povlsen, UNGLinuxDriver, netdev

On Sat, 19 Feb 2022 15:56:48 +0100 Horatiu Vultur wrote:
> The 02/18/2022 20:26, Jakub Kicinski wrote:
> > > I apologize. This seems to be Protonmail's doing. When I look at the
> > > web interface for Protonmail I can see that you are the only recipient
> > > it says PGP encrypted for. This is probably because Protonmail will
> > > automatically encrypt when both ends use Protonmail. Though I do not see
> > > this indication on your reply. I tried switching to PGP/Inline instead
> > > of PGP/MIME for this message. I hope this works.  Otherwise, I can
> > > resubmit this patch using another email address. I did not find a way
> > > to disable the automatic encryption. Or if you have any other
> > > suggestions to get around this.  
> > 
> > If I'm the only one who didn't get the plain text version - it's not
> > a big deal.  
> 
> I also have problems seeing Casper's patch.

Looks like Dave marked the patch as Changes Requested in patchwork.
Casper, could you repost after all?

> The only comment that I have to the patch, it would be nice to implement
> also the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS callback. But I presume
> that can be added later on.

Perhaps making it a two patch series and also addressing Horatiu's
request?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-22 18:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 14:45 [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags Casper Andersson
2022-02-18  4:18 ` Jakub Kicinski
2022-02-18  9:01   ` Casper Andersson
2022-02-19  4:26     ` Jakub Kicinski
2022-02-19 14:56       ` Horatiu Vultur
2022-02-22 18:30         ` Jakub Kicinski
2022-02-21  7:59 ` Steen Hegelund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.