hsa: fix proxy udp issue

- when testing multithreaded proxy with udp iperf, iperf wouldn't
  connect -> made client_sep a vector so multiple transport protocols
  can be saved

Type: fix

Change-Id: I91936bd3214f40deb914792c02783112ae59942c
Signed-off-by: Adrian Villin <avillin@cisco.com>
This commit is contained in:
Adrian Villin 2024-12-05 14:58:39 +01:00 committed by Florin Coras
parent 91e63915e1
commit 1c0af1fb68
2 changed files with 5 additions and 4 deletions

View File

@ -577,8 +577,7 @@ proxy_session_start_connect (proxy_session_side_ctx_t *sc, session_t *s)
* on its contents, the destination and parameters of the connect to the
* upstream are decided
*/
clib_memcpy (&a->sep_ext, &pm->client_sep, sizeof (pm->client_sep));
clib_memcpy (&a->sep_ext, &pm->client_sep[tp], sizeof (*pm->client_sep));
}
a->api_context = ps_index;
@ -1295,7 +1294,8 @@ proxy_server_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
default_client_uri);
client_uri = format (0, "%s%c", default_client_uri, 0);
}
if (parse_uri ((char *) client_uri, &pm->client_sep))
if (parse_uri ((char *) client_uri,
&pm->client_sep[pm->server_sep.transport_proto]))
{
error = clib_error_return (0, "Invalid client uri %v", client_uri);
goto done;
@ -1345,6 +1345,7 @@ proxy_main_init (vlib_main_t * vm)
pm->active_open_client_index = ~0;
pm->server_app_index = APP_INVALID_INDEX;
pm->idle_timeout = 600; /* connect-proxy default idle timeout 10 minutes */
vec_validate (pm->client_sep, TRANSPORT_N_PROTOS - 1);
return 0;
}

View File

@ -100,7 +100,7 @@ typedef struct
u32 idle_timeout; /**< connect-proxy timeout for idle connections */
int rcv_buffer_size;
session_endpoint_cfg_t server_sep;
session_endpoint_cfg_t client_sep;
session_endpoint_cfg_t *client_sep;
/*
* Flags