netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shirley Ma <mashirle@us.ibm.com>
To: davem@redhat.com
Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org, xma@us.ibm.com
Subject: [PATCH]Add IPv6 MIBs counters in MLD (mcast.c)
Date: Wed, 31 Mar 2004 13:26:43 -0800	[thread overview]
Message-ID: <200403311326.43647.mashirle@us.ibm.com> (raw)
In-Reply-To: <OF3E88B8EA.382D75F6-ON87256E5C.00272BAC-88256E5C.0027A5ED@us.ibm.com>

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

Here is the patch against linux 2.6.4 kernel. Please review it.

Thanks
Shirley Ma
IBM Linux Technology Center


[-- Attachment #2: linux-2.6.4-mld-ipv6mib.patch --]
[-- Type: text/x-diff, Size: 1627 bytes --]

diff -urN linux-2.6.4/net/ipv6/mcast.c linux-2.6.4-mld/net/ipv6/mcast.c
--- linux-2.6.4/net/ipv6/mcast.c	2004-03-10 18:55:43.000000000 -0800
+++ linux-2.6.4-mld/net/ipv6/mcast.c	2004-03-31 12:05:11.767673936 -0800
@@ -1317,6 +1317,7 @@
 	struct inet6_dev *idev = in6_dev_get(skb->dev);
 	int err;
 
+	IP6_INC_STATS(Ip6OutRequests);
 	payload_len = skb->tail - (unsigned char *)skb->nh.ipv6h -
 		sizeof(struct ipv6hdr);
 	mldlen = skb->tail - skb->h.raw;
@@ -1326,8 +1327,12 @@
 		IPPROTO_ICMPV6, csum_partial(skb->h.raw, mldlen, 0));
 	err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev,
 		dev_queue_xmit);
-	if (!err)
+	if (!err) {
 		ICMP6_INC_STATS(idev,Icmp6OutMsgs);
+		IP6_INC_STATS(Ip6OutMcastPkts);
+	} else
+		IP6_INC_STATS(Ip6OutDiscards);
+
 	if (likely(idev != NULL))
 		in6_dev_put(idev);
 }
@@ -1608,6 +1613,7 @@
 		     IPV6_TLV_ROUTERALERT, 2, 0, 0,
 		     IPV6_TLV_PADN, 0 };
 
+	IP6_INC_STATS(Ip6OutRequests);
 	snd_addr = addr;
 	if (type == ICMPV6_MGM_REDUCTION) {
 		snd_addr = &all_routers;
@@ -1620,8 +1626,10 @@
 
 	skb = sock_alloc_send_skb(sk, LL_RESERVED_SPACE(dev) + full_len, 1, &err);
 
-	if (skb == NULL)
+	if (skb == NULL) {
+		IP6_INC_STATS(Ip6OutDiscards);
 		return;
+	}
 
 	skb_reserve(skb, LL_RESERVED_SPACE(dev));
 	if (dev->hard_header) {
@@ -1664,13 +1672,16 @@
 		else
 			ICMP6_INC_STATS(idev, Icmp6OutGroupMembResponses);
 		ICMP6_INC_STATS(idev, Icmp6OutMsgs);
-	}
+		IP6_INC_STATS(Ip6OutMcastPkts);
+	} else
+		IP6_INC_STATS(Ip6OutDiscards);
 
 	if (likely(idev != NULL))
 		in6_dev_put(idev);
 	return;
 
 out:
+	IP6_INC_STATS(Ip6OutDiscards);
 	kfree_skb(skb);
 }
 

  parent reply	other threads:[~2004-03-31 21:26 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-17 19:30 [PATCH]dump interface IPv6 multicast/anycast addresses through netlink Shirley Ma
2004-03-19  6:06 ` David S. Miller
2004-03-19  6:52   ` YOSHIFUJI Hideaki / 吉藤英明
2004-03-19  6:55 ` YOSHIFUJI Hideaki / 吉藤英明
2004-03-19  7:16   ` Shirley Ma
2004-03-19  7:32     ` David S. Miller
2004-03-19  8:03       ` Shirley Ma
2004-03-31 18:07     ` Shirley Ma
2004-04-01  4:50       ` YOSHIFUJI Hideaki / 吉藤英明
2004-04-01  5:18         ` Shirley Ma
2004-04-01 18:28           ` Shirley Ma
2004-04-03 22:45             ` David S. Miller
2004-04-05 20:51               ` Shirley Ma
2004-04-05 21:42                 ` David S. Miller
2004-04-06  0:11                   ` Fix IPv6 MIBs counters in 2.6.5 kernel Shirley Ma
2004-04-09 23:27                     ` David S. Miller
2004-03-31 21:26     ` Shirley Ma [this message]
2004-04-03 22:30       ` [PATCH]Add IPv6 MIBs counters in MLD (mcast.c) David S. Miller
2004-05-26 20:10       ` [PATCH]Add new IPv6 MIBs counters support through netlink Shirley Ma
2004-05-26 20:22         ` David S. Miller
2004-05-26 20:42           ` Shirley Ma
2004-05-26 20:44             ` David S. Miller
2004-05-26 23:08               ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-26 23:22                 ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-26 23:22                 ` David S. Miller
2004-05-26 23:34                   ` Shirley Ma
2004-05-26 23:32                 ` Shirley Ma
2004-05-26 23:58                   ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-27  0:01                     ` David S. Miller
2004-06-09 23:00         ` [PATCH] dst allocation problem in ndisc Shirley Ma
2004-06-10  2:12           ` YOSHIFUJI Hideaki / 吉藤英明
2004-06-10 20:05             ` Shirley Ma
2004-06-10 20:46               ` Shirley Ma
2004-06-11  5:08                 ` David S. Miller
2004-06-09 23:29         ` [PATCH] some condition check error in ipsec v6 Shirley Ma
2004-06-10  1:48           ` YOSHIFUJI Hideaki / 吉藤英明
2004-06-11  5:11           ` David S. Miller
2004-05-26 20:19 ` [PATCH] pmtu check conditions error in IPv6 Shirley Ma
2004-05-26 20:24   ` David S. Miller
2004-05-26 20:50   ` [PATCH] IFA_MAX sets wrong in rtnetlink.h Shirley Ma
2004-05-26 20:56     ` David S. Miller
2004-05-28  4:48       ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-28  5:07         ` David S. Miller
2004-05-28  5:12           ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-28  9:25             ` YOSHIFUJI Hideaki / 吉藤英明
2004-05-29 19:36               ` David S. Miller
2004-05-28  9:27             ` YOSHIFUJI Hideaki / 吉藤英明

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=200403311326.43647.mashirle@us.ibm.com \
    --to=mashirle@us.ibm.com \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=xma@us.ibm.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).