]> git.baikalelectronics.ru Git - kernel.git/commit
net: Move skb decrypted field, avoid explicity copy
authorStefano Brivio <sbrivio@redhat.com>
Tue, 17 Jul 2018 09:52:57 +0000 (11:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2018 20:42:08 +0000 (13:42 -0700)
commit401d9580a44fa0939728e31416012d5a16cefb64
treee7fb1bf5050c0881e74217202039cf947875b447
parentcfcd19d788cb3076f704c1b2a97e19c76e97cb1d
net: Move skb decrypted field, avoid explicity copy

Commit 15102dc2e7f1 ("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 05a5edf9aff5 ("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: 15102dc2e7f1 ("net: Add decrypted field to skb")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/skbuff.c