Re: net-ipv6: Delete unnecessary checks before the function call "kfree_skb"

2015-11-14 Thread SF Markus Elfring
> While if the test is done in kfree_skb(), the branch predictor of the > cpu wont be able to predict things. > > By feeding too many NULL pointers to kfree_skb(), we slow down it. Would it make sense to annotate checks before such function calls as "UNLIKELY"? Regards, Markus -- To unsubscribe

Re: [PATCH] net-ipv6: Delete unnecessary checks before the function call "kfree_skb"

2015-11-14 Thread Eric Dumazet
On Sat, 2015-11-14 at 20:05 +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 14 Nov 2015 19:55:00 +0100 > > The kfree_skb() function tests whether its argument is NULL and then > returns immediately. Thus the test around the calls is not needed. > > This issue was detected by

[PATCH] net-ipv6: Delete unnecessary checks before the function call "kfree_skb"

2015-11-14 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Nov 2015 19:55:00 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/ip