Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754451AbdFNH4X (ORCPT ); Wed, 14 Jun 2017 03:56:23 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:35299 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbdFNH4V (ORCPT ); Wed, 14 Jun 2017 03:56:21 -0400 Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net-next 2/3] ipmr: add netlink notifications on igmpmsg cache reports References: <20170613170822.16310-1-julien@arista.com> <20170613170822.16310-3-julien@arista.com> To: Julien Gomes , davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nikolay@cumulusnetworks.com From: Nicolas Dichtel Organization: 6WIND Message-ID: Date: Wed, 14 Jun 2017 09:56:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170613170822.16310-3-julien@arista.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1590 Lines: 40 Le 13/06/2017 à 19:08, Julien Gomes a écrit : > Add Netlink notifications on cache reports in ipmr, in addition to the > existing igmpmsg sent to mroute_sk. > Send RTM_NEWCACHEREPORT notifications to RTNLGRP_IPV4_MROUTE. > > MSGTYPE, VIF_ID, SRC_ADDR and DST_ADDR Netlink attributes contain the > same data as their equivalent fields in the igmpmsg header. > PKT attribute is the packet sent to mroute_sk, without the added igmpmsg > header. > > Suggested-by: Ryan Halbrook > Signed-off-by: Julien Gomes > --- > include/uapi/linux/mroute.h | 11 ++++++++ > net/ipv4/ipmr.c | 63 +++++++++++++++++++++++++++++++++++++++++++-- > 2 files changed, 72 insertions(+), 2 deletions(-) > > diff --git a/include/uapi/linux/mroute.h b/include/uapi/linux/mroute.h > index f904367c0cee..f6f9e01ee734 100644 > --- a/include/uapi/linux/mroute.h > +++ b/include/uapi/linux/mroute.h > @@ -152,6 +152,17 @@ enum { > }; > #define IPMRA_VIFA_MAX (__IPMRA_VIFA_MAX - 1) > > +/* ipmr netlink cache report attributes */ > +enum { IPMRA_CACHEREPORTA_UNSPEC is missing. By the way, maybe something shorter than IPMRA_CACHEREPORTA_ would be better. What about IPMR_CREPORTA_? IPMR_CACHEA_? IPMR_IGMPA_? or whatever. What is the signification of the two 'A'? One for 'attribute', but the other? > + IPMRA_CACHEREPORTA_MSGTYPE, > + IPMRA_CACHEREPORTA_VIF_ID, > + IPMRA_CACHEREPORTA_SRC_ADDR, > + IPMRA_CACHEREPORTA_DST_ADDR, > + IPMRA_CACHEREPORTA_PKT, > + __IPMRA_CACHEREPORTA_MAX > +}; > +#define IPMRA_CACHEREPORTA_MAX (__IPMRA_CACHEREPORTA_MAX - 1)