[PATCH v3 net-next] xfrm: Add check to prevent un-complete key manager

2013-11-10 Thread baker . kernel
From: Baker Zhang "acquire" and "compile_policy" callbacks are necessary for a key manager. Signed-off-by: Baker Zhang --- Thanks for all reply. V1: For current kernel source, there is no problem. In our vpn product, we need a xfrm_km in kernel module to monitor the xfrm state change. thus, t

[PATCH v2 net-next] fib_trie: remove duplicated rcu lock

2013-10-13 Thread baker . kernel
From: "baker.zhang" fib_table_lookup has included the rcu lock protection. Signed-off-by: baker.zhang --- Thanks for Eric Dumazet's review. The V1 patch remove a necessary rcu read lock. net/ipv4/fib_frontend.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net

[PATCH net-next] fib_trie: remove duplicated rcu lock

2013-10-12 Thread baker . kernel
From: "baker.zhang" fib_table_lookup has included the rcu lock protection. Signed-off-by: baker.zhang --- net/ipv4/fib_frontend.c | 4 1 file changed, 4 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index b3f627a..0e9127d 100644 --- a/net/ipv4/fib_frontend.c

[PATCH net-next] fib_trie: only calc for the un-first node

2013-10-07 Thread baker . kernel
From: "baker.zhang" This is a enhancement. for the first node in fib_trie, newpos is 0, bit is 1. Only for the leaf or node with unmatched key need calc pos. Signed-off-by: baker.zhang --- net/ipv4/fib_trie.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/ipv4

[PATCH V3 net-next] fib_trie: avoid a redundant bit judgement in inflate

2013-09-30 Thread baker . kernel
From: "baker.zhang" Because 'node' is the i'st child of 'oldnode', thus, here 'i' equals tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits) we just get 1 more bit, and need not care the detail value of this bits. I apologize for the mistake. I generated the patch on a branch version,

[PATCH V2 net-next] fib_trie: avoid a redundant bit judgement in inflate

2013-09-29 Thread baker . kernel
From: "baker.zhang" Because 'node' is the i'st child of 'oldnode', thus, here 'i' equals tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits) we just get 1 more bit, and need not care the detail value of this bits. Signed-off-by: baker.zhang --- net/ipv4/fib_trie.c | 9 +++-- 1 fil

[PATCH net-next] fib_trie: avoid a redundant bit judgement in inflate

2013-09-29 Thread baker . kernel
From: "baker.zhang" Because 'node' is the i'st child of 'oldnode', thus, here 'i' equals tkey_extract_bits(node->key, oldtnode->pos, oldtnode->bits) we just get 1 more bit, and need not care the detail value of this bits. Signed-off-by: baker.zhang --- net/ipv4/fib_trie.c | 9 +++-- 1 fil