From: Matus Fabian Date: Fri, 13 Sep 2024 14:22:27 +0000 (+0200) Subject: hsa: fix proxy ao connect X-Git-Tag: v25.02-rc0~19 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=6fbe913e45ff252f5d6497eb81cdcf139afc0d5d;p=vpp.git hsa: fix proxy ao connect Make sure that proxy server doesn't try to open connection to the target multiple times. When client is uploading huge amount of data it might happen that proxy_rx_callback is called again before connection to the target is established. Type: fix Change-Id: I4d272d37bc545f6f8790a115c8d26bcf3ea84f22 Signed-off-by: Matus Fabian --- diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index 20110544c04..c7e7b2a653c 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -368,6 +368,13 @@ proxy_rx_callback (session_t * s) u32 max_dequeue, ps_index; int actual_transfer __attribute__ ((unused)); + /* maybe we were already here */ + if (ps->active_open_establishing) + { + clib_spinlock_unlock_if_init (&pm->sessions_lock); + return 0; + } + rx_fifo = s->rx_fifo; tx_fifo = s->tx_fifo;