]> git.baikalelectronics.ru Git - kernel.git/commit
net: erspan: use bitfield instead of mask and offset
authorWilliam Tu <u9012063@gmail.com>
Thu, 25 Jan 2018 21:20:09 +0000 (13:20 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jan 2018 02:39:43 +0000 (21:39 -0500)
commit2403c555bf51c363090a9614d0951adb46274adf
treed8ba38bd0c49bc0409b91cc6583808ad4e171242
parentd5685f3b6e252e124627ed8d76cbe48bf48b920b
net: erspan: use bitfield instead of mask and offset

Originally the erspan fields are defined as a group into a __be16 field,
and use mask and offset to access each field.  This is more costly due to
calling ntohs/htons.  The patch changes it to use bitfields.

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/erspan.h
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c