summaryrefslogtreecommitdiff
path: root/include/net/gre.h
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-08-09 07:38:24 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-11 03:22:14 +0300
commitab10dccb11608b96b43b557c12a5ad867723e503 (patch)
treedb7883359e3748a0789ca78d85c97dbd480e7911 /include/net/gre.h
parent084c9535aab61ddd0e55eb796baa6b078b3843b1 (diff)
downloadlinux-ab10dccb11608b96b43b557c12a5ad867723e503.tar.xz
rps: Inspect PPTP encapsulated by GRE to get flow hash
The PPTP is encapsulated by GRE header with that GRE_VERSION bits must contain one. But current GRE RPS needs the GRE_VERSION must be zero. So RPS does not work for PPTP traffic. In my test environment, there are four MIPS cores, and all traffic are passed through by PPTP. As a result, only one core is 100% busy while other three cores are very idle. After this patch, the usage of four cores are balanced well. Signed-off-by: Gao Feng <fgao@ikuai8.com> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/gre.h')
-rw-r--r--include/net/gre.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/gre.h b/include/net/gre.h
index 7a54a31d1d4c..8962e1e68449 100644
--- a/include/net/gre.h
+++ b/include/net/gre.h
@@ -7,7 +7,15 @@
struct gre_base_hdr {
__be16 flags;
__be16 protocol;
-};
+} __packed;
+
+struct gre_full_hdr {
+ struct gre_base_hdr fixed_header;
+ __be16 csum;
+ __be16 reserved1;
+ __be32 key;
+ __be32 seq;
+} __packed;
#define GRE_HEADER_SECTION 4
#define GREPROTO_CISCO 0