Merge ~paelzer/ubuntu/+source/ipset:lp-1918936-speed-up-numeric-port-adds-FOCAL into ubuntu/+source/ipset:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Work in progress
Proposed branch: ~paelzer/ubuntu/+source/ipset:lp-1918936-speed-up-numeric-port-adds-FOCAL
Merge into: ubuntu/+source/ipset:ubuntu/focal-devel
Diff against target: 69 lines (+47/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1918936-Parse-port-before-trying-by-service-name.patch (+39/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
OpenStack Ubuntu packagers Pending
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+404746@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I'm setting those to WIP but only to have them vanish from the server Teams review queue.

Do not consider this a withdrawl, I still consider these as "provided as much of a helping hand that I can cross-team, but now needs a review/ack/upload from the owner".

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Or better, I'll consume the server Team slot and leave it as is since I already added an openstack packagers slot before.

+1 from my POV

review: Approve

Unmerged commits

f543822... by Christian Ehrhardt 

changelog: speed up numeric port adds (LP: #1918936)

Signed-off-by: Christian Ehrhardt <email address hidden>

c6ed807... by Christian Ehrhardt 

d/p/lp-1918936-Parse-port-before-trying-by-service-name.patch: speed up numeric port adds (LP: #1918936)

Signed-off-by: Christian Ehrhardt <email address hidden>

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 5b28d83..9b2a73f 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+ipset (7.5-1~exp1.ubuntu0.1) focal; urgency=medium
7+
8+ * d/p/lp-1918936-Parse-port-before-trying-by-service-name.patch: speed
9+ up numeric port adds (LP: #1918936)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 25 Jun 2021 08:07:14 +0200
12+
13 ipset (7.5-1~exp1) experimental; urgency=medium
14
15 * [9c18ea7] New upstream version 7.5
16diff --git a/debian/patches/lp-1918936-Parse-port-before-trying-by-service-name.patch b/debian/patches/lp-1918936-Parse-port-before-trying-by-service-name.patch
17new file mode 100644
18index 0000000..53ca445
19--- /dev/null
20+++ b/debian/patches/lp-1918936-Parse-port-before-trying-by-service-name.patch
21@@ -0,0 +1,39 @@
22+From dbeb20a667e82e4efb8b26b24a0ec641dab5c857 Mon Sep 17 00:00:00 2001
23+From: Haw Loeung <haw.loeung@canonical.com>
24+Date: Wed, 17 Feb 2021 10:15:07 +0100
25+Subject: [PATCH] Parse port before trying by service name
26+
27+This improves performance for loading IP sets using port numbers,
28+especially large ones.
29+
30+Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
31+
32+Origin: upstream, https://git.netfilter.org/ipset/commit/?id=dbeb20a667e8
33+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1918936
34+Last-Update: 2021-06-25
35+
36+---
37+ lib/parse.c | 4 ++--
38+ 1 file changed, 2 insertions(+), 2 deletions(-)
39+
40+diff --git a/lib/parse.c b/lib/parse.c
41+index 31a619db..f3f2d113 100644
42+--- a/lib/parse.c
43++++ b/lib/parse.c
44+@@ -319,11 +319,11 @@ ipset_parse_port(struct ipset_session *session,
45+ assert(opt == IPSET_OPT_PORT || opt == IPSET_OPT_PORT_TO);
46+ assert(str);
47+
48+- if (parse_portname(session, str, &port, proto) == 0) {
49++ if (string_to_u16(session, str, &port) == 0) {
50+ return ipset_session_data_set(session, opt, &port);
51+ }
52+ /* Error is stored as warning in session report */
53+- if (string_to_u16(session, str, &port) == 0) {
54++ if (parse_portname(session, str, &port, proto) == 0) {
55+ /* No error, so reset false error messages */
56+ ipset_session_report_reset(session);
57+ return ipset_session_data_set(session, opt, &port);
58+--
59+2.32.0
60+
61diff --git a/debian/patches/series b/debian/patches/series
62index f86188f..f59762a 100644
63--- a/debian/patches/series
64+++ b/debian/patches/series
65@@ -2,3 +2,4 @@ test-installed.patch
66 workaround-iphash-delete-one-by-one-test-failed.patch
67 05-delay-the-set-with-timeout-resizing-test.patch
68 fix-bash-completion.patch
69+lp-1918936-Parse-port-before-trying-by-service-name.patch

Subscribers

People subscribed via source and target branches