-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathskbuff.h.diff
More file actions
49 lines (44 loc) · 1.28 KB
/
skbuff.h.diff
File metadata and controls
49 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- ../clean/linux-4.3/include/linux/skbuff.h 2015-11-01 18:05:25.000000000 -0600
+++ include/linux/skbuff.h 2018-12-24 20:48:03.319062142 -0600
@@ -23,6 +23,7 @@
#include <linux/rbtree.h>
#include <linux/socket.h>
+
#include <linux/atomic.h>
#include <asm/types.h>
#include <linux/spinlock.h>
@@ -632,6 +633,8 @@
__u8 ipvs_property:1;
__u8 inner_protocol_type:1;
__u8 remcsum_offload:1;
+ //add by Kun
+ __u8 phase_num:2;
/* 3 or 5 bit hole */
#ifdef CONFIG_NET_SCHED
@@ -956,6 +959,9 @@
skb->l4_hash = is_l4;
skb->sw_hash = is_sw;
skb->hash = hash;
+
+ //add by Kun
+ skb->phase_num = skb->phase_num + 1;
}
static inline void
@@ -1023,8 +1029,18 @@
static inline __u32 skb_get_hash(struct sk_buff *skb)
{
- if (!skb->l4_hash && !skb->sw_hash)
+//add by Kun
+// if (!skb->l4_hash && !skb->sw_hash)
+// __skb_get_hash(skb);
+
+//allow recalculation in VXLAN and veth phase receiving
+ if (skb->phase_num <= 2) {
__skb_get_hash(skb);
+ } else {
+ if (!skb->l4_hash && !skb->sw_hash)
+ __skb_get_hash(skb);
+ }
+//end
return skb->hash;
}