Re: how to get consistent value of "nf_conntrack_htable_size" and "nf_conntrack_hash" in a kernel module ?

2017-07-07 Thread valdis . kletnieks
On Fri, 07 Jul 2017 23:55:25 +0800, Shiyao Ma said: > I want to foreach all the `struct nf_conn's in my out-of-tree kernel module. What are you trying to do? Hint: the very concept of "all" the nf_conn's is a very racy one, especially on high-powered servers that have multiple 40 gigabit etherne

how to get consistent value of "nf_conntrack_htable_size" and "nf_conntrack_hash" in a kernel module ?

2017-07-07 Thread Shiyao Ma
Hi, I want to foreach all the `struct nf_conn's in my out-of-tree kernel module. My plan is to get the `nf_conntrack_htable_size' and `nf_conntrack_hash', then do some read on the hash table. However, the symbol `nf_conntrack_generation' is not exported, so I cannot do things like this: struc