diff options
author | Benjamin Thery <benjamin.thery@bull.net> | 2009-01-21 23:56:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-22 16:57:39 -0500 |
commit | 1e8fb3b6a4ac6c5e486298d88289038456957545 (patch) | |
tree | ff2c02ed95edcf510e553c15c8abd476cdc6d669 /include/net/netns | |
parent | 2bb8b26c3ea8bde1943dc5cd4dda2dc9f48fb281 (diff) |
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 { | |||
60 | struct mfc_cache **mfc_cache_array; | 60 | struct mfc_cache **mfc_cache_array; |
61 | struct vif_device *vif_table; | 61 | struct vif_device *vif_table; |
62 | int maxvif; | 62 | int maxvif; |
63 | atomic_t cache_resolve_queue_len; | ||
63 | #endif | 64 | #endif |
64 | }; | 65 | }; |
65 | #endif | 66 | #endif |