netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: davem@davemloft.net
Cc: hannes@stressinduktion.org, netdev@vger.kernel.org
Subject: [PATCH net-next 1/3] ipv6: mld: rename mc_maxdelay into mc_uri
Date: Tue, 23 Sep 2014 09:03:46 +0200	[thread overview]
Message-ID: <1411455828-5196-2-git-send-email-dborkman@redhat.com> (raw)
In-Reply-To: <1411455828-5196-1-git-send-email-dborkman@redhat.com>

The name mc_maxdelay is quite confusing as it actually denotes the
unsolicited report interval. Since we have query response interval
named as mc_qri, name unsolicited report interval analogously as
mc_uri. Note that both are not the same!

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 include/net/if_inet6.h |  2 +-
 net/ipv6/mcast.c       | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index d07b1a6..8daf683 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -180,7 +180,7 @@ struct inet6_dev {
 	unsigned long		mc_v1_seen;	/* Max time we stay in MLDv1 mode */
 	unsigned long		mc_qi;		/* Query Interval */
 	unsigned long		mc_qri;		/* Query Response Interval */
-	unsigned long		mc_maxdelay;
+	unsigned long		mc_uri;		/* Unsolicited Report Interval */
 
 	struct timer_list	mc_gq_timer;	/* general query timer */
 	struct timer_list	mc_ifc_timer;	/* interface change timer */
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 592eba6..3d0e8fc 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -996,7 +996,7 @@ bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group,
 
 static void mld_gq_start_timer(struct inet6_dev *idev)
 {
-	unsigned long tv = prandom_u32() % idev->mc_maxdelay;
+	unsigned long tv = prandom_u32() % idev->mc_uri;
 
 	idev->mc_gq_running = 1;
 	if (!mod_timer(&idev->mc_gq_timer, jiffies+tv+2))
@@ -1274,7 +1274,7 @@ static int mld_process_v2(struct inet6_dev *idev, struct mld2_query *mld,
 	mld_update_qi(idev, mld);
 	mld_update_qri(idev, mld);
 
-	idev->mc_maxdelay = *max_delay;
+	idev->mc_uri = *max_delay;
 
 	return 0;
 }
@@ -2037,7 +2037,7 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev)
 		mld_send_initial_cr(idev);
 		idev->mc_dad_count--;
 		if (idev->mc_dad_count)
-			mld_dad_start_timer(idev, idev->mc_maxdelay);
+			mld_dad_start_timer(idev, idev->mc_uri);
 	}
 }
 
@@ -2049,7 +2049,7 @@ static void mld_dad_timer_expire(unsigned long data)
 	if (idev->mc_dad_count) {
 		idev->mc_dad_count--;
 		if (idev->mc_dad_count)
-			mld_dad_start_timer(idev, idev->mc_maxdelay);
+			mld_dad_start_timer(idev, idev->mc_uri);
 	}
 	in6_dev_put(idev);
 }
@@ -2407,7 +2407,7 @@ static void mld_ifc_timer_expire(unsigned long data)
 	if (idev->mc_ifc_count) {
 		idev->mc_ifc_count--;
 		if (idev->mc_ifc_count)
-			mld_ifc_start_timer(idev, idev->mc_maxdelay);
+			mld_ifc_start_timer(idev, idev->mc_uri);
 	}
 	in6_dev_put(idev);
 }
@@ -2481,8 +2481,8 @@ static void ipv6_mc_reset(struct inet6_dev *idev)
 	idev->mc_qrv = sysctl_mld_qrv;
 	idev->mc_qi = MLD_QI_DEFAULT;
 	idev->mc_qri = MLD_QRI_DEFAULT;
+	idev->mc_uri = unsolicited_report_interval(idev);
 	idev->mc_v1_seen = 0;
-	idev->mc_maxdelay = unsolicited_report_interval(idev);
 }
 
 /* Device going up */
-- 
1.7.11.7

  reply	other threads:[~2014-09-23  7:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  7:03 [PATCH net-next 0/3] mld updates, part 2 Daniel Borkmann
2014-09-23  7:03 ` Daniel Borkmann [this message]
2014-09-24 20:34   ` [PATCH net-next 1/3] ipv6: mld: rename mc_maxdelay into mc_uri Hannes Frederic Sowa
2014-09-23  7:03 ` [PATCH net-next 2/3] ipv6: mld: do not overwrite uri when receiving an mldv2 query Daniel Borkmann
2014-09-24 20:36   ` Hannes Frederic Sowa
2014-09-25 16:02   ` David L Stevens
2014-09-25 20:06     ` Daniel Borkmann
2014-09-25 23:23       ` David L Stevens
2014-09-26  9:29         ` Daniel Borkmann
2014-09-26 12:13           ` David L Stevens
2014-09-26 12:23             ` Daniel Borkmann
2014-09-25 23:29       ` David L Stevens
2014-09-23  7:03 ` [PATCH net-next 3/3] ipv6: mld: remove duplicate code from mld_update_qri Daniel Borkmann
2014-09-24 20:36   ` Hannes Frederic Sowa

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=1411455828-5196-2-git-send-email-dborkman@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.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).