flowtop: Replace single linked list by list_head from list.h
commit80e70fdcf8861ab757b6bfc8f0fbaec31cde57bf
authorVadim Kochan <vadim4j@gmail.com>
Fri, 13 Jan 2017 11:06:07 +0000 (13 13:06 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Tue, 17 Jan 2017 13:05:08 +0000 (17 14:05 +0100)
treeb574e35ddb001c51b1876618fba1c90b3f9f771b
parentfeb7ac09c8cf37ef2b01611c2863e1a0123ffeca
flowtop: Replace single linked list by list_head from list.h

list.h provides generic Linux-like linked list API which also supports
RCU list operations.

Also additionally was removed the spinlock which is not needed for
RCU-list operations, for the list_del_rcu(...) case it is needed
additionally call call_rcu(...) before free the flow entry.

Because of full RCU support now flows are freed after grace-period
(after presenter leaves RCU lock) via calling call_rcu(), because
of that for the new entries we return NFCT_CB_STOLEN to tell conntrack
API do not automatically free received nfct_conntrack object, it will be
freed by us via call_rcu(...) therefor no need to use nfct_clone(n).

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
flowtop.c