Re: [PATCH iproute2-next v3 2/2] bridge: vlan: add compressvlans manpage

2024-03-28 Thread Stephen Hemminger
On Mon, 25 Mar 2024 13:49:16 +0800 Date Huang wrote: > Add the missing 'compressvlans' to man page > > Signed-off-by: Date Huang > --- Marked this as superseded since your previous man page patch is already merged in iproute2 (not next). If you want to update that send another patch.

Re: [PATCH iproute2-next v2 2/2] bridge: vlan: fix compressvlans usage

2024-03-22 Thread Stephen Hemminger
On Fri, 22 Mar 2024 20:39:23 +0800 Date Huang wrote: > diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 > index eeea4073..bb02bd27 100644 > --- a/man/man8/bridge.8 > +++ b/man/man8/bridge.8 > @@ -22,6 +22,7 @@ bridge \- show / manipulate bridge addresses and devices >

[Bridge] Fw: [Bug 218047] New: linux network bridge kernel set group_fwd_mask 65535

2023-10-26 Thread Stephen Hemminger via Bridge
The kernel intentionally does not allow forwarding of IEEE pause frames. These need to be handled dropped in the bridge. Any mask without bit 1 set should work. Originally LACP, STP and MACPAUSE frames were always blocked and could not be changed. The restriction was relaxed for LACP and STP

Re: [Bridge] [PATCH iproute2-next 1/2] configure: add the --color option

2023-09-15 Thread Stephen Hemminger via Bridge
On Wed, 13 Sep 2023 19:58:25 +0200 Andrea Claudi wrote: > This commit allows users/packagers to choose a default for the color > output feature provided by some iproute2 tools. > > The configure script option is documented in the script itself and it is > pretty much self-explanatory. The

Re: [Bridge] Getting + maintaining a consistent MDB view in userspace?

2023-08-07 Thread Stephen Hemminger via Bridge
On Tue, 8 Aug 2023 02:29:09 +0200 Linus Lüssing wrote: > Hi, > > Is there a recommended way to get and monitor the MDB state from > userspace, without potential synchronization races? > > I can use "bridge monitor mdb" to get changes or "bridge mdb show" > to get the current state (as well as

[Bridge] [PATCH iproute2 3/7] bridge: make print_vlan_info static

2023-06-01 Thread Stephen Hemminger via Bridge
Function defined and used in only one file. Signed-off-by: Stephen Hemminger --- bridge/br_common.h | 1 - bridge/vlan.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/br_common.h b/bridge/br_common.h index 1bdee65844c1..704e76b0acb2 100644 --- a/bridge

Re: [Bridge] [PATCH net-next 2/2] bridge: Add a sysctl to limit new brides FDB entries

2023-05-15 Thread Stephen Hemminger via Bridge
On Mon, 15 May 2023 10:50:46 +0200 Johannes Nixdorf wrote: > +static struct ctl_table br_sysctl_table[] = { > + { > + .procname = "bridge-fdb-max-entries-default", That name is too long. Also, all the rest of bridge code does not use sysctl's. Why is this special and why

Re: [Bridge] [Question] Any plan to write/update the bridge doc?

2023-04-24 Thread Stephen Hemminger via Bridge
On Mon, 24 Apr 2023 14:28:00 -0700 Jakub Kicinski wrote: > On Mon, 24 Apr 2023 17:25:08 +0800 Hangbin Liu wrote: > > Maybe someone already has asked. The only official Linux bridge document I > > got is a very ancient wiki page[1] or the ip link man page[2][3]. As there > > are > > many bridge

Re: [Bridge] [Question] Any plan to write/update the bridge doc?

2023-04-24 Thread Stephen Hemminger via Bridge
On Mon, 24 Apr 2023 18:46:53 +0300 Ido Schimmel wrote: > On Mon, Apr 24, 2023 at 05:25:08PM +0800, Hangbin Liu wrote: > > Hi, > > > > Maybe someone already has asked. The only official Linux bridge document I > > got is a very ancient wiki page[1] or the ip link man page[2][3]. As there > >

Re: [Bridge] [PATCH net-next 01/16] net: bridge: Set strict_start_type at two policies

2023-01-26 Thread Stephen Hemminger via Bridge
On Thu, 26 Jan 2023 18:01:09 +0100 Petr Machata wrote: > static const struct nla_policy br_port_policy[IFLA_BRPORT_MAX + 1] = { > + [IFLA_BRPORT_UNSPEC]= { .strict_start_type = > + IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT + 1 }, Is the original IFLA_BRPORT

Re: [Bridge] How to connect more than 200 interfaces to a bridge

2022-11-09 Thread Stephen Hemminger via Bridge
On Wed, 09 Nov 2022 19:25:32 + Ali Shirvani wrote: > Sent with Proton Mail secure email. > > --- Original Message --- > On Wednesday, November 9th, 2022 at 8:21 PM, Stephen Hemminger > wrote: > > > > On Wed, 09 Nov 2022 10:51:27 + > &g

Re: [Bridge] How to connect more than 200 interfaces to a bridge

2022-11-09 Thread Stephen Hemminger via Bridge
On Wed, 09 Nov 2022 19:25:32 + Ali Shirvani wrote: > Sent with Proton Mail secure email. > > --- Original Message --- > On Wednesday, November 9th, 2022 at 8:21 PM, Stephen Hemminger > wrote: > > > > On Wed, 09 Nov 2022 10:51:27 + > &g

Re: [Bridge] How to connect more than 200 interfaces to a bridge

2022-11-09 Thread Stephen Hemminger via Bridge
On Wed, 09 Nov 2022 10:51:27 + Ali Shirvani via Bridge wrote: > Hello everyone, > > It seems we reach the Linux bridge limitation on the number of interfaces in > a single bridge. Currently, we have 210 tap interface in a bridge, and we > suffer from more than 50% packet loss when we ping

Re: [Bridge] [PATCH iproute2-next 2/2] bridge: fdb: enable FDB blackhole feature

2022-09-29 Thread Stephen Hemminger via Bridge
On Thu, 29 Sep 2022 17:21:37 +0200 Hans Schultz wrote: > > @@ -493,6 +496,8 @@ static int fdb_modify(int cmd, int flags, int argc, char > **argv) > req.ndm.ndm_flags |= NTF_EXT_LEARNED; > } else if (matches(*argv, "sticky") == 0) { >

Re: [Bridge] [PATCH RFC] net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.

2022-05-06 Thread Stephen Hemminger
On Fri, 6 May 2022 03:18:22 +0200 Andrew Lunn wrote: > On Thu, May 05, 2022 at 04:07:20PM -0700, Stephen Hemminger wrote: > > On Fri, 6 May 2022 00:59:04 +0200 > > Andrew Lunn wrote: > > > > > It is possible to stack bridges on top of each other. Consider the &

Re: [Bridge] [PATCH RFC] net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.

2022-05-05 Thread Stephen Hemminger
On Fri, 6 May 2022 00:59:04 +0200 Andrew Lunn wrote: > It is possible to stack bridges on top of each other. Consider the > following which makes use of an Ethernet switch: > >br1 > /\ > / \ >/\ > br0.11wlan0 >| >br0 > / | \ > p1 p2 p3 >

Re: [Bridge] [PATCH net-next v4 2/2] net: vxlan: vxlan_core.c: Add extack support to vxlan_fdb_delete

2022-04-25 Thread Stephen Hemminger
On Mon, 25 Apr 2022 16:25:07 +0200 Alaa Mohamed wrote: > static int vxlan_fdb_parse(struct nlattr *tb[], struct vxlan_dev *vxlan, > union vxlan_addr *ip, __be16 *port, __be32 *src_vni, > -__be32 *vni, u32 *ifindex, u32 *nhid) > +

Re: [Bridge] [PATCH] decouple llc/bridge

2022-04-08 Thread Stephen Hemminger
On Thu, 7 Apr 2022 19:48:59 -0700 Jakub Kicinski wrote: > On Thu, 7 Apr 2022 09:16:40 -0700 Stephen Hemminger wrote: > > > I was wondering why the llc code was getting compiled and it turned out > > > to be because I had bridging enabled. It turns out to only needs it for &g

Re: [Bridge] [PATCH] decouple llc/bridge

2022-04-07 Thread Stephen Hemminger
On Thu, 7 Apr 2022 11:12:17 -0400 Dave Jones wrote: > I was wondering why the llc code was getting compiled and it turned out > to be because I had bridging enabled. It turns out to only needs it for > a single function (llc_mac_hdr_init). > > Converting this to a static inline like the other

Re: [Bridge] [PATCH v2 net-next 00/10] net: bridge: Multiple Spanning Trees

2022-03-01 Thread Stephen Hemminger
On Tue, 1 Mar 2022 18:21:42 +0200 Vladimir Oltean wrote: > Hi Tobias, > > On Tue, Mar 01, 2022 at 11:03:11AM +0100, Tobias Waldekranz wrote: > > A proposal for the corresponding iproute2 interface is available here: > > > > https://github.com/wkz/iproute2/tree/mst > > Please pardon my

Re: [Bridge] [PATCH net-next 1/4] net: bridge: Add support for bridge port in locked mode

2022-02-07 Thread Stephen Hemminger
On Mon, 7 Feb 2022 11:07:39 +0100 Hans Schultz wrote: > --- a/include/uapi/linux/if_link.h > +++ b/include/uapi/linux/if_link.h > @@ -532,6 +532,7 @@ enum { > IFLA_BRPORT_GROUP_FWD_MASK, > IFLA_BRPORT_NEIGH_SUPPRESS, > IFLA_BRPORT_ISOLATED, > + IFLA_BRPORT_LOCKED, >

Re: [Bridge] [PATCH net] net: bridge: mcast: Do not allow users to set IGMP counter/timer to zero

2021-10-20 Thread Stephen Hemminger
On Wed, 20 Oct 2021 09:02:01 +0800 Hangbin Liu wrote: > On Tue, Oct 19, 2021 at 07:09:42PM +0300, Nikolay Aleksandrov wrote: > > > I started this patch when I saw there is not limit for setting > > > multicast_membership_interval to 0, which will cause bridge remove the > > > mdb directly after

Re: [Bridge] net: bridge: multicast: Renaming of flag BRIDGE_IGMP_SNOOPING

2021-06-07 Thread Stephen Hemminger
On Mon, 7 Jun 2021 21:29:34 +0530 Ujjal Roy wrote: > Hi Stephen, > > Can we rename this flag BRIDGE_IGMP_SNOOPING into something like > BRIDGE_MULTICAST_SNOOPING/BRIDGE_MCAST_SNOOPING? I am starting this > thread because this BRIDGE_IGMP_SNOOPING flag holds information about > IGMP only but not

Re: [Bridge] [PATCH] Include header for use of PATH_MAX

2021-04-12 Thread Stephen Hemminger
On Mon, 12 Apr 2021 09:30:34 -0500 Matt Weber wrote: > Since a1f20223cfcf7b9eae8c9e7e7a07e7bf1377f65b in some build > configurations PATH_MAX is undefined. > > Build log from Buildroot testing failure: >

[Bridge] Minor update to bridge-utils

2021-03-04 Thread Stephen Hemminger
Small changes to bridge-utils to address some minor issues. 1. The default branch is main not master 2. Fixed some compiler warnings because Gcc 10 and Clang now do checks for string overflow. 3. Made a backup repository mirror at github. 4. Fixed version string printed This is not a

Re: [Bridge] [PATCH net-next v7 01/10] net: bridge: extend the process of special frames

2020-10-27 Thread Stephen Hemminger
On Tue, 27 Oct 2020 10:02:42 + Henrik Bjoernlund via Bridge wrote: > +/* Return 0 if the frame was not processed otherwise 1 > + * note: already called with rcu_read_lock > + */ > +static int br_process_frame_type(struct net_bridge_port *p, > + struct sk_buff

Re: [Bridge] [RFC PATCH iproute2] bridge: add support for L2 multicast groups

2020-10-22 Thread Stephen Hemminger
On Sat, 17 Oct 2020 21:45:26 +0300 Vladimir Oltean wrote: > Extend the 'bridge mdb' command for the following syntax: > bridge mdb add dev br0 port swp0 grp 01:02:03:04:05:06 permanent > > Signed-off-by: Vladimir Oltean > --- > bridge/mdb.c | 54

Re: [Bridge] [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Stephen Hemminger
On Sun, 11 Oct 2020 21:36:43 +0200 Heiner Kallweit wrote: > +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, > +struct pcpu_sw_netstats __percpu *netstats) netstats is unmodified, should it be const? > +{ > + int cpu; > + > + if

Re: [Bridge] [PATCH RFC 0/7] net: bridge: cfm: Add support for Connectivity Fault Management(CFM)

2020-09-04 Thread Stephen Hemminger
On Fri, 4 Sep 2020 09:15:20 + Henrik Bjoernlund wrote: > Connectivity Fault Management (CFM) is defined in 802.1Q section 12.14. > > Connectivity Fault Management (CFM) comprises capabilities for > detecting, verifying, and isolating connectivity failures in > Virtual Bridged Networks.

Re: [Bridge] [RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-23 Thread Stephen Hemminger
On Sun, 23 Aug 2020 17:42:39 +0200 Linus Lüssing wrote: > On Sun, Aug 16, 2020 at 03:08:13PM -0700, Stephen Hemminger wrote: > > Rather than adding yet another feature to the bridge, could this hack be > > done by > > having a BPF hook? or netfilter module? > &

Re: [Bridge] [RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-16 Thread Stephen Hemminger
On Sun, 16 Aug 2020 22:24:24 +0200 Linus Lüssing wrote: > Implement a configurable MLD Querier wake-up calls "feature" which > works around a widely spread Android bug in connection with IGMP/MLD > snooping. > > Currently there are mobile devices (e.g. Android) which are not able > to receive

Re: [Bridge] [PATCH net v3] net: bridge: fix vlan stats use-after-free on destruction

2020-05-20 Thread Stephen Hemminger
On Fri, 16 Nov 2018 18:50:01 +0200 Nikolay Aleksandrov wrote: > + if (v->priv_flags & BR_VLFLAG_PER_PORT_STATS) > free_percpu(v->stats); Why not not v->stats == NULL as a flag instead? Then the fact that free_percpu(NULL) is a Nop would mean less code in the bridge driver.

Re: [Bridge] [PATCH net v3] net: bridge: fix vlan stats use-after-free on destruction

2020-04-23 Thread Stephen Hemminger
On Fri, 16 Nov 2018 18:50:01 +0200 Nikolay Aleksandrov wrote: > Syzbot reported a use-after-free of the global vlan context on port vlan > destruction. When I added per-port vlan stats I missed the fact that the > global vlan context can be freed before the per-port vlan rcu callback. > There're

Re: [Bridge] [PATCH net v2] net: bridge: fix stale eth hdr pointer in br_dev_xmit

2020-02-24 Thread Stephen Hemminger
On Mon, 24 Feb 2020 18:46:22 +0200 Nikolay Aleksandrov wrote: > - eth = eth_hdr(skb); > skb_pull(skb, ETH_HLEN) you could just swap these two lines.

Re: [Bridge] Support for long interface names

2020-02-16 Thread Stephen Hemminger
On Mon, 10 Feb 2020 16:00:49 +0100 Marcel Waldvogel wrote: > Hi, > I've added support for long bridge interface names (such as"br- > 0081a64f416f") to "brctl show" (long physical interface names arenot a > problem there). > Please find a branch with the commit at >

Re: [Bridge] [PATCH net-next 1/4] net: bridge: check port state before br_allowed_egress

2020-01-23 Thread Stephen Hemminger
On Thu, 23 Jan 2020 15:28:04 +0200 Nikolay Aleksandrov wrote: > return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) && > - br_allowed_egress(vg, skb) && p->state == BR_STATE_FORWARDING && > + p->state == BR_STATE_FORWARDING && br_allowed_egress(vg, skb) && >

Re: [Bridge] [RFC net-next Patch 0/3] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP)

2020-01-10 Thread Stephen Hemminger
On Fri, 10 Jan 2020 10:02:06 +0100 Horatiu Vultur wrote: > > > > Can this be implemented in userspace? > > The reason for putting this in kernal space is to HW offload this in > switchdev/dsa driver. The switches which typically supports this are > small and don't have a lot of CPU power and

Re: [Bridge] [RFC net-next Patch 0/3] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP)

2020-01-09 Thread Stephen Hemminger
On Thu, 9 Jan 2020 16:06:37 +0100 Horatiu Vultur wrote: > Media Redundancy Protocol is a data network protocol standardized by > International Electrotechnical Commission as IEC 62439-2. It allows rings of > Ethernet switches to overcome any single failure with recovery time faster > than >

Re: [Bridge] [PATCH iproute2 v4] iplink: add support for STP xstats

2019-12-16 Thread Stephen Hemminger
On Wed, 11 Dec 2019 20:07:11 -0500 Vivien Didelot wrote: > Add support for the BRIDGE_XSTATS_STP xstats, as follow: > > # ip link xstats type bridge_slave dev lan4 stp > lan4 > STP BPDU: RX: 0 TX: 61 > STP TCN: RX: 0 TX: 0 >

Re: [Bridge] [PATCH iproute2 v2] iplink: add support for STP xstats

2019-12-11 Thread Stephen Hemminger
On Tue, 10 Dec 2019 13:16:33 -0500 Vivien Didelot wrote: > Hi Stephen, > > On Mon, 9 Dec 2019 16:13:45 -0800, Stephen Hemminger > wrote: > > On Mon, 9 Dec 2019 18:05:22 -0500 > > Vivien Didelot wrote: > > > > > Add support for

Re: [Bridge] [PATCH iproute2 v2] iplink: add support for STP xstats

2019-12-09 Thread Stephen Hemminger
On Mon, 9 Dec 2019 18:05:22 -0500 Vivien Didelot wrote: > Add support for the BRIDGE_XSTATS_STP xstats, as follow: > > # ip link xstats type bridge_slave dev lan5 > STP BPDU: > RX: 0 > TX: 39 >

Re: [Bridge] [PATCH iproute2] iplink: add support for STP xstats

2019-12-09 Thread Stephen Hemminger
On Mon, 9 Dec 2019 16:18:41 -0500 Vivien Didelot wrote: > diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h > index 31fc51bd..e7f2bb78 100644 > --- a/include/uapi/linux/if_bridge.h > +++ b/include/uapi/linux/if_bridge.h These headers are semi-automatically updated

Re: [Bridge] [PATCH net-next] net: bridge: add STP stat counters

2019-11-22 Thread Stephen Hemminger
On Fri, 22 Nov 2019 18:07:42 -0500 Vivien Didelot wrote: > This adds rx_bpdu, tx_bpdu, rx_tcn, tx_tcn, transition_blk, > transition_fwd stat counters to the bridge ports, along with sysfs > statistics nodes under a "statistics" directory of the "brport" entry, > providing useful information for

Re: [Bridge] [PATCH 0/3] Add NETIF_F_HW_BRIDGE feature

2019-08-24 Thread Stephen Hemminger
On Thu, 22 Aug 2019 21:07:27 +0200 Horatiu Vultur wrote: > Current implementation of the SW bridge is setting the interfaces in > promisc mode when they are added to bridge if learning of the frames is > enabled. > In case of Ocelot which has HW capabilities to switch frames, it is not > needed

Re: [Bridge] Split path for packets, and bridge configuration problem.

2019-08-05 Thread Stephen Hemminger
On Wed, 31 Jul 2019 11:55:37 -0700 John Clark via Bridge wrote: > I’m trying to configure a Linux system to bridge an ethernet link for packet > ingress from a local network and combine that with a radio link for the reply > packet egress. > > I vaguely recall something like this use to be

Re: [PATCH net v4] net: bridge: move default pvid init/deinit to NETDEV_REGISTER/UNREGISTER

2019-08-02 Thread Stephen Hemminger
On Fri, 2 Aug 2019 13:57:36 +0300 Nikolay Aleksandrov wrote: > +int br_vlan_bridge_event(struct net_device *dev, unsigned long event, void > *ptr) > { > struct netdev_notifier_changeupper_info *info; > - struct net_bridge *br; > + struct net_bridge *br = netdev_priv(dev); > +

[Bridge] Fw: [Bug 204389] New: bridge: AF_BRIDGE NEWNEIGH netlink message with ifidx is zero

2019-08-01 Thread Stephen Hemminger
Begin forwarded message: Date: Wed, 31 Jul 2019 09:32:20 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 204389] New: bridge: AF_BRIDGE NEWNEIGH netlink message with ifidx is zero https://bugzilla.kernel.org/show_bug.cgi?id=204389

Re: [PATCH net v3] net: bridge: move vlan init/deinit to NETDEV_REGISTER/UNREGISTER

2019-07-31 Thread Stephen Hemminger
> -int br_vlan_init(struct net_bridge *br) > +static int br_vlan_init(struct net_bridge *br) > { > struct net_bridge_vlan_group *vg; > int ret = -ENOMEM; > @@ -1083,6 +1085,8 @@ int br_vlan_init(struct net_bridge *br) > return ret; > > err_vlan_add: > +

Re: [PATCH RESEND net-next 1/2] br_netfilter: add struct netns_brnf

2019-06-06 Thread Stephen Hemminger
On Thu, 6 Jun 2019 13:41:41 +0200 Christian Brauner wrote: > +struct netns_brnf { > +#ifdef CONFIG_SYSCTL > + struct ctl_table_header *ctl_hdr; > +#endif > + > + /* default value is 1 */ > + int call_iptables; > + int call_ip6tables; > + int call_arptables; > + > + /*

Re: [Bridge] [PATCH v2] bridge: Fix error path for kobject_init_and_add()

2019-05-09 Thread Stephen Hemminger
On Fri, 10 May 2019 12:57:02 +1000 "Tobin C. Harding" wrote: > On Fri, May 10, 2019 at 12:52:12PM +1000, Tobin C. Harding wrote: > > Please ignore - I forgot about netdev procedure and the merge window. > My bad. > > Will re-send when you are open. > > thanks, > Tobin. That only applies to

Re: [Bridge] [PATCH] net:bridge:always disable auto-tuning when the user specified MTU

2019-04-09 Thread Stephen Hemminger
On Wed, 10 Apr 2019 02:32:08 + Huang Rui wrote: > For example. > My purpose is to create a bridge br0 and join eth0 into br0. > if we use this following way, the auto-tuning flag will not be disabled. > > If eth0's mtu is 1200 > step 1.brctl addbr br0 > step 2.brctl addif br0 eth0 > step

Re: [Bridge] [PATCH net v3] net: bridge: Fix ethernet header pointer before check skb forwardable

2019-01-16 Thread Stephen Hemminger
On Wed, 16 Jan 2019 21:04:21 +0800 wangyunjian wrote: > if (unlikely(netpoll_tx_running(to->br->dev))) { > + skb_push(skb, ETH_HLEN); > if (!is_skb_forwardable(skb->dev, skb)) { > kfree_skb(skb); >

Re: [Bridge] [PATCH net-next v2 1/3] net: bridge: add support for user-controlled bool options

2018-11-26 Thread Stephen Hemminger
On Sun, 25 Nov 2018 10:12:45 +0200 Nikolay Aleksandrov wrote: > On 24/11/2018 18:46, niko...@cumulusnetworks.com wrote: > > On 24 November 2018 18:25:41 EET, Andrew Lunn wrote: > >> On Sat, Nov 24, 2018 at 06:18:33PM +0200, niko...@cumulusnetworks.com > >> wrote: > >>> On 24 November 2018

Re: [Bridge] [PATCH net-next 1/2] net: bridge: add support for user-controlled bool options

2018-11-22 Thread Stephen Hemminger
On Thu, 22 Nov 2018 18:01:29 +0200 Nikolay Aleksandrov wrote: > On 22/11/2018 17:35, Andrew Lunn wrote: > > On Thu, Nov 22, 2018 at 06:29:24AM +0200, Nikolay Aleksandrov wrote: > >> We have been adding many new bridge options, a big number of which are > >> boolean but still take up netlink

Re: [Bridge] [PATCH net] net: bridge: remove ipv6 zero address check in mcast queries

2018-10-28 Thread Stephen Hemminger
On Sat, 27 Oct 2018 12:07:47 +0300 Nikolay Aleksandrov wrote: > Recently a check was added which prevents marking of routers with zero > source address, but for IPv6 that cannot happen as the relevant RFCs > actually forbid such packets: > RFC 2710 (MLDv1): > "To be valid, the Query message MUST

Re: [Bridge] [PATCH net-next] net: bridge: add support for per-port vlan stats

2018-10-12 Thread Stephen Hemminger
On Fri, 12 Oct 2018 13:41:16 +0300 Nikolay Aleksandrov wrote: > This patch adds an option to have per-port vlan stats instead of the > default global stats. The option can be set only when there are no port > vlans in the bridge since we need to allocate the stats if it is set > when vlans are

Re: [Bridge] [PATCH net-next 0/9] net: bridge: convert bool options to bits

2018-09-26 Thread Stephen Hemminger
| 74 > +++-- > net/bridge/br_sysfs_br.c| 32 +- > net/bridge/br_vlan.c| 30 +++++---- > 12 files changed, 155 insertions(+), 120 deletions(-) > Looks good, these flags grew over time and cleanup was overdue. Reviewed-by: Stephen Hemminger

Re: [Bridge] [PATCH net-next] net: bridge: add support for sticky fdb entries

2018-09-10 Thread Stephen Hemminger
On Mon, 10 Sep 2018 13:16:01 +0300 Nikolay Aleksandrov wrote: > Add support for entries which are "sticky", i.e. will not change their port > if they show up from a different one. A new ndm flag is introduced for that > purpose - NTF_STICKY. We allow to set it only to non-local entries. Is

Re: [Bridge] [PATCH net-next 1/2] net: bridge: add support for raw sysfs port options

2018-07-20 Thread Stephen Hemminger
On Fri, 20 Jul 2018 20:47:26 +0300 Nikolay Aleksandrov wrote: > On July 20, 2018 8:26:36 PM GMT+03:00, Nikolay Aleksandrov > wrote: > >On July 20, 2018 8:20:44 PM GMT+03:00, Stephen Hemminger > > wrote: > >>On Fri, 20 Jul 2018 20:14:43 +0300 >

Re: [Bridge] [PATCH net-next 1/2] net: bridge: add support for raw sysfs port options

2018-07-20 Thread Stephen Hemminger
On Fri, 20 Jul 2018 20:14:43 +0300 Nikolay Aleksandrov wrote: > >Casting away the const on the buf variable is going to cause warnings > >and should not be necessary. > > > > It doesn't when it's casted like that, the new line is changed to null byte > so we need to drop > the const. Then

Re: [Bridge] [PATCH net-next 2/2] net: bridge: add support for backup port

2018-07-20 Thread Stephen Hemminger
On Fri, 20 Jul 2018 17:48:26 +0300 Nikolay Aleksandrov wrote: > This patch adds a new port attribute - IFLA_BRPORT_BACKUP_PORT, which > allows to set a backup port to be used for known unicast traffic if the > port has gone carrier down. The backup pointer is rcu protected and set > only under

Re: [Bridge] [PATCH net-next 1/2] net: bridge: add support for raw sysfs port options

2018-07-20 Thread Stephen Hemminger
On Fri, 20 Jul 2018 17:48:25 +0300 Nikolay Aleksandrov wrote: > This patch adds a new alternative store callback for port sysfs options > which takes a raw value (buf) and can use it directly. It is needed for the > backup port sysfs support since we have to pass the device by its name. > >

Re: [Bridge] [PATCH net-next 0/2] net: bridge: add support for backup port

2018-07-20 Thread Stephen Hemminger
On Fri, 20 Jul 2018 17:48:24 +0300 Nikolay Aleksandrov wrote: > Hi, > This set introduces a new bridge port option that allows any port to have > any other port (in the same bridge of course) as its backup and traffic > will be forwarded to the backup port when the primary goes down. This is >

Re: [Bridge] [PATCH] net: bridge: fix potential null pointer dereference on return from br_port_get_rtnl()

2018-06-21 Thread Stephen Hemminger
On Fri, 22 Jun 2018 07:20:56 +0900 (KST) David Miller wrote: > From: Garry McNulty > Date: Thu, 21 Jun 2018 21:14:27 +0100 > > > br_port_get_rtnl() can return NULL if the network device is not a bridge > > port (IFF_BRIDGE_PORT flag not set). br_port_slave_changelink() and > >

Re: [Bridge] [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Stephen Hemminger
On Mon, 28 May 2018 17:44:16 +0200 Petr Machata wrote: > Callers of br_fdb_find() need to hold the hash lock, which > br_fdb_find_port() doesn't do. Add the missing lock/unlock > pair. > > Signed-off-by: Petr Machata > --- > net/bridge/br_fdb.c | 2 ++ > 1 file changed, 2 insertions(+) > >

[Bridge] [PATCH net] bridge: netfilter stp fix reference to uninitialized data

2018-04-27 Thread Stephen Hemminger
The destination mac (destmac) is only valid if EBT_DESTMAC flag is set. Fix by changing the order of the comparison to look for the flag first. Reported-by: syzbot+5c06e318fc558cc27...@syzkaller.appspotmail.com Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- Note: no fixes

Re: [Bridge] [PATCH net-next v2 1/6] net: bridge: Publish bridge accessor functions

2018-04-27 Thread Stephen Hemminger
On Fri, 27 Apr 2018 18:11:06 +0300 Ido Schimmel wrote: > +int br_vlan_pvid_rtnl(const struct net_device *dev, u16 *p_pvid) > +{ > + struct net_bridge_vlan_group *vg; > + > + ASSERT_RTNL(); > + if (netif_is_bridge_master(dev)) > + vg =

Re: [Bridge] [PATCH net-next 6/6] mlxsw: spectrum_span: Allow bridge for gretap mirror

2018-04-26 Thread Stephen Hemminger
On Thu, 26 Apr 2018 13:50:12 +0300 Nikolay Aleksandrov wrote: > On 26/04/18 12:06, Ido Schimmel wrote: > > From: Petr Machata > > > > When handling mirroring to a gretap or ip6gretap netdevice in mlxsw, the > > underlay address (i.e. the remote

Re: [Bridge] [PATCH net-next] bridge: use hlist_entry_safe

2018-04-26 Thread Stephen Hemminger
; > > if ((unsigned long)lport > (unsigned long)rport) { > port = lport; Reviewed-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] Bridge with 1x eth and 2x tun, adding 2nd eth, hosts become unavailable

2018-04-08 Thread Stephen Hemminger
On Sat, 7 Apr 2018 09:59:37 +0200 "Marc Roos" wrote: > In this situation I can ping a vm from br0 connected to 172.16.1.y > > > >+---+ >|BR0| >172.16.1.y | | 172.16.1.x >

Re: [Bridge] [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default

2018-03-14 Thread Stephen Hemminger
On Wed, 14 Mar 2018 17:08:48 +0200 Kalle Valo wrote: > Arend van Spriel writes: > > > On 3/14/2018 3:24 PM, Kalle Valo wrote: > >>> +config BRCMFMAC_IAPP > >>> >+bool "Partial support for obsoleted Inter-Access Point Protocol" >

Re: [Bridge] [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default

2018-03-14 Thread Stephen Hemminger
On Wed, 14 Mar 2018 12:01:19 +0100 Rafał Miłecki wrote: > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c > b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c > index 19048526b4af..db6987015fb1 100644 > ---

Re: [Bridge] Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-12 Thread Stephen Hemminger
On Mon, 12 Mar 2018 23:42:48 +0100 Rafał Miłecki wrote: > 2) Blame bridge + mcast-to-ucast + hairpin for 802.11f incompatibility > > If we agree that 802.11f support in FullMAC firmware is acceptable, then > we have to make sure Linux's bridge doesn't break it by passing

Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults

2018-03-10 Thread Stephen Hemminger
On Fri, 9 Mar 2018 19:03:04 -0800 Igor Mitsyanko wrote: > Default bridge port flags for switchdev devices can be different from > what is used in bridging core. Get default value from switchdev itself > on port initialization. > > Signed-off-by: Igor Mitsyanko

Re: [Bridge] ssh connection not working when ssh server is behind a linux bridge

2018-01-28 Thread Stephen Hemminger
On Sun, 28 Jan 2018 22:15:34 +0200 Adrian Pascalau wrote: > Hi, > > I have a strange issue with a linux bridge and a openssh server > running in a VM connected to that bridge. Basically when I ssh with > Putty or any other windows based ssh client to an openssh server

Re: [Bridge] [PATCH] bridge: return boolean instead of integer in br_multicast_is_router

2018-01-18 Thread Stephen Hemminger
off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> LGTM Fixes: 85b352693264 ("bridge: Fix build error when IGMP_SNOOPING is not enabled") Reviewed-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] [PATCH 3.2 01/06] "bridge should send gratuitous ARP to notify peer while a bond, which is a port of this bridge, changes."

2018-01-06 Thread Stephen Hemminger
On Sat, 6 Jan 2018 17:25:20 +0800 邢庆杰 wrote: > We create bond0 and add eth0 as slaves. Eth0 is active. Then we add > bond0 > into br0 as a bridge port. Br0 has ip address. When eth0 is down, after > bond0's > failover eth1 become active. At this moment, we need br0 send a

Re: [Bridge] [PATCH v1] bridge: Use helpers to handle MAC address

2017-12-19 Thread Stephen Hemminger
.shevche...@linux.intel.com> Looks good Signed-off-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] [PATCH net] net: bridge: fix early call to br_stp_change_bridge_id

2017-12-16 Thread Stephen Hemminger
can be created either with netlink or ioctl. This change is also makes both ways of adding MAC have the same semantics; If bridge is created with ioctl then the bridge_id (and MAC) will not be changed until later device is added or MAC address is set by other operation. Signed-off-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] linux bridge does not forward arp reply back packets in a vmware vm

2017-12-16 Thread Stephen Hemminger
On Sat, 16 Dec 2017 16:19:03 +0200 Adrian P wrote: > Investigating this further, I have noticed that the mac address of the > eth0 interface from the cirros VM instance does not appear in the > bridge forwarding table, and this explains why everything starts > working

Re: [Bridge] linux bridge does not forward arp reply back packets in a vmware vm

2017-12-15 Thread Stephen Hemminger
On Fri, 15 Dec 2017 18:29:58 +0200 Adrian P <adrian27ora...@gmail.com> wrote: > On Fri, Dec 15, 2017 at 5:55 PM, Stephen Hemminger > <step...@networkplumber.org> wrote: > > On Fri, 15 Dec 2017 15:37:39 +0200 > > Adrian P <adrian27ora...@gmail.com> wrote

Re: [Bridge] linux bridge does not forward arp reply back packets in a vmware vm

2017-12-15 Thread Stephen Hemminger
On Fri, 15 Dec 2017 15:37:39 +0200 Adrian P wrote: > Hello, > > I have a strange issue with a linux bridge created by > openstack-neutron (pike release). This linux bridge is hosted in a > vmware VM running latest CentOS 7, with a single network interface in >

Re: [Bridge] [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:02:50 +0200 Nikolay Aleksandrov wrote: > Before this patch the bridge used a fixed 256 element hash table which > was fine for small use cases (in my tests it starts to degrade > above 1000 entries), but it wasn't enough for medium or large >

Re: [Bridge] [PATCH net-next] net: bridge: use rhashtable for fdbs

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 16:02:50 +0200 Nikolay Aleksandrov wrote: > + memcpy(__entry->addr, f->key.addr.addr, ETH_ALEN); Maybe use ether_addr_copy() here?

Re: [Bridge] Linux Bridge Static FDB move

2017-10-26 Thread Stephen Hemminger
If you have a moving MAC then you have a network that is flapping, duplicate MAC, or worse a network loop. All of these are signs of a broken L2 network. The bridge can't fix these On Oct 26, 2017 19:33, wrote: > Thank you for the reply. > > Viraj >

Re: [Bridge] [PATCH net-next v3 1/2] bridge: netlink: make setlink/dellink notifications more accurate

2017-10-26 Thread Stephen Hemminger
all, i.e. range 1-4094. > > Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This looks correct. As a general note, generating a notice with no change should be ok for a correctly written application. But missing a notification would cause synchronization problems. Acked-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] Problem with syslog in bridge(?) with ethernet broadcast packets with QinQ

2017-10-12 Thread Stephen Hemminger
On Mon, 18 Sep 2017 17:21:11 +0200 Andrés Pozo Muñoz wrote: > Hi all, > > I'm facing some problem with ethernet multicast traffic and QinQ > (802.3q in both tags) in -apparently- a bridge in Ubuntu 16.04 > (4.12.0-041200-generic). > > My set up is the following: >

Re: [Bridge] [PATCH net-next 6/7] net: bridge: Pass extack to down to netdev_master_upper_dev_link

2017-10-04 Thread Stephen Hemminger
. You might want to pass the netlink_ext_ack down as an immutable pointer (const). Acked-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] [PATCH] bridge: Fix format string for %ul

2017-10-03 Thread Stephen Hemminger
On Fri, 26 Aug 2016 23:10:28 -0400 Oleg Drokin wrote: > %ul would print an unsigned value and a letter l, > likely it was %lu that was meant to print the long int, > but in reality the values printed there are just regular signed > ints, so just dropping the l altogether. >

Re: [Bridge] [PATCH net-next 0/3] bridge: neigh msg proxy and flood suppression support

2017-10-02 Thread Stephen Hemminger
On Mon, 2 Oct 2017 07:49:09 -0700 Roopa Prabhu wrote: > On Sun, Oct 1, 2017 at 9:36 PM, Roopa Prabhu > wrote: > > From: Roopa Prabhu > > > > This series implements arp and nd suppression in the bridge > > driver

Re: [Bridge] [PATCH net-next] net: bridge: add per-port group_fwd_mask with less restrictions

2017-09-29 Thread Stephen Hemminger
On Sat, 30 Sep 2017 00:01:24 +0300 Nikolay Aleksandrov <niko...@cumulusnetworks.com> wrote: > On 29/09/17 18:14, Stephen Hemminger wrote: > > On Wed, 27 Sep 2017 16:12:44 +0300 > > Nikolay Aleksandrov <niko...@cumulusnetworks.com> wrote: > > > >> W

Re: [Bridge] [PATCH net-next] net: bridge: add per-port group_fwd_mask with less restrictions

2017-09-29 Thread Stephen Hemminger
On Wed, 27 Sep 2017 16:12:44 +0300 Nikolay Aleksandrov wrote: > We need to be able to transparently forward most link-local frames via > tunnels (e.g. vxlan, qinq). Currently the bridge's group_fwd_mask has a > mask which restricts the forwarding of STP and LACP, but

Re: [Bridge] [net-next v3] bridge: trigger RTM_NEWLINK when interface is modified by bridge ioctl

2017-09-21 Thread Stephen Hemminger
t; group default > link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff > > Without this patch, the last netlink notification is not sent. > > Signed-off-by: Vincent Bernat <vinc...@bernat.im> This makes sense, you should probably add a Fixes: tag to help maintainers of long term stable kernels. Reviewed-by: Stephen Hemminger <step...@networkplumber.org>

Re: [Bridge] [PATCH net-next v2] bridge: also trigger RTM_NEWLINK when interface is released from bridge

2017-09-20 Thread Stephen Hemminger
On Wed, 20 Sep 2017 15:57:16 -0600 David Ahern wrote: > On 9/20/17 3:09 PM, David Miller wrote: > > From: Vincent Bernat > > Date: Sat, 16 Sep 2017 16:18:33 +0200 > > > > David, I am CC:'ing you because you've done work in this area over the > > past year.

Re: [Bridge] [PATCH net-next] bridge: add tracepoint in br_fdb_update

2017-08-31 Thread Stephen Hemminger
On Thu, 31 Aug 2017 23:50:26 +0200 Jesper Dangaard Brouer wrote: > On Thu, 31 Aug 2017 11:43:25 -0700 (PDT) > David Miller wrote: > > > From: Roopa Prabhu > > Date: Wed, 30 Aug 2017 22:18:13 -0700 > > > > > From: Roopa

Re: [Bridge] [PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-28 Thread Stephen Hemminger
On Sat, 26 Aug 2017 22:56:05 +0200 Andrew Lunn wrote: > This is a WIP patchset i would like comments on from bridge, switchdev > and hardware offload people. > > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which

Re: [Bridge] [RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-21 Thread Stephen Hemminger
On Mon, 21 Aug 2017 19:15:17 +0200 David Lamparter wrote: > Hi all, > > > this is an update on the earlier "[RFC net-next] VPLS support". Note > I've changed the subject lines on some of the patches to better reflect > what they really do (tbh the earlier subject lines

Re: [Bridge] [PATCH net] bridge: fix hello and hold timers starting/stopping

2017-05-19 Thread Stephen Hemminger
On Fri, 19 May 2017 18:25:43 +0200 Ivan Vecera wrote: > Current bridge code incorrectly handles starting/stopping of hello and > hold timers during STP enable/disable. > > 1. Timers are stopped in br_stp_start() during NO_STP->USER_STP >transition. This is not correct as the

Re: [Bridge] [PATCH] libbridge: Include the configured CFLAGS when compiling

2017-05-15 Thread Stephen Hemminger
On Sat, 13 May 2017 19:23:34 -0700 David Michael wrote: > When compiling bridge-utils, the CFLAGS set during "configure" are only > used in the brctl directory. Sure make sense. I applied it (with some reordering).

Re: [Bridge] [PATCH v2 1/2] net: Added mtu parameter to dev_forward_skb calls

2017-05-11 Thread Stephen Hemminger
On Thu, 11 May 2017 21:10:11 +0200 Fredrik Markström <fredrik.markst...@gmail.com> wrote: > On Thu, May 11, 2017 at 6:01 PM, Stephen Hemminger > <step...@networkplumber.org> wrote: > > On Thu, 11 May 2017 15:46:27 +0200 > > Fredrik Markstrom <fredrik.markst...@

  1   2   3   4   5   >