diff options
author | Benjamin Thery <benjamin.thery@bull.net> | 2009-01-22 04:56:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-22 13:57:39 -0800 |
commit | 1e8fb3b6a4ac6c5e486298d88289038456957545 (patch) | |
tree | ff2c02ed95edcf510e553c15c8abd476cdc6d669 /include/net/netns | |
parent | 2bb8b26c3ea8bde1943dc5cd4dda2dc9f48fb281 (diff) | |
download | blackbird-op-linux-1e8fb3b6a4ac6c5e486298d88289038456957545.tar.gz blackbird-op-linux-1e8fb3b6a4ac6c5e486298d88289038456957545.zip |
netns: ipmr: declare counter cache_resolve_queue_len per-namespace
Preliminary work to make IPv4 multicast routing netns-aware.
Declare variable cache_resolve_queue_len per-namespace: move it into
struct netns_ipv4.
This variable counts the number of unresolved cache entries queued in the
list mfc_unres_queue. This list is kept global to all netns as the number
of entries per namespace is limited to 10 (hardcoded in routine
ipmr_cache_unresolved).
Entries belonging to different namespaces in mfc_unres_queue will be
identified by matching the mfc_net member introduced previously in
struct mfc_cache.
Keeping this list global to all netns, also allows us to keep a single
timer (ipmr_expire_timer) to handle their expiration.
In some places cache_resolve_queue_len value was tested for arming
or deleting the timer. These tests were equivalent to testing
mfc_unres_queue value instead and are replaced in this patch.
At the moment, cache_resolve_queue_len is only referenced in init_net.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/ipv4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 0b4285ac29d4..90b7cd20aa69 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -60,6 +60,7 @@ struct netns_ipv4 { struct mfc_cache **mfc_cache_array; struct vif_device *vif_table; int maxvif; + atomic_t cache_resolve_queue_len; #endif }; #endif |