Re: [PATCH][net-next][v2] xfrm: optimise the use of walk list header in xfrm_policy/state_walk

2015-04-27 Thread Steffen Klassert
On Wed, Apr 22, 2015 at 05:13:18PM +0800, Herbert Xu wrote: On Wed, Apr 22, 2015 at 05:09:54PM +0800, roy.qing...@gmail.com wrote: From: Li RongQing roy.qing...@gmail.com The walk from input is the list header, and marked as dead, and will be skipped in loop. list_first_entry() can

Re: [PATCH][net-next][v2] xfrm: optimise the use of walk list header in xfrm_policy/state_walk

2015-04-22 Thread Herbert Xu
On Wed, Apr 22, 2015 at 05:09:54PM +0800, roy.qing...@gmail.com wrote: From: Li RongQing roy.qing...@gmail.com The walk from input is the list header, and marked as dead, and will be skipped in loop. list_first_entry() can be used to return the true usable value from walk if walk is not

[PATCH][net-next][v2] xfrm: optimise the use of walk list header in xfrm_policy/state_walk

2015-04-22 Thread roy . qing . li
From: Li RongQing roy.qing...@gmail.com The walk from input is the list header, and marked as dead, and will be skipped in loop. list_first_entry() can be used to return the true usable value from walk if walk is not empty Signed-off-by: Li RongQing roy.qing...@gmail.com ---