From: David Miller <davem@davemloft.net>
To: pdowney@brocade.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] IGMP: Inhibit reports for local multicast groups
Date: Tue, 25 Aug 2015 14:20:05 -0700 (PDT) [thread overview]
Message-ID: <20150825.142005.1823541352876560634.davem@davemloft.net> (raw)
In-Reply-To: <1c262ff7179d56eefb2c723538d1daaa88892730.1440415003.git.pdowney@brocade.com>
From: Philip Downey <pdowney@brocade.com>
Date: Mon, 24 Aug 2015 12:39:17 +0100
> +extern int sysctl_igmp_link_local_reports;
...
> +/* IGMP reports for link-local multicast groups are enabled by default */
> +#define IGMP_ENABLE_LLM 1
> +
> +int sysctl_igmp_link_local_reports __read_mostly = IGMP_ENABLE_LLM;
> +
> +#define IGMP_INHIBIT_LINK_LOCAL_REPORTS(_ipaddr) \
> + (ipv4_is_local_multicast(_ipaddr) && \
> + (sysctl_igmp_link_local_reports == 0))
> +
People know that "1" and "0" means enable and disable respectively, so this
macros is pretty excessive. Just remove it.
Also, simplify the name of the sysctl to something like
"sysctl_igmp_llm_reports" or similar, and simplify the test against 0
to be in the canonical "!x" format. Then the test can fit on one
line:
(ipv4_is_local_multicast(_ipaddr) && !sysctl_igmp_llm_reports)
next prev parent reply other threads:[~2015-08-25 21:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1>
2007-05-16 0:21 ` [PATCH 1/1] [TIPC]: Fixed erroneous introduction of for_each_netdev Jon Paul Maloy
2007-05-16 0:25 ` David Miller
2007-05-23 22:12 ` David Miller
2007-05-18 0:33 ` [PATCH 1/3] [TIPC]: Improved support for Ethernet traffic filtering Jon Paul Maloy
2007-05-18 0:33 ` [PATCH 2/3] [TIPC]: Use standard socket "not implemented" routines Jon Paul Maloy
2007-05-18 0:33 ` [PATCH 3/3] [TIPC]: Optimize stream send routine to avoid fragmentation Jon Paul Maloy
2015-08-24 11:39 ` [PATCH] IGMP: Inhibit reports for local multicast groups Philip Downey
2015-08-25 21:20 ` David Miller [this message]
2015-08-26 9:23 ` Philip Downey
2015-08-27 15:46 ` Philip Downey
2015-08-28 20:29 ` David Miller
2015-08-28 21:19 ` Cong Wang
2015-08-31 10:33 ` Philip Downey
2015-08-12 16:13 Philip Downey
2015-08-12 23:45 ` David Miller
2015-08-13 14:48 ` Philip Downey
2015-08-13 16:06 ` Andrew Lunn
2015-08-13 16:52 ` Philip Downey
2015-08-13 17:01 ` Andrew Lunn
2015-08-13 18:08 ` Thadeu Lima de Souza Cascardo
2015-08-14 8:55 ` Philip Downey
2015-08-14 8:56 ` Philip Downey
2015-08-14 13:35 ` Andrew Lunn
2015-08-14 14:36 ` Philip Downey
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=20150825.142005.1823541352876560634.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pdowney@brocade.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).