diff mbox series

[net-next,2/4] bridge: mcast: Remove pointless sequence generation counter assignment

Message ID 20230209071852.613102-3-idosch@nvidia.com (mailing list archive)
State Accepted
Commit 7ea829664d3ce1977c310d532d5494ce3ec8592a
Delegated to: Netdev Maintainers
Headers show
Series bridge: mcast: Preparations for VXLAN MDB | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ido Schimmel Feb. 9, 2023, 7:18 a.m. UTC
The purpose of the sequence generation counter in the netlink callback
is to identify if a multipart dump is consistent or not by calling
nl_dump_check_consistent() whenever a message is generated.

The function is not invoked by the MDB code, rendering the sequence
generation counter assignment pointless. Remove it.

Note that even if the function was invoked, we still could not
accurately determine if the dump is consistent or not, as there is no
sequence generation counter for MDB entries, unlike nexthop objects, for
example.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 net/bridge/br_mdb.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Nikolay Aleksandrov Feb. 9, 2023, 8:19 a.m. UTC | #1
On 2/9/23 09:18, Ido Schimmel wrote:
> The purpose of the sequence generation counter in the netlink callback
> is to identify if a multipart dump is consistent or not by calling
> nl_dump_check_consistent() whenever a message is generated.
> 
> The function is not invoked by the MDB code, rendering the sequence
> generation counter assignment pointless. Remove it.
> 
> Note that even if the function was invoked, we still could not
> accurately determine if the dump is consistent or not, as there is no
> sequence generation counter for MDB entries, unlike nexthop objects, for
> example.
> 
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
>   net/bridge/br_mdb.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
> index 13076206e497..96f36febfb30 100644
> --- a/net/bridge/br_mdb.c
> +++ b/net/bridge/br_mdb.c
> @@ -421,8 +421,6 @@ static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
>   
>   	rcu_read_lock();
>   
> -	cb->seq = net->dev_base_seq;
> -
>   	for_each_netdev_rcu(net, dev) {
>   		if (netif_is_bridge_master(dev)) {
>   			struct net_bridge *br = netdev_priv(dev);


Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
diff mbox series

Patch

diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 13076206e497..96f36febfb30 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -421,8 +421,6 @@  static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
 
 	rcu_read_lock();
 
-	cb->seq = net->dev_base_seq;
-
 	for_each_netdev_rcu(net, dev) {
 		if (netif_is_bridge_master(dev)) {
 			struct net_bridge *br = netdev_priv(dev);