diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2019-11-16 13:14:30 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-11-21 23:04:18 +0100 |
commit | 7eb087cb342f2c1a351b32366738898015c95cd8 (patch) | |
tree | 1cfe4b2050607b68447cdfbdec4072c31b0f9110 | |
parent | 5f9aea36b5ebf36e8391a0df03cc6f2d8d923a5d (diff) |
backports: Adapt to changes to skb_get_hash_perturb()
The skb_get_hash_perturb() function now takes a siphash_key_t instead of
an u32. This was changed in commit 55667441c84f ("net/flow_dissector:
switch to siphash"). Use the correct type in the fq header file
depending on the kernel version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | patches/0091-fq-no-siphash_key_t/fq.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/patches/0091-fq-no-siphash_key_t/fq.patch b/patches/0091-fq-no-siphash_key_t/fq.patch new file mode 100644 index 00000000..95c28a19 --- /dev/null +++ b/patches/0091-fq-no-siphash_key_t/fq.patch @@ -0,0 +1,36 @@ +--- a/include/net/fq.h ++++ b/include/net/fq.h +@@ -69,7 +69,15 @@ struct fq { + struct list_head backlogs; + spinlock_t lock; + u32 flows_cnt; ++#if LINUX_VERSION_IS_GEQ(5,3,10) || \ ++ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ ++ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ ++ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) + siphash_key_t perturbation; ++#else ++ u32 perturbation; ++#endif + u32 limit; + u32 memory_limit; + u32 memory_usage; +--- a/include/net/fq_impl.h ++++ b/include/net/fq_impl.h +@@ -108,7 +108,15 @@ begin: + + static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb) + { ++#if LINUX_VERSION_IS_GEQ(5,3,10) || \ ++ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ ++ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ ++ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) + u32 hash = skb_get_hash_perturb(skb, &fq->perturbation); ++#else ++ u32 hash = skb_get_hash_perturb(skb, fq->perturbation); ++#endif + + return reciprocal_scale(hash, fq->flows_cnt); + } |