Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp654495ybh; Sat, 3 Aug 2019 07:05:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoJxvuIylG1JhcWwJUwmvGoZcy7JMazP+xJC4ptMiHq7btXU3mR16YhV/yOgtedqMj1I2S X-Received: by 2002:a65:6288:: with SMTP id f8mr122591939pgv.292.1564841137624; Sat, 03 Aug 2019 07:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564841137; cv=none; d=google.com; s=arc-20160816; b=WgfLK0b2HPFgErFv3HduchAGJtTIgjqwAkFM0eZd01YpIG2EzZnktVzAxE4StjACp3 MlgmzFEGd4QhxFkGTKKRLd+C6h54Br4oFidjc5XNpk3ANmSEp2N6+BMpBmngJmnoXUbh evCBKSFCXv9DpnGggT3iwgM4aGbp2w3WHKg6Xp158jNmSQe8dr7LPI2wnscmW3ZatlXj 9gJkhxR8N5MJyQgIlSVGfVN9NR9LFC18kGA6fcGS0Z+oZ5cVG5AL1dSTOIag7D84SwRW W45PftYBAWBkH76BetIAea0ib7gxOOGCUZbafh9ecauQlH9zXGivFfQwwyKkBFTa1sKd TdUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=VDDZkNoGjBHzfk/3qVVuF7BbecezKv+BHiCbXcdhoC0=; b=lGfMS5vgqR+hMpWIq/3YtvztsAY+7IlHLI8SUAQBE9AVU6x1fGZEaqMZsEGR/Pszcn K6g0+r7Bupk4kBhJIFDNBFeOC524VZUcGkSMeNkKy56WjSPKaNmybmwk4Jhj+zJa0ykC 9aW9AvnqvzZQQE0TvviWbhrscqPufohwQuC1QvIsEqcO5ohrPazshbr/oRi1AFEJtdPj 0xCT0iYckDevSYOttJoCNwAnxCDUKNN27m+DSQBNfQqA9JjmlSN4aVyVU9i2ZSi7P3q3 /ECK957fEfDT9IqSm/07jUe7OgglBIXqc3tYmE/yT1nrPE72D4mNMYCD5t8P8e8QY2Jx Q9eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=TuHuJ6lP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si43453169pfn.166.2019.08.03.07.05.22; Sat, 03 Aug 2019 07:05:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=TuHuJ6lP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392268AbfHBOQa (ORCPT + 99 others); Fri, 2 Aug 2019 10:16:30 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:32972 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbfHBOQa (ORCPT ); Fri, 2 Aug 2019 10:16:30 -0400 Received: by mail-wm1-f65.google.com with SMTP id h19so1572621wme.0 for ; Fri, 02 Aug 2019 07:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VDDZkNoGjBHzfk/3qVVuF7BbecezKv+BHiCbXcdhoC0=; b=TuHuJ6lPEwf33OjXIE9OyePvq6M4VT9I6gVIPovd4eWX0BgxURoww4krQ8F9nzfZvF Z+YdbzXMJ+YgEAws2CURNyb5q6v0k4rExePgS3OXqMgcuCZXt/PuFUw1lGO2sBcqGVlU Da/dCDRUgg/Gp//Ur1XjoZD/vvW9lxmks98MU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VDDZkNoGjBHzfk/3qVVuF7BbecezKv+BHiCbXcdhoC0=; b=OlH9ooq+LGXp4r6SKfE5FRcEKVmdnlKyDjyPEfX2w9f4g/+/0094xVEjl1f5kHLkGw fbVAhBSpTNOHXR0BrDjvTBEmM/WVc59JPYgTSa4z5N1BMShzCW3UeO0yaK58rX8eisx5 HzwxMmzkk5rWqUqudnHbNTVRy+3sBLkwEvGsLKS7Yh0Hn1Ia8+oZMjVUcxzrhFH6OqyZ XnPvc07/qj57IEBm/52VeVDFJF8h5vs28v9FdTQ97D1zbDUQ1y9Ph6MPToNCwEYnzeXc 6fXJTDZLRyHiqEM8DvvPzah/XIhspIMtfLE8E4XKzdAw5BEmrD1N6vAPzbG51aMUx5Y3 zSRA== X-Gm-Message-State: APjAAAU3Il85UmhIpq8xLdqB7lEMRaS7sD0Ks69/e73t8oCmG0bhbd6j XgYjR7Pz6RcgwdO9q/e1+vzf7g== X-Received: by 2002:a7b:c775:: with SMTP id x21mr4752518wmk.97.1564755387548; Fri, 02 Aug 2019 07:16:27 -0700 (PDT) Received: from [192.168.0.107] (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id f2sm71007337wrq.48.2019.08.02.07.16.26 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 02 Aug 2019 07:16:26 -0700 (PDT) Subject: Re: [net-next,rfc] net: bridge: mdb: Extend with multicast LLADDR To: "Allan W. Nielsen" Cc: Horatiu Vultur , idosch@mellanox.com, andrew@lunn.ch, davem@davemloft.net, roopa@cumulusnetworks.com, petrm@mellanox.com, tglx@linutronix.de, fw@strlen.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org References: <1564663840-27721-1-git-send-email-horatiu.vultur@microchip.com> <20190802140655.ngbok2ubprhivlhy@lx-anielsen.microsemi.net> From: Nikolay Aleksandrov Message-ID: Date: Fri, 2 Aug 2019 17:16:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190802140655.ngbok2ubprhivlhy@lx-anielsen.microsemi.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2019 17:07, Allan W. Nielsen wrote: > The 08/01/2019 17:07, Nikolay Aleksandrov wrote: >>> To create a group for two of the front ports the following entries can >>> be added: >>> bridge mdb add dev br0 port eth0 grp 01:00:00:00:00:04 permanent vid 1 >>> bridge mdb add dev br0 port eth1 grp 01:00:00:00:00:04 permanent vid 1 >>> >>> Now the entries will be display as following: >>> dev br0 port eth0 grp 01:00:00:00:00:04 permanent offload vid 1 >>> dev br0 port eth1 grp 01:00:00:00:00:04 permanent offload vid 1 >>> >>> This requires changes to iproute2 as well, see the follogin patch for that. >>> >>> Now if frame with dmac '01:00:00:00:00:04' will arrive at one of the front >>> ports. If we have HW offload support, then the frame will be forwarded by >>> the switch, and need not to go to the CPU. In a pure SW world, the frame is >>> forwarded by the SW bridge, which will flooded it only the ports which are >>> part of the group. >>> >>> So far so good. This is an important part of the problem we wanted to solve. >>> >>> But, there is one drawback of this approach. If you want to add two of the >>> front ports and br0 to receive the frame then I can't see a way of doing it >>> with the bridge mdb command. To do that it requireds many more changes to >>> the existing code. >>> >>> Example: >>> bridge mdb add dev br0 port eth0 grp 01:00:00:00:00:04 permanent vid 1 >>> bridge mdb add dev br0 port eth1 grp 01:00:00:00:00:04 permanent vid 1 >>> bridge mdb add dev br0 port br0 grp 01:00:00:00:00:04 permanent vid 1 // This looks wrong. >>> >>> We believe we come a long way by re-using the facilities in MDB (thanks for >>> convincing us in doing this), but we are still not completely happy with >>> the result. >> Just add self argument for the bridge mdb command, no need to specify it twice. > Like this: > bridge mdb add dev br0 port eth1 grp 01:00:00:00:00:04 permanent vid self What ?! No, that is not what I meant. bridge mdb add dev br0 grp 01:00:00:00:00:04 permanent vid self bridge mdb del dev br0 grp 01:00:00:00:00:04 permanent vid self Similar to fdb. You don't need no-self.. I don't mind a different approach, this was just a suggestion. But please without "no-self" :) > > Then if I want to remove br0 rom the group, should I then have a no-self, and > then it becomes even more strange what to write in the port. > > bridge mdb add dev br0 port ?? grp 01:00:00:00:00:04 permanent vid no-self > ^^ > And, what if it is a group with only br0 (the traffic should go to br0 and > not any of the slave interfaces)? > > Also, the 'self' keyword has different meanings in the 'bridge vlan' and the > 'bridge fdb' commands where it refres to if the offload rule should be install > in HW - or only in the SW bridge. No, it shouldn't. Self means act on the device, in this case act on the bridge, otherwise master is assumed. > > The proposed does not look pretty bad, but at least it will be possible to > configured the different scenarios: > > bridge mdb add dev br0 port br0 grp 01:00:00:00:00:04 permanent vid 1 > bridge mdb del dev br0 port br0 grp 01:00:00:00:00:04 permanent vid 1 > That works too, but the "port" part is redundant. > The more I look at the "bridge mdb { add | del } dev DEV port PORT" command, the > less I understand why do we have both 'dev' and 'port'? The implementation will > only allow this if 'port' has become enslaved to the switch represented by > 'dev'. Anyway, what is done is done, and we need to stay backwards compatible, > but we could make it optional, and then it looks a bit less strange to allow the > port to specify a br0. > > Like this: > > bridge mdb { add | del } [dev DEV] port PORT grp GROUP [ permanent | temp ] [ vid VID ] > > bridge mdb add port eth0 grp 01:00:00:00:00:04 permanent vid 1 > bridge mdb add port eth1 grp 01:00:00:00:00:04 permanent vid 1 > bridge mdb add port br0 grp 01:00:00:00:00:04 permanent vid 1 // Add br0 to the gruop > bridge mdb del port br0 grp 01:00:00:00:00:04 permanent vid 1 // Delete it again > br0 is not a port, thus the "self" or just dev or whatever you choose.. > Alternative we could also make the port optional: > > bridge mdb { add | del } dev DEV [port PORT] grp GROUP [ permanent | temp ] [ vid VID ] > > bridge mdb add dev br0 port eth0 grp 01:00:00:00:00:04 permanent vid 1 > bridge mdb add dev br0 port eth1 grp 01:00:00:00:00:04 permanent vid 1 > bridge mdb add dev br0 grp 01:00:00:00:00:04 permanent vid 1 // Add br0 to the gruop > bridge mdb del dev br0 grp 01:00:00:00:00:04 permanent vid 1 // Delete it again > Right. I read this one later. :) > Any preferences? > Not really, up to you. Any of the above seem fine to me. > /Allan > >