Skip to contentSkip to conversation

: Provide number of probes to userspace

PATCH Applied Thomas Graf 4 participants 4 messages Mar 4, 2005 – Mar 10, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 : Provide number of probes to userspace

Provides number of probes done so far to userspace, quite useful for debugging.

include/linux/rtnetlink.h +1 -0
@@ -446,6 +446,7 @@
 	NDA_DST,
 	NDA_LLADDR,
 	NDA_CACHEINFO,
+	NDA_PROBES,
 	__NDA_MAX
 };
 
net/core/neighbour.c +3 -0
@@ -1554,6 +1554,7 @@
 	unsigned char *b = skb->tail;
 	struct nda_cacheinfo ci;
 	int locked = 0;
+	u32 probes;
 	struct nlmsghdr *nlh = NLMSG_PUT(skb, pid, seq, event,
 					 sizeof(struct ndmsg));
 	struct ndmsg *ndm = NLMSG_DATA(nlh);
@@ -1573,9 +1574,11 @@
 	ci.ndm_confirmed = now - n->confirmed;
 	ci.ndm_updated	 = now - n->updated;
 	ci.ndm_refcnt	 = atomic_read(&n->refcnt) - 1;
+	probes = atomic_read(&n->probes);
 	read_unlock_bh(&n->lock);
 	locked		 = 0;
 	RTA_PUT(skb, NDA_CACHEINFO, sizeof(ci), &ci);
+	RTA_PUT(skb, NDA_PROBES, sizeof(probes), &probes);
 	nlh->nlmsg_len	 = skb->tail - b;
 	return skb->len;
 
#1 lore raw

In article <[email protected]> (at Fri, 4 Mar 2005 03:31:21 +0100), Thomas Graf <[email protected]> says:

Quoted 3 lines

Provides number of probes done so far to userspace, quite useful for debugging.

It might be useful to provide probe count per state; e.g.
in INCOMPLETE: probes
in PROBLE : probes - (ucast_probes + app_probes)
However, we can do this in userspace.

Not strong opinion.

--yoshfuji

#2 lore raw
Quoted 10 lines · YOSHIFUJI Hideaki / 吉藤英明

In article <[email protected]> (at Fri, 4 Mar 2005 03:31:21 +0100), Thomas Graf <[email protected]> says:

Quoted 3 lines

Provides number of probes done so far to userspace, quite useful for debugging.

It might be useful to provide probe count per state; e.g.
in INCOMPLETE: probes
in PROBLE : probes - (ucast_probes + app_probes)
However, we can do this in userspace.

I think this will be overkill (its like maintaining history of all the states).

cheers,
jamal