[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9386184c-5925-aca4-e9f6-42cc56077c8d@blackwall.org>
Date: Thu, 17 Mar 2022 12:32:14 +0200
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Mattias Forsblad <mattias.forsblad@...il.com>,
netdev@...r.kernel.org
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Roopa Prabhu <roopa@...dia.com>,
Tobias Waldekranz <tobias@...dekranz.com>,
Joachim Wiberg <troglobit@...il.com>
Subject: Re: [PATCH 2/5] net: bridge: Implement bridge flood flag
On 17/03/2022 12:11, Nikolay Aleksandrov wrote:
> On 17/03/2022 08:50, Mattias Forsblad wrote:
>> This patch implements the bridge flood flags. There are three different
>> flags matching unicast, multicast and broadcast. When the corresponding
>> flag is cleared packets received on bridge ports will not be flooded
>> towards the bridge.
>> This makes is possible to only forward selected traffic between the
>> port members of the bridge.
>>
>> Signed-off-by: Mattias Forsblad <mattias.forsblad@...il.com>
>> ---
>> include/linux/if_bridge.h | 6 +++++
>> include/uapi/linux/if_bridge.h | 9 ++++++-
>> net/bridge/br.c | 45 ++++++++++++++++++++++++++++++++++
>> net/bridge/br_device.c | 3 +++
>> net/bridge/br_input.c | 23 ++++++++++++++---
>> net/bridge/br_private.h | 4 +++
>> 6 files changed, 85 insertions(+), 5 deletions(-)
>>
> Please always CC bridge maintainers for bridge patches.
>
> I almost missed this one. I'll add my reply to Joachim's notes
> which are pretty spot on.
>
>> diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
>> index 3aae023a9353..fa8e000a6fb9 100644
>> --- a/include/linux/if_bridge.h
>> +++ b/include/linux/if_bridge.h
>> @@ -157,6 +157,7 @@ static inline int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid,
>> struct net_device *br_fdb_find_port(const struct net_device *br_dev,
>> const unsigned char *addr,
>> __u16 vid);
>> +bool br_flood_enabled(const struct net_device *dev);
>> void br_fdb_clear_offload(const struct net_device *dev, u16 vid);
>> bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag);
>> u8 br_port_get_stp_state(const struct net_device *dev);
>> @@ -170,6 +171,11 @@ br_fdb_find_port(const struct net_device *br_dev,
>> return NULL;
>> }
>>
>> +static inline bool br_flood_enabled(const struct net_device *dev)
>> +{
>> + return true;
>> +}
>> +
>> static inline void br_fdb_clear_offload(const struct net_device *dev, u16 vid)
>> {
>> }
>> diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
>> index 2711c3522010..765ed70c9b28 100644
>> --- a/include/uapi/linux/if_bridge.h
>> +++ b/include/uapi/linux/if_bridge.h
>> @@ -72,6 +72,7 @@ struct __bridge_info {
>> __u32 tcn_timer_value;
>> __u32 topology_change_timer_value;
>> __u32 gc_timer_value;
>> + __u8 flood;
>> };
Replying to myself as this part was snipped from Joachim's comments.
You cannot change uapi structures.
Powered by blists - more mailing lists