Return-path: Received: from mail-pg0-f43.google.com ([74.125.83.43]:36292 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754266AbdASTMh (ORCPT ); Thu, 19 Jan 2017 14:12:37 -0500 Received: by mail-pg0-f43.google.com with SMTP id t6so16368588pgt.3 for ; Thu, 19 Jan 2017 11:12:36 -0800 (PST) Date: Thu, 19 Jan 2017 11:05:20 -0800 From: Stephen Hemminger To: Linus =?UTF-8?B?TMO8c3Npbmc=?= Cc: netdev@vger.kernel.org, "David S . Miller" , Felix Fietkau , Nikolay Aleksandrov , bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH net-next v4] bridge: multicast to unicast Message-ID: <20170119110520.24dfd34d@xeon-e3> (sfid-20170119_201243_138529_A6DB3C3D) In-Reply-To: <20170119024510.3284-1-linus.luessing@c0d3.blue> References: <20170119024510.3284-1-linus.luessing@c0d3.blue> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, 19 Jan 2017 03:45:10 +0100 Linus L=C3=BCssing wrote: > From: Felix Fietkau >=20 > Implements an optional, per bridge port flag and feature to deliver > multicast packets to any host on the according port via unicast > individually. This is done by copying the packet per host and > changing the multicast destination MAC to a unicast one accordingly. >=20 > multicast-to-unicast works on top of the multicast snooping feature of > the bridge. Which means unicast copies are only delivered to hosts which > are interested in it and signalized this via IGMP/MLD reports > previously. >=20 > This feature is intended for interface types which have a more reliable > and/or efficient way to deliver unicast packets than broadcast ones > (e.g. wifi). >=20 > However, it should only be enabled on interfaces where no IGMPv2/MLDv1 > report suppression takes place. This feature is disabled by default. >=20 > The initial patch and idea is from Felix Fietkau. >=20 > Signed-off-by: Felix Fietkau > [linus.luessing@c0d3.blue: various bug + style fixes, commit message] > Signed-off-by: Linus L=C3=BCssing >=20 In general this looks good. One issue I see is how existing entries are handled when the bridge port fl= ags are changed dynamically. It might be better to always record the necessary = data in the bridge_port_group and not have a per-entry flag bit. In your current patch the API changes the response to future IGMP but does not take instant effect. Code would be simpler if there was less logic to handle per-entry f= lags. Also, you might want to add sysfs interface for the attribute as well.