summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2018-07-17 12:52:57 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-18 23:42:08 +0300
commita48d189ef53146a8df132a327a637c4182f50a16 (patch)
treee7fb1bf5050c0881e74217202039cf947875b447 /net/core
parentbf20a5c1d56043a0ee4263fbd22ca0f70ba4d09a (diff)
downloadlinux-a48d189ef53146a8df132a327a637c4182f50a16.tar.xz
net: Move skb decrypted field, avoid explicity copy
Commit 784abe24c903 ("net: Add decrypted field to skb") introduced a 'decrypted' field that is explicitly copied on skb copy and clone. Move it between headers_start[0] and headers_end[0], so that we don't need to copy it explicitly as it's copied by the memcpy() in __copy_skb_header(). While at it, drop the assignment in __skb_clone(), it was already redundant. This doesn't change the size of sk_buff or cacheline boundaries. The 15-bits hole before tc_index becomes a 14-bits hole, and will be again a 15-bits hole when this change is merged with commit 8b7008620b84 ("net: Don't copy pfmemalloc flag in __copy_skb_header()"). v2: as reported by kbuild test robot (oops, I forgot to build with CONFIG_TLS_DEVICE it seems), we can't use CHECK_SKB_FIELD() on a bit-field member. Just drop the check for the moment being, perhaps we could think of some magic to also check bit-field members one day. Fixes: 784abe24c903 ("net: Add decrypted field to skb") Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skbuff.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index cfd6c6f35f9c..c4e24ac27464 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -805,9 +805,6 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
* It is not yet because we do not want to have a 16 bit hole
*/
new->queue_mapping = old->queue_mapping;
-#ifdef CONFIG_TLS_DEVICE
- new->decrypted = old->decrypted;
-#endif
memcpy(&new->headers_start, &old->headers_start,
offsetof(struct sk_buff, headers_end) -
@@ -868,9 +865,6 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
C(head_frag);
C(data);
C(truesize);
-#ifdef CONFIG_TLS_DEVICE
- C(decrypted);
-#endif
refcount_set(&n->users, 1);
atomic_inc(&(skb_shinfo(skb)->dataref));