Ethernet Bridge development
 help / color / mirror / Atom feed
From: Yong Wang <yongwang@nvidia.com>
To: Nikolay Aleksandrov <razor@blackwall.org>,
	Petr Machata <petrm@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>,
	"bridge@lists.linux.dev" <bridge@lists.linux.dev>,
	Andy Roulin <aroulin@nvidia.com>, mlxsw <mlxsw@nvidia.com>,
	Nikhil Dhar <ndhar@nvidia.com>
Subject: Re: [PATCH net-next 1/3] net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions
Date: Sat, 19 Apr 2025 14:33:22 +0000	[thread overview]
Message-ID: <8F591F22-50C7-429E-AF42-BDFBE35FD10B@nvidia.com> (raw)
In-Reply-To: <8af190ea-5b12-4393-95ac-2bc5cf682c65@blackwall.org>

On 4/18/25, 11:38 PM, "Nikolay Aleksandrov" <razor@blackwall.org > wrote:

>On 4/17/25 16:43, Petr Machata wrote:
>> From: Yong Wang <yongwang@nvidia.com>
>>
>> When a bridge port STP state is changed from BLOCKING/DISABLED to
>> FORWARDING, the port's igmp query timer will NOT re-arm itself if the
>> bridge has been configured as per-VLAN multicast snooping.
>>
>> Solve this by choosing the correct multicast context(s) to enable/disable
>> port multicast based on whether per-VLAN multicast snooping is enabled or
>> not, i.e. using per-{port, VLAN} context in case of per-VLAN multicast
>> snooping by re-implementing br_multicast_enable_port() and
>> br_multicast_disable_port() functions.
>>
>> Before the patch, the IGMP query does not happen in the last step of the
>> following test sequence, i.e. no growth for tx counter:
>>  # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1
>>  # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0
>>  # ip link add name swp1 up master br1 type dummy
>>  # bridge link set dev swp1 state 0
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 1
>>  # sleep 1
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 1
>>  # bridge link set dev swp1 state 3
>>  # sleep 2
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 1
>>
>> After the patch, the IGMP query happens in the last step of the test:
>>  # ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 mcast_querier 1 mcast_stats_enabled 1
>>  # bridge vlan global set vid 1 dev br1 mcast_snooping 1 mcast_querier 1 mcast_query_interval 100 mcast_startup_query_count 0
>>  # ip link add name swp1 up master br1 type dummy
>>  # bridge link set dev swp1 state 0
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 1
>>  # sleep 1
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 1
>>  # bridge link set dev swp1 state 3
>>  # sleep 2
>>  # ip -j -p stats show dev swp1 group xstats_slave subgroup bridge suite mcast | jq '.[]["multicast"]["igmp_queries"]["tx_v2"]'
>> 3
>>
>> Signed-off-by: Yong Wang <yongwang@nvidia.com>
>> Reviewed-by: Andy Roulin <aroulin@nvidia.com>
>> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>> Signed-off-by: Petr Machata <petrm@nvidia.com>
>> ---
>>  net/bridge/br_multicast.c | 77 +++++++++++++++++++++++++++++++++++----
>>  1 file changed, 69 insertions(+), 8 deletions(-)
>>
>
>I feel like I've seen a similar patch before. Are you sure this is not v2? :)
>Anyway looks good to me. Thanks!
>
>Acked-by: Nikolay Aleksandrov <razor@blackwall.org>

Yes, this should be V2. Petr is helping upstreaming this patch. Thanks for your acknowledgement.



  reply	other threads:[~2025-04-19 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 13:43 [PATCH net-next 0/3] bridge: multicast: per vlan query improvement when port or vlan state changes Petr Machata
2025-04-17 13:43 ` [PATCH net-next 1/3] net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions Petr Machata
2025-04-19  6:38   ` Nikolay Aleksandrov
2025-04-19 14:33     ` Yong Wang [this message]
2025-04-22 12:20       ` Petr Machata
2025-04-17 13:43 ` [PATCH net-next 2/3] net: bridge: mcast: update multicast contex when vlan state is changed Petr Machata
2025-04-19  6:39   ` Nikolay Aleksandrov
2025-04-17 13:43 ` [PATCH net-next 3/3] selftests: net/bridge : add tests for per vlan snooping with stp state changes Petr Machata
2025-04-19  6:41   ` Nikolay Aleksandrov
2025-04-23 12:10 ` [PATCH net-next 0/3] bridge: multicast: per vlan query improvement when port or vlan " 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=8F591F22-50C7-429E-AF42-BDFBE35FD10B@nvidia.com \
    --to=yongwang@nvidia.com \
    --cc=aroulin@nvidia.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=ndhar@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.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