* Question about arp caches
@ 2016-11-29 5:10 Shawn Peng
2016-11-29 5:50 ` Anupam Kapoor
0 siblings, 1 reply; 7+ messages in thread
From: Shawn Peng @ 2016-11-29 5:10 UTC (permalink / raw)
To: kernelnewbies
Hi,
I'm reading the code about arp protocol. It seems like the kernel uses
the neigh_table structure to keep track of caches, right? There should
be some code that remove the stale entries in the cache, but I didn't
find the code that does this job. Does anyone have an idea?
Thanks,
Yisu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Question about arp caches
2016-11-29 5:10 Question about arp caches Shawn Peng
@ 2016-11-29 5:50 ` Anupam Kapoor
2016-11-29 7:19 ` Shawn Peng
0 siblings, 1 reply; 7+ messages in thread
From: Anupam Kapoor @ 2016-11-29 5:50 UTC (permalink / raw)
To: kernelnewbies
On Tue, Nov 29, 2016 at 10:40 AM, Shawn Peng <yisupeng@gmail.com> wrote:
> I'm reading the code about arp protocol. It seems like the kernel uses
> the neigh_table structure to keep track of caches, right?
>
?yes.?
> There should
> be some code that remove the stale entries in the cache, but I didn't
> find the code that does this job. Does anyone have an idea?
>
?look at neigh_release(...) and neigh_destroy(...). basically,
neigh_release(...) decrements the reference count of a neighbor, and
neigh_destroy(...) frees it when this reference count reaches zero.?
?--
kind regards
anupam?
In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161129/18f35c69/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Question about arp caches
2016-11-29 5:50 ` Anupam Kapoor
@ 2016-11-29 7:19 ` Shawn Peng
[not found] ` <CAEXHiZH3yHTNrN1MvsNW3dEHRJZH43vzf06X1ojcm2auO+6jdA@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Shawn Peng @ 2016-11-29 7:19 UTC (permalink / raw)
To: kernelnewbies
I find a lot references of the function neigh_release(), can you direct
me to the one that releases a staled arp entry? Thanks.
On 11/29/2016 12:50 AM, Anupam Kapoor wrote:
>
> On Tue, Nov 29, 2016 at 10:40 AM, Shawn Peng <yisupeng@gmail.com
> <mailto:yisupeng@gmail.com>> wrote:
>
> I'm reading the code about arp protocol. It seems like the kernel uses
> the neigh_table structure to keep track of caches, right?
>
> ?yes.?
>
> There should
> be some code that remove the stale entries in the cache, but I didn't
> find the code that does this job. Does anyone have an idea?
>
> ?look at neigh_release(...) and neigh_destroy(...). basically,
> neigh_release(...) decrements the reference count of a neighbor, and
> neigh_destroy(...) frees it when this reference count reaches zero.?
>
>
> ?--
> kind regards
> anupam?
>
>
> In the beginning was the lambda, and the lambda was with Emacs, and
> Emacs was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161129/e6dca7eb/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Fwd: Question about arp caches
[not found] ` <CAEXHiZH3yHTNrN1MvsNW3dEHRJZH43vzf06X1ojcm2auO+6jdA@mail.gmail.com>
@ 2016-11-30 6:41 ` Anupam Kapoor
2016-11-30 8:16 ` Yisu Peng
0 siblings, 1 reply; 7+ messages in thread
From: Anupam Kapoor @ 2016-11-30 6:41 UTC (permalink / raw)
To: kernelnewbies
FYI
---------- Forwarded message ---------
From: Anupam Kapoor <anupam.kapoor@gmail.com>
Date: Tue, 29 Nov 2016 at 1:25 PM
Subject: Re: Question about arp caches
To: Shawn Peng <yisupeng@gmail.com>
?On Tue, Nov 29, 2016 at 12:49 PM, Shawn Peng <yisupeng@gmail.com> wrote:
I find a lot references of the function neigh_release(), can you direct me
to the one that releases a staled arp entry?
?neigh_destroy(...) is probably what you are looking for.
--
kind regards
anupam?
--
In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161130/201ce41e/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Fwd: Question about arp caches
2016-11-30 6:41 ` Fwd: " Anupam Kapoor
@ 2016-11-30 8:16 ` Yisu Peng
2016-11-30 8:42 ` Anupam Kapoor
0 siblings, 1 reply; 7+ messages in thread
From: Yisu Peng @ 2016-11-30 8:16 UTC (permalink / raw)
To: kernelnewbies
Sorry, seems I didn't make question clear. Maybe let me ask another
question to help with this. So, how is the kernel check those staled arp
entries? Or, what is the mechanism that the kernel uses to find the out
of date entries?
Thanks,
Yisu
On 11/30/2016 1:41 AM, Anupam Kapoor wrote:
> FYI
>
> ---------- Forwarded message ---------
> From: Anupam Kapoor <anupam.kapoor@gmail.com
> <mailto:anupam.kapoor@gmail.com>>
> Date: Tue, 29 Nov 2016 at 1:25 PM
> Subject: Re: Question about arp caches
> To: Shawn Peng <yisupeng at gmail.com <mailto:yisupeng@gmail.com>>
>
>
> ?On Tue, Nov 29, 2016 at 12:49 PM, Shawn Peng <yisupeng@gmail.com
> <mailto:yisupeng@gmail.com>>wrote:
>
> I find a lot references of the function neigh_release(), can you
> direct me to the one that releases a staled arp entry?
>
>
> ?neigh_destroy(...) is probably what you are looking for.
>
> --
> kind regards
> anupam?
>
>
>
> --
> In the beginning was the lambda, and the lambda was with Emacs, and
> Emacs was the lambda.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161130/82f86008/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Fwd: Question about arp caches
2016-11-30 8:16 ` Yisu Peng
@ 2016-11-30 8:42 ` Anupam Kapoor
2016-11-30 9:45 ` Yisu Peng
0 siblings, 1 reply; 7+ messages in thread
From: Anupam Kapoor @ 2016-11-30 8:42 UTC (permalink / raw)
To: kernelnewbies
On Wed, Nov 30, 2016 at 1:46 PM, Yisu Peng <yisupeng@gmail.com> wrote:
> So, how is the kernel check those staled arp entries? Or, what is the
> mechanism that the kernel uses to find the out of date entries?
?ok sure, well, each neighbor entry (struct neighbour) has a 'timer' (which
is created during neighbor creation i.e. during neigh_alloc(...)). this
timer gets 'serviced' by '?neigh_timer_handler(...)', which is the per
neighbor garbage collector handler.
when the state of the neighbor becomes NUD_FAILED, the neighbor is
collected via invokation of 'neigh_release(...)' as indicated earlier.
?--
kind regards
anupam?
In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161130/8d08fb6a/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Fwd: Question about arp caches
2016-11-30 8:42 ` Anupam Kapoor
@ 2016-11-30 9:45 ` Yisu Peng
0 siblings, 0 replies; 7+ messages in thread
From: Yisu Peng @ 2016-11-30 9:45 UTC (permalink / raw)
To: kernelnewbies
Oh, I see. Thanks. Appreciate that.
On 11/30/2016 3:42 AM, Anupam Kapoor wrote:
>
> On Wed, Nov 30, 2016 at 1:46 PM, Yisu Peng <yisupeng@gmail.com
> <mailto:yisupeng@gmail.com>> wrote:
>
> So, how is the kernel check those staled arp entries? Or, what is
> the mechanism that the kernel uses to find the out of date entries?
>
>
> ?ok sure, well, each neighbor entry (struct neighbour) has a 'timer'
> (which is created during neighbor creation i.e.
> during neigh_alloc(...)). this timer gets 'serviced' by
> '?neigh_timer_handler(...)', which is the per neighbor garbage
> collector handler.
>
> when the state of the neighbor becomes NUD_FAILED, the neighbor is
> collected via invokation of 'neigh_release(...)' as indicated earlier.
>
> ?--
> kind regards
> anupam?
>
> In the beginning was the lambda, and the lambda was with Emacs, and
> Emacs was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161130/980d4382/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-11-30 9:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-29 5:10 Question about arp caches Shawn Peng
2016-11-29 5:50 ` Anupam Kapoor
2016-11-29 7:19 ` Shawn Peng
[not found] ` <CAEXHiZH3yHTNrN1MvsNW3dEHRJZH43vzf06X1ojcm2auO+6jdA@mail.gmail.com>
2016-11-30 6:41 ` Fwd: " Anupam Kapoor
2016-11-30 8:16 ` Yisu Peng
2016-11-30 8:42 ` Anupam Kapoor
2016-11-30 9:45 ` Yisu Peng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.