From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu Subject: Re: [PATCH net-next v2 1/2] netlink: ipv4 igmp join notifications Date: Mon, 3 Sep 2018 16:12:49 -0700 Message-ID: References: <20180830093545.29465-2-pruddy@vyatta.att-mail.com> <20180831112024.30477-1-pruddy@vyatta.att-mail.com> <4d4b3f2c67df3d77c16994a24a306ad086612420.camel@vyatta.att-mail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: netdev , =?UTF-8?B?SmnFmcOtIFDDrXJrbw==?= , Stephen Hemminger To: Patrick Ruddy Return-path: Received: from mail-ed1-f67.google.com ([209.85.208.67]:40257 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbeIDDfM (ORCPT ); Mon, 3 Sep 2018 23:35:12 -0400 Received: by mail-ed1-f67.google.com with SMTP id j62-v6so1804897edd.7 for ; Mon, 03 Sep 2018 16:12:51 -0700 (PDT) In-Reply-To: <4d4b3f2c67df3d77c16994a24a306ad086612420.camel@vyatta.att-mail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sun, Sep 2, 2018 at 4:18 AM, Patrick Ruddy wrote: > Hi Roopa > > inline > > thx > > -pr > > On Fri, 2018-08-31 at 09:29 -0700, Roopa Prabhu wrote: >> On Fri, Aug 31, 2018 at 4:20 AM, Patrick Ruddy >> wrote: >> > Some userspace applications need to know about IGMP joins from the kernel >> > for 2 reasons >> > 1. To allow the programming of multicast MAC filters in hardware >> > 2. To form a multicast FORUS list for non link-local multicast >> > groups to be sent to the kernel and from there to the interested >> > party. >> > (1) can be fulfilled but simply sending the hardware multicast MAC >> > address to be programmed but (2) requires the L3 address to be sent >> > since this cannot be constructed from the MAC address whereas the >> > reverse translation is a standard library function. >> > >> > This commit provides addition and deletion of multicast addresses >> > using the RTM_NEWADDR and RTM_DELADDR messages. It also provides >> > the RTM_GETADDR extension to allow multicast join state to be read >> > from the kernel. >> > >> > Signed-off-by: Patrick Ruddy >> > --- >> > v2: fix kbuild warnings. >> >> I am still going through the series, but AFAICT, user-space caches listening to >> RTNLGRP_IPV4_IFADDR will now also get multicast addresses by default ? >> > > Yes that's the crux of this change. It's unfortunate that I could not > use IFA_MULTICAST to distinguish the SAFI. I suppose the other option > would be to create a set of new NEW/DEL/GETMULTICAST messages but the > partial code for RTM_GETMULTICAST in ipv6/mcast.c complicates that > slightly. Happy to look at it if you think that would be be better. > yeah, true. Thinking about this some more, you are adding an interface for multicast entries learnt via igmp. There is already a netlink channel for layer2 mc addresses via igmp. I can't see why that cannot be used. It is RTM_*MDB msgs. It is currently only available for the bridge. But, I have a requirement for it to be available via a vxlan dev...so, I am looking at making it available on other devices. Can you check if RTM_*MDB msgs can be made to work for your case ?. The reason I think it should be possible is because this is similar to bridge fdb entries. The bridge fdb api (RTM_NEWNEIGH with AF_BRIDGE) is overloaded to notify and dump netdev unicast addresses. similarly I think the mdb api can be overloaded to notify and dump netdev multicast addresses (statically added or learnt via igmp)