netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: Casper Andersson <casper@casan.se>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	<UNGLinuxDriver@microchip.com>,
	Horatiu Vultur <Horatiu.Vultur@microchip.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: sparx5: Support offloading of bridge port flooding flags
Date: Mon, 21 Feb 2022 08:59:30 +0100	[thread overview]
Message-ID: <8ec4fb94e694396ce6bdffab514ab1b47bec1a60.camel@microchip.com> (raw)
In-Reply-To: <20220217144534.sqntzdjltzvxslqo@wse-c0155>

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


      parent reply	other threads:[~2022-02-21  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=8ec4fb94e694396ce6bdffab514ab1b47bec1a60.camel@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=Horatiu.Vultur@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=casper@casan.se \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=lars.povlsen@microchip.com \
    --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).