pespin submitted this change.
client: Process up to 10 recorded pkts per poll iteration
This should decrease CPU use of lipcap capturing under high capturing
load, which is welcome now that we support osmo_io with io-uring backend
on the Tx side towards osmo-pcap-server.
The processing number is kept low in order to avoid starving the event
loop, as well as avoid filling up the msgb queue of the Tx side towards
osmo-pcap-server.
Related: SYS#7290
Change-Id: I569fc8489bae2b829ef4040d3c5111a61129de68
---
M src/osmo_client_core.c
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index e58439b..daa5fd6 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -175,7 +175,9 @@
struct osmo_pcap_handle *ph = fd->data;
int rc;
- rc = pcap_dispatch(ph->handle, 1, pcap_read_one_cb, (u_char *)ph);
+ /* Read up to 10 packets at once, to avoid starving the event loop and
+ * filling up transmit queue towards peer. */
+ rc = pcap_dispatch(ph->handle, 10, pcap_read_one_cb, (u_char *)ph);
if (rc < 0) {
rate_ctr_inc2(ph->ctrg, PH_CTR_PERR);
rate_ctr_inc2(ph->client->ctrg, CLIENT_CTR_PERR);
To view, visit change 39949. To unsubscribe, or for help writing mail filters, visit settings.