mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Knoblauch <knobi@knobisoft.de>
To: David Stevens <dlstevens@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: Any changes in Multicast code between 2.4.20 and 2.4.22/23 ? -> New Info
Date: Thu, 8 Jan 2004 10:03:02 -0800 (PST)	[thread overview]
Message-ID: <20040108180302.17660.qmail@web13909.mail.yahoo.com> (raw)
In-Reply-To: <OFFB53E1E3.C0B1F8BC-ON88256E14.003560C9@us.ibm.com>

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

--- David Stevens <dlstevens@us.ibm.com> wrote:
> 
> 
> 
> 
>       There were some unwanted side-effects in multicast delivery
> because
> of the source filtering but I'm pretty sure those fixes are in the
> 2.4
> line.
> 
David,

 maybe they are not :-)

 After some more playing with printk-s and a bit of gross hacking I
think I am up to something.

 Please look at the appended patch on top of 2.4.22. It adds some
printk-s and also makes some of the V2 pathes trigger by adding "1 ||"
to some statemens.

 With this all of a sudden the external packets to the 239.2.11.71
group of Ganglia come in again.

 Now, what does it mean?

a) IGMP_V2_SEEN does not work as expected ?
b) something with the timer codes is fishy ?
c) whatever ...

 Again, hope this helps to shed light on the problem.

Martin

=====
------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www:   http://www.knobisoft.de

[-- Attachment #2: igmp.diff --]
[-- Type: application/octet-stream, Size: 3679 bytes --]

--- ../../../linux-2.4.22-3-msc/net/ipv4/igmp.c	Mon Aug 25 13:44:44 2003
+++ ./igmp.c	Thu Jan  8 18:39:48 2004
@@ -477,6 +477,7 @@
 	struct sk_buff *skb = 0;
 	int type;
 
+	printk(KERN_DEBUG "igmpv3_send_report\n");
 	if (!pmc) {
 		read_lock(&in_dev->lock);
 		for (pmc=in_dev->mc_list; pmc; pmc=pmc->next) {
@@ -609,6 +610,7 @@
 	u32	group = pmc ? pmc->multiaddr : 0;
 	u32	dst;
 
+	printk(KERN_DEBUG "igmp_send_report: %0x %d\n",group, type);
 	if (type == IGMPV3_HOST_MEMBERSHIP_REPORT)
 		return igmpv3_send_report(in_dev, pmc);
 	else if (type == IGMP_HOST_LEAVE_MESSAGE)
@@ -708,9 +710,10 @@
 	im->reporter = 1;
 	spin_unlock(&im->lock);
 
+	printk(KERN_DEBUG "igmp_timer_expire\n");
 	if (IGMP_V1_SEEN(in_dev))
 		igmp_send_report(in_dev, im, IGMP_HOST_MEMBERSHIP_REPORT);
-	else if (IGMP_V2_SEEN(in_dev))
+	else if (1 || IGMP_V2_SEEN(in_dev))
 		igmp_send_report(in_dev, im, IGMPV2_HOST_MEMBERSHIP_REPORT);
 	else
 		igmp_send_report(in_dev, im, IGMPV3_HOST_MEMBERSHIP_REPORT);
@@ -774,6 +777,7 @@
 				IGMP_V1_Router_Present_Timeout;
 			group = 0;
 		} else {
+			printk(KERN_DEBUG "igmp_heard_query for V2\n");
 			/* v2 router present */
 			max_delay = ih->code*(HZ/IGMP_TIMER_SCALE);
 			in_dev->mr_v2_seen = jiffies +
@@ -840,11 +844,13 @@
 	struct in_device *in_dev = in_dev_get(skb->dev);
 	int len = skb->len;
 
+	printk(KERN_DEBUG "igmp_rcv: entered\n");
 	if (in_dev==NULL) {
 		kfree_skb(skb);
 		return 0;
 	}
 
+	printk(KERN_DEBUG "igmp_rcv: 1\n");
 	if (skb_is_nonlinear(skb)) {
 		if (skb_linearize(skb, GFP_ATOMIC) != 0) {
 			kfree_skb(skb);
@@ -853,12 +859,14 @@
 		ih = skb->h.igmph;
 	}
 
+	printk(KERN_DEBUG "igmp_rcv: 2\n");
 	if (len < sizeof(struct igmphdr) || ip_compute_csum((void *)ih, len)) {
 		in_dev_put(in_dev);
 		kfree_skb(skb);
 		return 0;
 	}
 
+	printk(KERN_DEBUG "igmp_rcv: 3\n");
 	switch (ih->type) {
 	case IGMP_HOST_MEMBERSHIP_QUERY:
 		igmp_heard_query(in_dev, ih, len);
@@ -909,6 +917,7 @@
 	   if (dev->mc_list && dev->flags&IFF_MULTICAST) { do it; }
 	   --ANK
 	   */
+	printk(KERN_DEBUG "ip_mc_filter_add: %s %x\n",dev->name,addr);
 	if (arp_mc_map(addr, buf, dev, 0) == 0)
 		dev_mc_add(dev,buf,dev->addr_len,0);
 }
@@ -1052,7 +1061,7 @@
 	if (in_dev->dev->flags & IFF_UP) {
 		if (IGMP_V1_SEEN(in_dev))
 			goto done;
-		if (IGMP_V2_SEEN(in_dev)) {
+		if (1 || IGMP_V2_SEEN(in_dev)) {
 			if (reporter)
 				igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE);
 			goto done;
@@ -1071,16 +1080,19 @@
 {
 	struct in_device *in_dev = im->interface;
 
+	printk(KERN_DEBUG "igmp_group_added: 1\n");
 	if (im->loaded == 0) {
 		im->loaded = 1;
 		ip_mc_filter_add(in_dev, im->multiaddr);
 	}
 
 #ifdef CONFIG_IP_MULTICAST
+	printk(KERN_DEBUG "igmp_group_added: 2\n");
 	if (im->multiaddr == IGMP_ALL_HOSTS)
 		return;
 
-	if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
+	printk(KERN_DEBUG "igmp_group_added: 3\n");
+	if (1 || IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
 		spin_lock_bh(&im->lock);
 		igmp_start_timer(im, IGMP_Initial_Report_Delay);
 		spin_unlock_bh(&im->lock);
@@ -1088,6 +1100,7 @@
 	}
 	/* else, v3 */
 
+	printk(KERN_DEBUG "igmp_group_added: 4\n");
 	im->crcount = in_dev->mr_qrv ? in_dev->mr_qrv :
 		IGMP_Unsolicited_Report_Count;
 	igmp_ifc_event(in_dev);
@@ -1110,6 +1123,7 @@
 
 	ASSERT_RTNL();
 
+	printk(KERN_DEBUG "ip_mc_inc_group: %s %x\n",in_dev->dev->name,addr);
 	for (im=in_dev->mc_list; im; im=im->next) {
 		if (im->multiaddr == addr) {
 			im->users++;
@@ -1135,6 +1149,7 @@
 	im->crcount = 0;
 	atomic_set(&im->refcnt, 1);
 	spin_lock_init(&im->lock);
+	printk(KERN_DEBUG "ip_mc_inc_group: 1\n");
 #ifdef CONFIG_IP_MULTICAST
 	im->tm_running=0;
 	init_timer(&im->timer);

  parent reply	other threads:[~2004-01-08 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OFFB53E1E3.C0B1F8BC-ON88256E14.003560C9@us.ibm.com>
2004-01-07 14:08 ` Martin Knoblauch
2004-01-08 18:03 ` Martin Knoblauch [this message]
     [not found] <OFF9934921.DF9DB0E3-ON88256E15.00658D89@us.ibm.com>
2004-01-09  8:37 ` Martin Knoblauch
     [not found] <OFDDD008B9.906B9BD6-ON88256E14.0038B2E4@us.ibm.com>
2004-01-07 19:24 ` Martin Knoblauch
2004-01-07 10:27 Martin Knoblauch
  -- strict thread matches above, loose matches on Subject: below --
2004-01-07  9:28 Martin Knoblauch

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=20040108180302.17660.qmail@web13909.mail.yahoo.com \
    --to=knobi@knobisoft.de \
    --cc=dlstevens@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@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

all inboxes | Powered by JetHome®