From: Shirley Ma <mashirle@us.ibm.com>
To: "David S. Miller" <davem@redhat.com>
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, xma@us.ibm.com
Subject: [PATCH] IPv6 MIB:ipv6inetNetToMediaTable
Date: Wed, 14 Jan 2004 16:21:26 -0800 [thread overview]
Message-ID: <200401141621.26317.mashirle@us.ibm.com> (raw)
In-Reply-To: <20031205145700.120e9e68.davem@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
This patch is against 2.6.1 kernel.
Thanks
Shirley Ma
IBM Linux Technology Center
[-- Attachment #2: linux-2.6.1-ipv6mib5.patch --]
[-- Type: text/x-diff, Size: 2150 bytes --]
diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib5/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h 2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib5/include/linux/rtnetlink.h 2004-01-13 10:38:27.000000000 -0800
@@ -3,6 +3,7 @@
#include <linux/netlink.h>
+#define TIME_DELTA(a,b) ((unsigned long)((long)(a) - (long)(b)))
/****
* Routing/neighbour discovery messages.
****/
diff -urN linux-2.6.1/net/core/neighbour.c linux-2.6.1-ipv6mib5/net/core/neighbour.c
--- linux-2.6.1/net/core/neighbour.c 2004-01-08 22:59:06.000000000 -0800
+++ linux-2.6.1-ipv6mib5/net/core/neighbour.c 2004-01-14 15:38:57.000000000 -0800
@@ -1339,7 +1339,6 @@
static int neigh_fill_info(struct sk_buff *skb, struct neighbour *n,
u32 pid, u32 seq, int event)
{
- unsigned long now = jiffies;
unsigned char *b = skb->tail;
struct nda_cacheinfo ci;
int locked = 0;
@@ -1357,9 +1356,13 @@
ndm->ndm_state = n->nud_state;
if (n->nud_state & NUD_VALID)
RTA_PUT(skb, NDA_LLADDR, n->dev->addr_len, n->ha);
- ci.ndm_used = now - n->used;
- ci.ndm_confirmed = now - n->confirmed;
- ci.ndm_updated = now - n->updated;
+ ci.ndm_used = (__u32)(TIME_DELTA(n->used, INITIAL_JIFFIES)/HZ*100
+ + TIME_DELTA(n->used, INITIAL_JIFFIES)%HZ*100/HZ);
+ ci.ndm_confirmed = (__u32)(TIME_DELTA(n->confirmed, INITIAL_JIFFIES)/HZ
+ *100 + TIME_DELTA(n->confirmed, INITIAL_JIFFIES)%HZ
+ *100/HZ);
+ ci.ndm_updated = (__u32)(TIME_DELTA(n->updated, INITIAL_JIFFIES)/HZ*100
+ + TIME_DELTA(n->updated, INITIAL_JIFFIES)%HZ*100/HZ);
ci.ndm_refcnt = atomic_read(&n->refcnt) - 1;
read_unlock_bh(&n->lock);
locked = 0;
diff -urN linux-2.6.1/net/ipv6/addrconf.c linux-2.6.1-ipv6mib5/net/ipv6/addrconf.c
--- linux-2.6.1/net/ipv6/addrconf.c 2004-01-08 23:00:03.000000000 -0800
+++ linux-2.6.1-ipv6mib5/net/ipv6/addrconf.c 2004-01-13 10:38:27.000000000 -0800
@@ -93,7 +93,6 @@
#endif
#define INFINITY_LIFE_TIME 0xFFFFFFFF
-#define TIME_DELTA(a,b) ((unsigned long)((long)(a) - (long)(b)))
#ifdef CONFIG_SYSCTL
static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf *p);
next prev parent reply other threads:[~2004-01-15 0:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-20 0:21 IPv6 MIB:ipv6PrefixTable implementation Shirley Ma
2003-12-02 12:40 ` kuznet
2003-12-05 20:14 ` [PATCH]snmp6 64-bit counter support in proc.c Shirley Ma
2003-12-05 20:31 ` David S. Miller
2004-01-14 22:52 ` Shirley Ma
2004-01-15 8:57 ` David S. Miller
2003-12-05 21:51 ` [PATCH] IPv6 MIB:ipv6Prefix netlink notification Shirley Ma
2003-12-05 22:57 ` David S. Miller
2004-01-14 22:54 ` Shirley Ma
2004-01-15 8:58 ` David S. Miller
2004-01-14 23:52 ` [PATCH] IPv6 MIB:ipv6RouterAdvert " Shirley Ma
2004-01-15 8:52 ` David S. Miller
2004-01-15 9:10 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-15 0:21 ` Shirley Ma [this message]
2004-01-15 8:48 ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable David S. Miller
2004-01-15 9:04 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-15 0:22 ` [PATCH] IPv6 MIB:ipv6DefaultRouterTable Shirley Ma
2004-01-15 9:03 ` YOSHIFUJI Hideaki / 吉藤英明
-- strict thread matches above, loose matches on Subject: below --
2004-01-15 18:18 [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
2004-01-15 18:41 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-15 19:13 Shirley Ma
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=200401141621.26317.mashirle@us.ibm.com \
--to=mashirle@us.ibm.com \
--cc=davem@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=xma@us.ibm.com \
/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).