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

Subscribers

People subscribed via source and target branches

to all changes: