Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1962?usp=email
to review the following change.
Change subject: multi_io: drop IOW_MBUF
......................................................................
multi_io: drop IOW_MBUF
Before the UDP and TCP server loops were merged, each drained the
bcast/mcast/client-to-client queue its own way: UDP armed EVENT_WRITE
through IOW_MBUF, TCP used the flush loop at the end of
multi_io_process_io(). The merge kept both, leaving two consumers with
different disciplines.
Neither checks the protocol of the instance it picks up, but only the
TCP side copes: it tests proto_is_dgram() and tcp_link_out_deferred
before writing. The UDP one takes whatever heads the queue, TCP
instances included, and writes straight to that instance's socket,
bypassing the deferred queue TCP needs for backpressure.
Drain the queue from the flush loop alone and drop the UDP consumer.
IOW_MBUF only existed to arm the socket for it, so it goes as well.
Change-Id: I165c632da6a837d0cca55bee4c2cc390b91d1e54
Signed-off-by: Gianmarco De Gregori <[email protected]>
---
M src/openvpn/forward.c
M src/openvpn/forward.h
M src/openvpn/mudp.c
M src/openvpn/multi_io.c
4 files changed, 3 insertions(+), 17 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1962/1
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index a8a4a07..3907845 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -2105,14 +2105,6 @@
}
/*
- * outgoing bcast buffer waiting to be sent?
- */
- if (flags & IOW_MBUF)
- {
- socket |= EVENT_WRITE;
- }
-
- /*
* Force wait on TUN input, even if also waiting on TCP/UDP output
*/
if (flags & IOW_READ_TUN_FORCE)
diff --git a/src/openvpn/forward.h b/src/openvpn/forward.h
index 324c0b4..0309725 100644
--- a/src/openvpn/forward.h
+++ b/src/openvpn/forward.h
@@ -58,7 +58,6 @@
#define IOW_SHAPER (1 << 4)
#define IOW_CHECK_RESIDUAL (1 << 5)
#define IOW_FRAG (1 << 6)
-#define IOW_MBUF (1 << 7)
#define IOW_READ_TUN_FORCE (1 << 8)
#define IOW_WAIT_SIGNAL (1 << 9)
diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c
index 4794b7e..e840a2d 100644
--- a/src/openvpn/mudp.c
+++ b/src/openvpn/mudp.c
@@ -452,10 +452,9 @@
static inline void
multi_process_outgoing_link(struct multi_context *m, const unsigned int
mpp_flags)
{
- struct multi_instance *mi = multi_process_outgoing_link_pre(m);
- if (mi)
+ if (m->pending)
{
- multi_process_outgoing_link_dowork(m, mi, mpp_flags);
+ multi_process_outgoing_link_dowork(m, m->pending, mpp_flags);
}
}
diff --git a/src/openvpn/multi_io.c b/src/openvpn/multi_io.c
index bce5018..595afe2 100644
--- a/src/openvpn/multi_io.c
+++ b/src/openvpn/multi_io.c
@@ -177,10 +177,6 @@
flags |= IOW_TO_LINK;
}
}
- else if (mbuf_defined(m->mbuf))
- {
- flags |= IOW_MBUF;
- }
else
{
flags |= IOW_READ;
@@ -565,7 +561,7 @@
multi_io->n_esr = 0;
/*
- * Process queued mbuf packets destined for TCP socket
+ * Drain the queued mbuf packets, datagram and TCP instances alike
*/
{
struct multi_instance *mi;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1962?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I165c632da6a837d0cca55bee4c2cc390b91d1e54
Gerrit-Change-Number: 1962
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel