netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: nicolas.dichtel@6wind.com,
	Callum Sinclair <callum.sinclair@alliedtelesis.co.nz>,
	davem@davemloft.net, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs
Date: Fri, 8 Feb 2019 16:43:57 +0200	[thread overview]
Message-ID: <5597e8bc-c23e-1f59-0442-260a7b4ca83d@cumulusnetworks.com> (raw)
In-Reply-To: <be9e655b-6911-c644-de63-9aabcd131763@6wind.com>

On 08/02/2019 16:18, Nicolas Dichtel wrote:
> Le 08/02/2019 à 05:11, Callum Sinclair a écrit :
>> Currently the only way to clear the mfc cache was to delete the entries
> mfc stands for 'multicast forwarding cache', so 'mfc cache' is a bit strange.
> 
>> one by one using the MRT_DEL_MFC socket option or to destroy and
>> recreate the socket.
> Note that if entries were added with MRT_ADD_MFC_PROXY, they will survive to the
> socket destruction. This is not the case with your new cmd. Is it intended?

I think you're referring to MFC_STATIC entries (sk != mroute_sk). It
doesn't matter how you add an entry - they all get cleaned up if added
through the mroute socket.

> Maybe a third option (something like MRT_FLUSH_MFC_PROXY) would be useful to
> avoid confusion?
> 
>>
>> Create a new socket option which will clear the multicast forwarding
>> cache on the socket without destroying the socket. The new socket option
>> MRT_FLUSH_ENTRIES will clear all multicast entries on the sockets table
>> and the MRT_FLUSH_VIFS will delete all multicast vifs on the socket
>> table.
>>
>> Signed-off-by: Callum Sinclair <callum.sinclair@alliedtelesis.co.nz>
>> ---
>>  include/uapi/linux/mroute.h  |  7 +++-
>>  include/uapi/linux/mroute6.h |  7 +++-
>>  net/ipv4/ipmr.c              | 69 ++++++++++++++++++++-------------
>>  net/ipv6/ip6mr.c             | 74 ++++++++++++++++++++++--------------
>>  4 files changed, 100 insertions(+), 57 deletions(-)
>>
>> diff --git a/include/uapi/linux/mroute.h b/include/uapi/linux/mroute.h
>> index 5d37a9ccce63..673495ca3495 100644
>> --- a/include/uapi/linux/mroute.h
>> +++ b/include/uapi/linux/mroute.h
>> @@ -28,12 +28,17 @@
>>  #define MRT_TABLE	(MRT_BASE+9)	/* Specify mroute table ID		*/
>>  #define MRT_ADD_MFC_PROXY	(MRT_BASE+10)	/* Add a (*,*|G) mfc entry	*/
>>  #define MRT_DEL_MFC_PROXY	(MRT_BASE+11)	/* Del a (*,*|G) mfc entry	*/
>> -#define MRT_MAX		(MRT_BASE+11)
>> +#define MRT_FLUSH	(MRT_BASE+12)	/* Flush all multicast entries and vifs	*/
> nit: "Flush all mfc entries and/or vifs" ?
> 
>> +#define MRT_MAX		(MRT_BASE+12)
>>  
>>  #define SIOCGETVIFCNT	SIOCPROTOPRIVATE	/* IP protocol privates */
>>  #define SIOCGETSGCNT	(SIOCPROTOPRIVATE+1)
>>  #define SIOCGETRPF	(SIOCPROTOPRIVATE+2)
>>  
>> +/* MRT_FLUSH optional flags */
>> +#define MRT_FLUSH_ENTRIES	1	/* For flushing all multicast entries */
> Maybe MRT_FLUSH_MFC is more consistent with the previous naming (MRT_ADD_MFC, etc.)
> 
> 
> Regards,
> Nicolas
> 


  reply	other threads:[~2019-02-08 14:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  4:11 [PATCH net-next] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs Callum Sinclair
2019-02-08  4:11 ` Callum Sinclair
2019-02-08 14:18   ` Nicolas Dichtel
2019-02-08 14:43     ` Nikolay Aleksandrov [this message]
2019-02-08 15:08       ` Nicolas Dichtel
2019-02-08 21:40         ` Nikolay Aleksandrov
2019-02-10 22:12 Callum Sinclair
2019-02-10 22:12 ` Callum Sinclair
2019-02-10 22:55   ` Nikolay Aleksandrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5597e8bc-c23e-1f59-0442-260a7b4ca83d@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=callum.sinclair@alliedtelesis.co.nz \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).