From: "cron2 (Code Review)" Date: Sat, 22 Nov 2025 21:41:55 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., gianmarco@...2726..., openvpn-devel@lists.sourceforge.net Message-ID: <8d6a45442ed913c2536fe9d6f721aadc2c67ab0d-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="YwzxMHywbL0="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: multi-socket: remove duplicated/dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: its_Giaan , plaisthos Cc: openvpn-devel --YwzxMHywbL0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/1384?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: multi-socket: remove duplicated/dead code ...................................................................... multi-socket: remove duplicated/dead code Removed the event_ctl() for ENABLE_ASYNC_PUSH in io_wait_dowork() since that function is not executed by servers anymore. Removed a duplicated code in multi_io_process_io() for new incoming TCP connections since the same thing is done couple lines above. Change-Id: Id1457f8432b4f0a69108b91ca12f2cbd0818f90d Signed-off-by: Gianmarco De Gregori Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1384 Message-Id: <20251122185239.26312-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 593.html Signed-off-by: Gert Doering --- M src/openvpn/forward.c M src/openvpn/multi_io.c 2 files changed, 2 insertions(+), 23 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/84/1384/2 diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index f01fb4c..a6d3394 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -2214,9 +2214,7 @@ static uintptr_t management_shift =3D MANAGEMENT_SHIFT; /* depends on MANAGEMENT_READ and MANAGEMENT_WRI= TE */ #endif -#ifdef ENABLE_ASYNC_PUSH - static uintptr_t file_shift =3D FILE_SHIFT; -#endif + #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) static uintptr_t dco_shift =3D DCO_SHIFT; /* Event from DCO linux kern= el module */ #endif @@ -2242,14 +2240,6 @@ } #endif -#ifdef ENABLE_ASYNC_PUSH - /* arm inotify watcher */ - if (c->options.mode =3D=3D MODE_SERVER) - { - event_ctl(c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void *)f= ile_shift); - } -#endif - /* * Possible scenarios: * (1) tcp/udp port has data available to read diff --git a/src/openvpn/multi_io.c b/src/openvpn/multi_io.c index 6e31687..fe72456 100644 --- a/src/openvpn/multi_io.c +++ b/src/openvpn/multi_io.c @@ -500,18 +500,7 @@ multi_io_action(m, NULL, TA_TUN_READ, false); } } - /* new incoming TCP client attempting to connect? */ - else if (e->arg =3D=3D MULTI_IO_SOCKET) - { - struct multi_instance *mi; - ASSERT(m->top.c2.link_sockets[0]); - socket_reset_listen_persistent(m->top.c2.link_sockets[= 0]); - mi =3D multi_create_instance_tcp(m, m->top.c2.link_soc= kets[0]); - if (mi) - { - multi_io_action(m, mi, TA_INITIAL, false); - } - } + #if defined(ENABLE_DCO) /* incoming data on DCO? */ else if (e->arg =3D=3D MULTI_IO_DCO) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1384?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id1457f8432b4f0a69108b91ca12f2cbd0818f90d Gerrit-Change-Number: 1384 Gerrit-PatchSet: 2 Gerrit-Owner: its_Giaan Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --YwzxMHywbL0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by its_Giaan.<= /p>

Vi= ew Change

The following approvals got outdated and were removed: Code-Review+2 by cron2

multi-socket: remove duplicated/dea=
d code

Removed the event_ctl() for ENABLE_ASYNC_PUSH
in io_wait_d= owork() since that function is
not executed by servers anymore.

R= emoved a duplicated code in multi_io_process_io()
for new incoming TCP c= onnections since the same
thing is done couple lines above.

Chang= e-Id: Id1457f8432b4f0a69108b91ca12f2cbd0818f90d
Signed-off-by: Gianmarco= De Gregori <gianmarco@...2726...>
Acked-by: Gert Doering <gert= @...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1384<= br>Message-Id: <20251122185239.26312-1-gert@...1296...>
URL: https= ://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34593.htmlSigned-off-by: Gert Doering <gert@...1296...>
---
M src/openv= pn/forward.c
M src/openvpn/multi_io.c
2 files changed, 2 insertions(+= ), 23 deletions(-)

git pull ssh://gerrit.openvpn=
.net:29418/openvpn refs/changes/84/1384/2
diff --git a/src/openvpn/=
forward.c b/src/openvpn/forward.c
index f01fb4c..a6d3394 10= 0644
--- a/src/openvpn/forward.c
+++ b/src/= openvpn/forward.c
@@ -2214,9 +2214,7 @@
= static uintptr_t management_shift =3D
MANAGEMENT= _SHIFT; /* depends on MANAGEMENT_READ and MANAGEMENT_WRITE */
#endif
-#ifdef ENAB= LE_ASYNC_PUSH
- stat= ic uintptr_t file_shift =3D FILE_SHIFT;
-#endif
+
#if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)=
static uintptr_t dco_shift =3D DCO_SHIFT; /* Event fr= om DCO linux kernel module */
#endif
@@ -2= 242,14 +2240,6 @@
}
#endif
=
-#ifdef ENABLE_= ASYNC_PUSH
- /* arm = inotify watcher */
- = if (c->options.mode =3D=3D MODE_SERVER)
- {
- event_ctl(c->c2.event_set, c->c2.inotify_fd, EVENT_READ= , (void *)file_shift);
= - }
-#endif-
/*
* Possible scenarios:
* (1) tcp/udp= port has data available to read
diff --git a/src/openvpn/m= ulti_io.c b/src/openvpn/multi_io.c
index 6e31687..fe72456 1= 00644
--- a/src/openvpn/multi_io.c
+++ b/sr= c/openvpn/multi_io.c
@@ -500,18 +500,7 @@
= multi_io_action(m, NULL, TA_TUN_READ, false);
}
}=
- /* new incom= ing TCP client attempting to connect? */
- else if (e->arg =3D=3D MULTI_IO_SOCKE= T)
- {
- str= uct multi_instance *mi;
- ASSERT(m->top.c2.link_sockets[0]);
- socket_reset_list= en_persistent(m->top.c2.link_sockets[0]);

- mi =3D multi_create_instance_tcp= (m, m->top.c2.link_sockets[0]);
- if (mi)
- {
- multi_io_action(m, mi, TA_INITIA= L, false);
- = }
- = }
+
#if defined(ENABLE_DCO)

/* incoming d= ata on DCO? */
else if (e->arg =3D=3D M= ULTI_IO_DCO)

To view, visit change 1384. To= unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id1457f8432b4f0a69108b91ca12= f2cbd0818f90d
Gerrit-Change-Number: 1384
Gerrit-PatchSet: 2
Gerrit-Owner: its_Giaan <gianmarco@...2786...= ..>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --YwzxMHywbL0=--