strparser: Call skb_unclone conditionally
authorVakul Garg <vakul.garg@nxp.com>
Fri, 29 Jun 2018 19:15:55 +0000 (00:45 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 12:25:39 +0000 (21:25 +0900)
commit4e485d06bb8c7811a0d69a811c77befd54b9ab0c
tree83739c15a00c922f1b44e901cef4db7423302e0a
parent180390c470e1b6e3e19b4f969524182eeb5e4e6c
strparser: Call skb_unclone conditionally

Calling skb_unclone() is expensive as it triggers a memcpy operation.
Instead of calling skb_unclone() unconditionally, call it only when skb
has a shared frag_list. This improves tls rx throughout significantly.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Suggested-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/strparser/strparser.c