[PATCH net-next resubmit] skbuff: optimize the pull_pages code in __pskb_pull_tail()

2017-07-16 Thread Lin Zhang
In the pull_pages code block, if the first frag size > eat, we can end the loop in advance to avoid extra copy. Signed-off-by: Lin Zhang --- net/core/skbuff.c | 4 1 file changed, 4 insertions(+) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f990eb8..c00a1df 100644 --- a/

Re: [PATCH net-next] skbuff: optimize the pull_pages code in __pskb_pull_tail()

2017-07-06 Thread lin zhang
2017-07-06 17:23 GMT+08:00 Eric Dumazet : > On Thu, 2017-07-06 at 02:16 -0700, Eric Dumazet wrote: >> On Thu, 2017-07-06 at 17:01 +0800, Lin Zhang wrote: >> > In the pull_pages code block, if the first frags size > eat, >> > we can end the loop in advance to avoid ex

[PATCH net-next] skbuff: optimize the pull_pages code in __pskb_pull_tail()

2017-07-06 Thread Lin Zhang
In the pull_pages code block, if the first frags size > eat, we can end the loop in advance to avoid extra copy. Signed-off-by: Lin Zhang --- net/core/skbuff.c | 4 1 file changed, 4 insertions(+) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f990eb8..c00a1df 100644 --- a/

[PATCH net-next] netfilter: conntrack: add a new NF_CT_EXT_EXPAND extension

2017-06-25 Thread Lin Zhang
if kernel support NF_CT_EXT_EXPAND extension, user could call nf_ct_expand_area_add() to register a new expansion but not need to predefine an id in enum nf_ct_ext_id. Signed-off-by: Lin Zhang --- include/net/netfilter/nf_conntrack_expand.h | 26 ++ include/net/netfilter/nf_conntrack_extend.h

[PATCH] net: llc: add lock_sock in llc_ui_bind to avoid a race condition

2017-05-24 Thread Lin Zhang
ui_connect. Signed-off-by: Lin Zhang --- net/llc/af_llc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 8364fe5..c38d16f 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -311,6 +311,8 @@ static int llc_ui_bind(struct socket *sock, struc

[PATCH net v2 2/2] net: ieee802154: fix net_device reference release too early

2017-05-22 Thread Lin Zhang
call dev_queue_xmit. I think the latest kernel is have the same problem and that dev_put should be behind of the dev_queue_xmit. Signed-off-by: Lin Zhang Acked-by: Stefan Schmidt --- changelog: v1 -> v2: * split v1 into two patches, per Stefan Schmidt. Hello, Stefan: If you

[PATCH net v2 1/2] net: ieee802154: remove explicit set skb->sk

2017-05-22 Thread Lin Zhang
Explicit set skb->sk is needless, sock_alloc_send_skb is already set it. Signed-off-by: Lin Zhang Acked-by: Stefan Schmidt --- changelog: v1 -> v2: * split v1 into two patches, per Stefan Schmidt. Thanks to Stefan Schmidt for reviewing ! --- net/ieee802154/socket.c | 2 --