Merge ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1855825/address-interface-change-in-linux-skbuff.h/focal into ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal

Proposed by You-Sheng Yang
Status: Merged
Merged at revision: 322a01ee4fb8254178d86b3563473abdebe6b8e7
Proposed branch: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1855825/address-interface-change-in-linux-skbuff.h/focal
Merge into: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal
Diff against target: 157 lines (+115/-2)
5 files modified
debian/changelog (+9/-0)
debian/gbp.conf (+1/-1)
debian/gitlab-ci.yml (+1/-1)
debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch (+103/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
You-Sheng Yang Approve
Review via email: mp+376619@code.launchpad.net
To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 3d61f61..f2c1e47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1backport-iwlwifi-dkms (8042-0ubuntu2) focal; urgency=critical
2
3 * debian/gbp.conf, debian/gitlab-ci.yml
4 - update series to focal
5 * debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
6 - Fix system hang on connecting to WiFi base station. (LP: #1855825)
7
8 -- You-Sheng Yang <vicamo.yang@canonical.com> Wed, 11 Dec 2019 16:20:39 +0800
9
1backport-iwlwifi-dkms (8042-0ubuntu1) focal; urgency=low10backport-iwlwifi-dkms (8042-0ubuntu1) focal; urgency=low
211
3 * New upstream release.12 * New upstream release.
diff --git a/debian/gbp.conf b/debian/gbp.conf
index e78e5b0..a59e8d6 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,4 +1,4 @@
1[DEFAULT]1[DEFAULT]
2debian-branch = ubuntu/eoan2debian-branch = ubuntu/focal
3upstream-tree = tag3upstream-tree = tag
4pristine-tar = False4pristine-tar = False
diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml
index bd8224d..9db37b5 100644
--- a/debian/gitlab-ci.yml
+++ b/debian/gitlab-ci.yml
@@ -3,6 +3,6 @@ include:
3 - https://gitlab.com/hustle-ci/pipeline/raw/master/pipeline-jobs.yml3 - https://gitlab.com/hustle-ci/pipeline/raw/master/pipeline-jobs.yml
44
5variables:5variables:
6 RELEASE: 'eoan'6 RELEASE: 'focal'
7 SALSA_CI_AUTOPKGTEST_ARGS: '--timeout-install=7200'7 SALSA_CI_AUTOPKGTEST_ARGS: '--timeout-install=7200'
8 SALSA_CI_DISABLE_APTLY: 'false'8 SALSA_CI_DISABLE_APTLY: 'false'
diff --git a/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
9new file mode 1006449new file mode 100644
index 0000000..6151f1e
--- /dev/null
+++ b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
@@ -0,0 +1,103 @@
1From 0ed9684f769f127c466599292fd750b07a9b36de Mon Sep 17 00:00:00 2001
2From: You-Sheng Yang <vicamo.yang@canonical.com>
3Date: Tue, 10 Dec 2019 17:35:29 +0800
4Subject: [PATCH] backport: address interface change in linux/skbuff.h since
5 5.3.10
6
7Commit 9d0b402125a6 ("net/flow_dissector: switch to siphash") introduces
8interface changes for skb_get_hash_perturb() and struct
9fq_codel_sched_data. Since this DKMS package carries its own version of
10backported definitions of aforementioned data types, it results in
11abnormal behavior and in some cases it simply hang the whole system
12while connecting to WiFi base stations.
13
14This change synchronizes changed data types while maintaining the
15compatibility to previous releases.
16
17Closes: vicamo/backport-iwlwifi-dkms#7
18Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
19---
20 include/net/fq.h | 15 +++++++++++++++
21 include/net/fq_impl.h | 30 ++++++++++++++++++++++++++++++
22 2 files changed, 45 insertions(+)
23
24diff --git a/include/net/fq.h b/include/net/fq.h
25index d126b5d20..e0de891d6 100644
26--- a/include/net/fq.h
27+++ b/include/net/fq.h
28@@ -69,7 +69,22 @@ struct fq {
29 struct list_head backlogs;
30 spinlock_t lock;
31 u32 flows_cnt;
32+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
33+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
34+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
35+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
36+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
37+ (UTS_UBUNTU_RELEASE_ABI && \
38+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
39+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
40+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
41+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
42+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
43+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
44+ siphash_key_t perturbation;
45+#else
46 u32 perturbation;
47+#endif
48 u32 limit;
49 u32 memory_limit;
50 u32 memory_usage;
51diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h
52index be40a4b32..57effd687 100644
53--- a/include/net/fq_impl.h
54+++ b/include/net/fq_impl.h
55@@ -108,7 +108,22 @@ begin:
56
57 static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb)
58 {
59+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
60+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
61+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
62+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
63+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
64+ (UTS_UBUNTU_RELEASE_ABI && \
65+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
66+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
67+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
68+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
69+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
70+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
71+ u32 hash = skb_get_hash_perturb(skb, &fq->perturbation);
72+#else
73 u32 hash = skb_get_hash_perturb(skb, fq->perturbation);
74+#endif
75
76 return reciprocal_scale(hash, fq->flows_cnt);
77 }
78@@ -308,7 +323,22 @@ static int fq_init(struct fq *fq, int flows_cnt)
79 INIT_LIST_HEAD(&fq->backlogs);
80 spin_lock_init(&fq->lock);
81 fq->flows_cnt = max_t(u32, flows_cnt, 1);
82+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
83+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
84+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
85+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
86+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
87+ (UTS_UBUNTU_RELEASE_ABI && \
88+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
89+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
90+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
91+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
92+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
93+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
94+ get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
95+#else
96 fq->perturbation = prandom_u32();
97+#endif
98 fq->quantum = 300;
99 fq->limit = 8192;
100 fq->memory_limit = 16 << 20; /* 16 MBytes */
101--
1022.24.0
103
diff --git a/debian/patches/series b/debian/patches/series
index 9913812..1c8cd90 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
20002-fix-format-overflow-compile-error-in-kconf-confdata..patch20002-fix-format-overflow-compile-error-in-kconf-confdata..patch
30003-backport-apply-__copy-to-init_module-cleanup_module.patch30003-backport-apply-__copy-to-init_module-cleanup_module.patch
40005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch40005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
50006-backport-address-interface-change-in-linux-skbuff.h-.patch

Subscribers

People subscribed via source and target branches

to all changes: