tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Restructuring ARP cache



Hi,

Here is a new patch that restructures ARP caches, which
aims for MP-safe network stack:
http://www.netbsd.org/~ozaki-r/lltable-arpcache.diff
(https://github.com/ozaki-r/netbsd-src/tree/lltable-arpcache)

The patch replaces old llinfo for ARP caches with
lltable/llentry derived from FreeBSD.

Highlights of the patch are:
- Import lltable/llentry from FreeBSD
- Use llentry instead of llinfo to manage ARP caches
  - ARP specific data are stored in the hashed list
    of an interface instead of the global list (llinfo_arp)
- Fine-grain locking on llentry
- arptimer (callout) per ARP cache
  - the global timer callout with the big locks can be
    removed (though softnet_lock is still required for now)
- net.inet.arp.prune is removed
  - it is the interval of the global timer callout
- net.inet.arp.refresh is removed
  - it is a parameter that prevents expiration of active caches
  - Removed to simplify the timer logic, but we may be able to
    restore the feature if really needed

One aim of the changes is to proceed the nexthop cache
separation that was raised in the thread "Improving use
of rt_refcnt", although the routing table is not changed
by this patch. I'll proceed it if we have consensus on
the approach.

Any comments and suggestions are appreciated.

Note that the patch of course passed the ATF tests :)

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index