Re: [PATCH] net: Call ip_hdrlen() when skbuff is not fragment

2020-08-27 Thread David Miller
From: Miaohe Lin Date: Thu, 27 Aug 2020 07:17:59 -0400 > When skbuff is fragment, we exit immediately and leave ip_hdrlen() as > unused. And remove the unnecessary local variable fragment. > > Signed-off-by: Miaohe Lin I don't think this is a useful optimization sorry, the common case will be

[PATCH] net: Call ip_hdrlen() when skbuff is not fragment

2020-08-27 Thread Miaohe Lin
When skbuff is fragment, we exit immediately and leave ip_hdrlen() as unused. And remove the unnecessary local variable fragment. Signed-off-by: Miaohe Lin --- net/core/skbuff.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.