netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A question about hh_cache
@ 2007-12-30 13:31 Andy Johnson
  2007-12-30 14:54 ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Johnson @ 2007-12-30 13:31 UTC (permalink / raw)
  To: netdev

Hi,

struct neighbour has a member named hh_cache; this
hh_cache caches link layer headers to speed up transmission
(instead filling them again and again for each packet).

The hh_cache struct is defined in linux/netdev.h.
Its first member is hh_next, which is a pointer to
hh_cache.
I tried to think of scenarios where this hh_next pointer is used,
and could not think of anything.

Each neighbour has one ip address (the primary key), so it has one
dev member (which is the net_device on which that primary key is configured),
so it has one mac address (which is the dev_addr of net_device).
So there should be only one entry in that hh_cache ; it should be
the entry which its hh_data (the ethernet header) is composed from the
dev_addr, the source MAC address, and the type.

Can anybody give an example when hh_cache of a neighbour instance is a
list with more than
one entry ?

Regards,
Johnson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about hh_cache
  2007-12-30 13:31 A question about hh_cache Andy Johnson
@ 2007-12-30 14:54 ` Andi Kleen
  2007-12-30 15:12   ` Andy Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2007-12-30 14:54 UTC (permalink / raw)
  To: Andy Johnson; +Cc: netdev

"Andy Johnson" <johnsonzjo@gmail.com> writes:

> Can anybody give an example when hh_cache of a neighbour instance is a
> list with more than
> one entry ?

When you're talking to the same host on a local ethernet with both native IPv4 
and native IPv6.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about hh_cache
  2007-12-30 14:54 ` Andi Kleen
@ 2007-12-30 15:12   ` Andy Johnson
  2007-12-30 15:36     ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Johnson @ 2007-12-30 15:12 UTC (permalink / raw)
  To: Andi Kleen; +Cc: netdev

Hello,
First, thanks for your reply.

Second, apart from when using both IPV4 and IPV6:
Suppose I work only in IPv4 (and this is indeed the case).

Can there be a case in such environment (using IPv4 only) where
hh_cache of a neighbour instance is a
list with more than one entry ?

Regards,
Andy Johnson



On Dec 30, 2007 4:54 PM, Andi Kleen <andi@firstfloor.org> wrote:
> "Andy Johnson" <johnsonzjo@gmail.com> writes:
>
> > Can anybody give an example when hh_cache of a neighbour instance is a
> > list with more than
> > one entry ?
>
> When you're talking to the same host on a local ethernet with both native IPv4
> and native IPv6.
>
> -Andi
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about hh_cache
  2007-12-30 15:12   ` Andy Johnson
@ 2007-12-30 15:36     ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2007-12-30 15:36 UTC (permalink / raw)
  To: Andy Johnson; +Cc: Andi Kleen, netdev

On Sun, Dec 30, 2007 at 05:12:05PM +0200, Andy Johnson wrote:
> Can there be a case in such environment (using IPv4 only) where
> hh_cache of a neighbour instance is a
> list with more than one entry ?

In theory if some device supplies own multiple dst_ops with different 
protocol numbers.  From a quick grep doesn't happen in tree.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-30 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-30 13:31 A question about hh_cache Andy Johnson
2007-12-30 14:54 ` Andi Kleen
2007-12-30 15:12   ` Andy Johnson
2007-12-30 15:36     ` Andi Kleen

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).