netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MLDv1 /proc/net/igmp6 timer printing [PATCH]
@ 2003-11-19  4:55 David Stevens
  2003-11-19  6:57 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Stevens @ 2003-11-19  4:55 UTC (permalink / raw)
  To: davem, netdev

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]





Dave,
      This is a bug, but mostly cosmetic, and it appears to have
been there forever. It wasted a couple minutes for me because I
expected the igmp6 file would list the timer correctly when it's
running, but because of this bug, it doesn't. Let me know if I should
hold it until later.
      The problem is the IPv6 multicast address flag
"MAF_TIMER_RUNNING" is set on a join_group, and cleared
by a report, but is never set again (e.g., from a query). The timer
is set and running, but the /proc entry won't show it because it
only reports the time left on the timer if the flag is set.
      Fix is to set the flag when the timer is set.

                        +-DLS

--- linux-2.6.0-test9-bk12/net/ipv6/mcast.c     2003-11-07 14:13:21.000000000 -0800
+++ linux-2.6.0-test9-bk12F1/net/ipv6/mcast.c   2003-11-18 20:38:00.000000000 -0800
@@ -978,6 +978,7 @@
      ma->mca_timer.expires = jiffies + delay;
      if (!mod_timer(&ma->mca_timer, jiffies + delay))
            atomic_inc(&ma->mca_refcnt);
+     ma->mca_flags |= MAF_TIMER_RUNNING;
 }

 static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,

(See attached file: mldtr.patch)

[-- Attachment #2: mldtr.patch --]
[-- Type: application/octet-stream, Size: 414 bytes --]

--- linux-2.6.0-test9-bk12/net/ipv6/mcast.c	2003-11-07 14:13:21.000000000 -0800
+++ linux-2.6.0-test9-bk12F1/net/ipv6/mcast.c	2003-11-18 20:38:00.000000000 -0800
@@ -978,6 +978,7 @@
 	ma->mca_timer.expires = jiffies + delay;
 	if (!mod_timer(&ma->mca_timer, jiffies + delay))
 		atomic_inc(&ma->mca_refcnt);
+	ma->mca_flags |= MAF_TIMER_RUNNING;
 }
 
 static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: MLDv1 /proc/net/igmp6 timer printing [PATCH]
@ 2003-11-19  7:59 David Stevens
  2003-11-19  8:05 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 4+ messages in thread
From: David Stevens @ 2003-11-19  7:59 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]





Ok, here's the revised patch.

            +-DLS

--- linux-2.6.0-test9-bk23/net/ipv6/mcast.c     2003-11-18 23:20:56.000000000 -0800
+++ linux-2.6.0-test9-bk23F1/net/ipv6/mcast.c   2003-11-18 23:30:18.573414608 -0800
@@ -36,6 +36,7 @@
 #include <linux/socket.h>
 #include <linux/sockios.h>
 #include <linux/jiffies.h>
+#include <linux/times.h>
 #include <linux/net.h>
 #include <linux/in.h>
 #include <linux/in6.h>
@@ -978,6 +979,7 @@
      ma->mca_timer.expires = jiffies + delay;
      if (!mod_timer(&ma->mca_timer, jiffies + delay))
            atomic_inc(&ma->mca_refcnt);
+     ma->mca_flags |= MAF_TIMER_RUNNING;
 }

 static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
@@ -2157,7 +2159,8 @@
               state->dev->ifindex, state->dev->name,
               NIP6(im->mca_addr),
               im->mca_users, im->mca_flags,
-              (im->mca_flags&MAF_TIMER_RUNNING) ? im->mca_timer.expires-jiffies : 0);
+              (im->mca_flags&MAF_TIMER_RUNNING) ?
+              jiffies_to_clock_t(im->mca_timer.expires-jiffies) : 0);
      return 0;
 }

(See attached file: mld2tr2.patch)

[-- Attachment #2: mld2tr2.patch --]
[-- Type: application/octet-stream, Size: 940 bytes --]

--- linux-2.6.0-test9-bk23/net/ipv6/mcast.c	2003-11-18 23:20:56.000000000 -0800
+++ linux-2.6.0-test9-bk23F1/net/ipv6/mcast.c	2003-11-18 23:30:18.573414608 -0800
@@ -36,6 +36,7 @@
 #include <linux/socket.h>
 #include <linux/sockios.h>
 #include <linux/jiffies.h>
+#include <linux/times.h>
 #include <linux/net.h>
 #include <linux/in.h>
 #include <linux/in6.h>
@@ -978,6 +979,7 @@
 	ma->mca_timer.expires = jiffies + delay;
 	if (!mod_timer(&ma->mca_timer, jiffies + delay))
 		atomic_inc(&ma->mca_refcnt);
+	ma->mca_flags |= MAF_TIMER_RUNNING;
 }
 
 static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
@@ -2157,7 +2159,8 @@
 		   state->dev->ifindex, state->dev->name,
 		   NIP6(im->mca_addr),
 		   im->mca_users, im->mca_flags,
-		   (im->mca_flags&MAF_TIMER_RUNNING) ? im->mca_timer.expires-jiffies : 0);
+		   (im->mca_flags&MAF_TIMER_RUNNING) ?
+		   jiffies_to_clock_t(im->mca_timer.expires-jiffies) : 0);
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-19  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-19  4:55 MLDv1 /proc/net/igmp6 timer printing [PATCH] David Stevens
2003-11-19  6:57 ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2003-11-19  7:59 David Stevens
2003-11-19  8:05 ` YOSHIFUJI Hideaki / 吉藤英明

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).