* sctp snmp mib stats in /proc/net/snmp
@ 2002-10-28 23:51 Nivedita Singhvi
2002-10-29 13:49 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-10-28 23:51 UTC (permalink / raw)
To: netdev, linux-net
Hi,
I'm attaching a bitkeeper patch below that adds
support for the display of sctp snmp mib stats
in /proc/net/snmp. It is dependent on several
patches already submitted/accepted into the
SCTP tree. This patch is also slated for
inclusion in the sourceforge linux kernel sctp
project tree, given no objections here.
I'm posting this to netdev and linux-net in case
anyone has any issues with the /proc/net/snmp
display altering (post feature freeze and all
that) even though I dont think that really applies
here (or for any additional such changes in
the near future)..
thanks,
Nivedita
This BitKeeper patch contains the following changesets:
1.814
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: nivedita
# Host: w-nivedita.beaverton.ibm.com
# Root: /home/nivedita/sctp/sc3/lksctp-2.5
#
#--- 1.4/net/ipv4/proc.c Sun Sep 29 17:56:38 2002
#+++ 1.5/net/ipv4/proc.c Mon Oct 28 12:41:20 2002
#@@ -49,6 +49,8 @@
# #include <linux/skbuff.h>
# #include <net/sock.h>
# #include <net/raw.h>
#+#include <net/sctp/sctp.h> /* for sctp_statistics */
#+
#
# static int fold_prot_inuse(struct proto *proto)
# {
#@@ -143,8 +145,13 @@
# for (i=0; i<offsetof(struct udp_mib, __pad)/sizeof(unsigned long); i++)
# len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)udp_statistics, sizeof(struct udp_mib), i));
#
#- len += sprintf (buffer + len, "\n");
#+ len += sprintf (buffer +len,
#+ "\nSctp: CurrEstab ActiveEstabs PassiveEstabs Aborteds Shutdowns OutOfBlues ChecksumErrors OutCtrlChunks OutOrderChunks OutUnorderChunks InCtrlChunks InOrderChunks InUnorderChunks FragUsrMsgs ReasmUsrMsgs OutSCTPPacks InSCTPPacks RtoAlgorithm RtoMin RtoMax RtoInitial ValCookieLife MaxInitRetr\n"
#+ "Sctp:");
#+ for (i=0; i<offsetof(struct sctp_mib, __pad)/sizeof(unsigned long); i++)
#+ len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)sctp_statistics, sizeof(struct sctp_mib), i));
#
#+ len += sprintf (buffer + len, "\n");
# if (offset >= len)
# {
# *start = buffer;
#
# Diff checksum=febe7f08
# Patch vers: 1.3
# Patch type: REGULAR
== ChangeSet ==
torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
jgrimm@touki.austin.ibm.com|ChangeSet|20021028142304|29005
D 1.814 02/10/28 12:42:00-08:00 nivedita@w-nivedita.beaverton.ibm.com +1 -0
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c SCTP: Added SCTP SNMP stats display in /proc/net/snmp
K 30551
P ChangeSet
------------------------------------------------
0a0
> torvalds@athlon.transmeta.com|net/ipv4/proc.c|20020205173958|34679|e9623c7f3908083b nivedita@w-nivedita.beaverton.ibm.com|net/ipv4/proc.c|20021028204120|53456
== net/ipv4/proc.c ==
torvalds@athlon.transmeta.com|net/ipv4/proc.c|20020205173958|34679|e9623c7f3908083b
schoenfr@gaaertner.de|net/ipv4/proc.c|20020930005638|00910
D 1.5 02/10/28 12:41:20-08:00 nivedita@w-nivedita.beaverton.ibm.com +8 -1
B torvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c Added SCTP SNMP stats display support
K 53456
O -rw-rw-r--
P net/ipv4/proc.c
------------------------------------------------
I51 2
#include <net/sctp/sctp.h> /* for sctp_statistics */
\
D146 1
I146 5
len += sprintf (buffer +len,
"\nSctp: CurrEstab ActiveEstabs PassiveEstabs Aborteds Shutdowns OutOfBlues ChecksumErrors OutCtrlChunks OutOrderChunks OutUnorderChunks InCtrlChunks InOrderChunks InUnorderChunks FragUsrMsgs ReasmUsrMsgs OutSCTPPacks InSCTPPacks RtoAlgorithm RtoMin RtoMax RtoInitial ValCookieLife MaxInitRetr\n"
"Sctp:");
for (i=0; i<offsetof(struct sctp_mib, __pad)/sizeof(unsigned long); i++)
len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)sctp_statistics, sizeof(struct sctp_mib), i));
I147 1
len += sprintf (buffer + len, "\n");
# Patch checksum=bf9e22f6
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
2002-10-28 23:51 Nivedita Singhvi
@ 2002-10-29 13:49 ` David S. Miller
0 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2002-10-29 13:49 UTC (permalink / raw)
To: niv; +Cc: netdev, linux-net
From: Nivedita Singhvi <niv@us.ibm.com>
Date: Mon, 28 Oct 2002 15:51:14 -0800 (PST)
I'm posting this to netdev and linux-net in case
anyone has any issues with the /proc/net/snmp
display altering (post feature freeze and all
that) even though I dont think that really applies
here (or for any additional such changes in
the near future)..
I can barely parse this, please output bitkeeper patches
in gnupatch format (pass "-tu" to bk export) when you wish
humans to read it. :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
2002-10-29 17:21 sctp snmp mib stats in /proc/net/snmp Nivedita Singhvi
@ 2002-10-29 17:18 ` David S. Miller
2002-10-29 17:32 ` Nivedita Singhvi
0 siblings, 1 reply; 7+ messages in thread
From: David S. Miller @ 2002-10-29 17:18 UTC (permalink / raw)
To: niv; +Cc: netdev
From: Nivedita Singhvi <niv@us.ibm.com>
Date: Tue, 29 Oct 2002 09:21:40 -0800 (PST)
Ah, sorry about that, and thanks for the
tip :). Will do next time..For now, here is
the plain diff.
Where will sctp_statistics be defined? If it will be in net/sctp/*.c,
then you will need to ifdef this ipv4 procfs code on CONFIG_IP_SCTP
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
@ 2002-10-29 17:21 Nivedita Singhvi
2002-10-29 17:18 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-10-29 17:21 UTC (permalink / raw)
To: davem; +Cc: netdev
"David S. Miller" wrote:
> I can barely parse this, please output bitkeeper patches
> in gnupatch format (pass "-tu" to bk export) when you wish
> humans to read it. :-)
>
Ah, sorry about that, and thanks for the
tip :). Will do next time..For now, here is
the plain diff.
thanks,
Nivedita
diff -urN linux-2.5.44/net/ipv4/proc.c linux-2.5.44sc6/net/ipv4/proc.c
--- linux-2.5.44/net/ipv4/proc.c Fri Oct 18 21:01:08 2002
+++ linux-2.5.44sc6/net/ipv4/proc.c Fri Oct 25 15:38:35 2002
@@ -49,6 +49,8 @@
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/raw.h>
+#include <net/sctp/sctp.h> /* for sctp_statistics */
+
static int fold_prot_inuse(struct proto *proto)
{
@@ -143,8 +145,13 @@
for (i=0; i<offsetof(struct udp_mib, __pad)/sizeof(unsigned long); i++)
len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)udp_statistics, sizeof(struct udp_mib), i));
- len += sprintf (buffer + len, "\n");
+ len += sprintf (buffer +len,
+ "\nSctp: CurrEstab ActiveEstabs PassiveEstabs Aborteds Shutdowns OutOfBlues ChecksumErrors OutCtrlChunks OutOrderChunks OutUnorderChunks InCtrlChunks InOrderChunks InUnorderChunks FragUsrMsgs ReasmUsrMsgs OutSCTPPacks InSCTPPacks RtoAlgorithm RtoMin RtoMax RtoInitial ValCookieLife MaxInitRetr\n"
+ "Sctp:");
+ for (i=0; i<offsetof(struct sctp_mib, __pad)/sizeof(unsigned long); i++)
+ len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)sctp_statistics, sizeof(struct sctp_mib), i));
+ len += sprintf (buffer + len, "\n");
if (offset >= len)
{
*start = buffer;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
2002-10-29 17:18 ` David S. Miller
@ 2002-10-29 17:32 ` Nivedita Singhvi
2002-11-05 22:33 ` Nivedita Singhvi
0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-10-29 17:32 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
"David S. Miller" wrote:
>
> From: Nivedita Singhvi <niv@us.ibm.com>
> Date: Tue, 29 Oct 2002 09:21:40 -0800 (PST)
>
> Ah, sorry about that, and thanks for the
> tip :). Will do next time..For now, here is
> the plain diff.
>
> Where will sctp_statistics be defined? If it will be in net/sctp/*.c,
> then you will need to ifdef this ipv4 procfs code on CONFIG_IP_SCTP
Rats, yes, it is in net/sctp/protocol.c. I'll move it under the ifdef
and make up a complete patch with the dependent code for review
purposes and repost. Thanks for the catch!
thanks,
Nivedita
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
2002-10-29 17:32 ` Nivedita Singhvi
@ 2002-11-05 22:33 ` Nivedita Singhvi
2002-11-05 23:34 ` David S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Nivedita Singhvi @ 2002-11-05 22:33 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-net, lksctp-developers
Nivedita Singhvi wrote:
>
> "David S. Miller" wrote:
> > Where will sctp_statistics be defined? If it will be in net/sctp/*.c,
> > then you will need to ifdef this ipv4 procfs code on CONFIG_IP_SCTP
>
> Rats, yes, it is in net/sctp/protocol.c. I'll move it under the ifdef
> and make up a complete patch with the dependent code for review
> purposes and repost. Thanks for the catch!
My apologies for the latency in getting back on this (critical
interrupts from other directions)..
We're considering a modification to the original proposal, which
was to display SCTP SNMP stats in /proc/net/snmp along with the
other AF_INET protocols currently being displayed.
We're now considering simply displaying the sctp stats structures
(snmp and other extended) under the /proc/net/sctp/ subdirectory.
This is due to several reasons - one is that the CONFIG_IP_SCTP
def isnt enough. SCTP can also be compiled as a module, and may
or may not be loaded. We cant make assumptions in net/ipv4/proc.c
about whether the sctp_statistics structure is available or not..
Note #if defined (CONFIG_IP_SCTP) || defined (CONFIG_IP_SCTP_MODULE)
isnt enough. A clean way to do this would be to have an af_inet
top level registration process and have the sctp module register
when loaded, as is typical elsewhere. We really dont want to do
this at this point, and introduce too many dependencies on directories
outside of net/sctp at this time.
Secondly, the SCTP MIB is still being formed, and we're probably
going to need additions/changes to the spec. In the interim, (or
possibly, permanently) we're going to need extended sctp stats which
arent in the spec, much like the current linux mib struct which
defines a set of extended TCP counters.
It would be easier to manage this under the sctp subdirectory
altogether. i.e. We diplay the SCTP SNMP and other extended stats
as /proc/net/sctp/snmp and /proc/net/sctp/sctp_mib or some such
name (which would be somewhat dynamic short term). This would also
solve unnecessary duplication for AF_INET6 for us.
Any issues, thoughts, suggestions?
thanks,
Nivedita
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sctp snmp mib stats in /proc/net/snmp
2002-11-05 22:33 ` Nivedita Singhvi
@ 2002-11-05 23:34 ` David S. Miller
0 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2002-11-05 23:34 UTC (permalink / raw)
To: niv; +Cc: netdev, linux-net, lksctp-developers
From: Nivedita Singhvi <niv@us.ibm.com>
Date: Tue, 05 Nov 2002 14:33:43 -0800
It would be easier to manage this under the sctp subdirectory
altogether. i.e. We diplay the SCTP SNMP and other extended stats
as /proc/net/sctp/snmp and /proc/net/sctp/sctp_mib or some such
name (which would be somewhat dynamic short term). This would also
solve unnecessary duplication for AF_INET6 for us.
I'm fine with this.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-11-05 23:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-29 17:21 sctp snmp mib stats in /proc/net/snmp Nivedita Singhvi
2002-10-29 17:18 ` David S. Miller
2002-10-29 17:32 ` Nivedita Singhvi
2002-11-05 22:33 ` Nivedita Singhvi
2002-11-05 23:34 ` David S. Miller
-- strict thread matches above, loose matches on Subject: below --
2002-10-28 23:51 Nivedita Singhvi
2002-10-29 13:49 ` David S. Miller
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).