From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Callum Sinclair <callum.sinclair@alliedtelesis.co.nz>,
davem@davemloft.net, kuznet@ms2.inr.ac.ru,
yoshfuji@linux-ipv6.org, nikolay@cumulusnetworks.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs
Date: Thu, 14 Feb 2019 15:16:14 +0100 [thread overview]
Message-ID: <75b01657-456d-8954-55cd-d10d71a23bbe@6wind.com> (raw)
In-Reply-To: <20190214024418.21490-2-callum.sinclair@alliedtelesis.co.nz>
Le 14/02/2019 à 03:44, Callum Sinclair a écrit :
> Currently the only way to clear the forwarding cache was to delete the
> entries one by one using the MRT_DEL_MFC socket option or to destroy and
> recreate the socket.
>
> Create a new socket option which with the use of optional flags can
> clear any combination of multicast entries (static or not static) and
> multicast vifs (static or not static).
>
> Calling the new socket option MRT_FLUSH with the flags MRT_FLUSH_MFC and
> MRT_FLUSH_VIFS will clear all entries and vifs on the socket except for
> static entries.
>
> Signed-off-by: Callum Sinclair <callum.sinclair@alliedtelesis.co.nz>
Except two minor comments (see below),
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
[snip]
> +/* MRT6_FLUSH optional flags */
> +#define MRT6_FLUSH_MFC 1 /* Flush multicast entries */
> +#define MRT6_FLUSH_MFC_STATIC 2 /* Flush static multicast entries */
> +#define MRT6_FLUSH_VIFS 4 /* Flushing multicast vifs */
> +#define MRT6_FLUSH_VIFS_STATIC 8 /* Flush static multicast vifs */
vifs are called mifs in ipv6, maybe it's better to keep the consistency with
MRT6_FLUSH_MIFS and MRT6_FLUSH_MIFS_STATIC.
[snip]
> + if (flags & (MRT6_FLUSH_MFC | MRT6_FLUSH_MFC_STATIC)) {
> + list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
> + if (((c->mfc_flags & MFC_STATIC) && !(flags & MRT6_FLUSH_MFC_STATIC)) ||
> + (!(c->mfc_flags & MFC_STATIC) && !(flags & MRT6_FLUSH_MFC)))
> + continue;
> + rhltable_remove(&mrt->mfc_hash, &c->mnode, ip6mr_rht_params);
> + list_del_rcu(&c->list);
> + call_ip6mr_mfc_entry_notifiers(read_pnet(&mrt->net),
> + FIB_EVENT_ENTRY_DEL,
> + (struct mfc6_cache *)c, mrt->id);
Two many tabs here.
Regards,
Nicolas
next prev parent reply other threads:[~2019-02-14 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 2:44 [PATCH net-next v5] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs Callum Sinclair
2019-02-14 2:44 ` Callum Sinclair
2019-02-14 14:16 ` Nicolas Dichtel [this message]
2019-02-16 0:21 ` Nikolay Aleksandrov
2019-02-17 18:37 ` David Miller
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=75b01657-456d-8954-55cd-d10d71a23bbe@6wind.com \
--to=nicolas.dichtel@6wind.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=nikolay@cumulusnetworks.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).