summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-12-21 19:41:12 -0800
committerDave Barach <vpp@barachs.net>2024-01-09 17:07:54 +0000
commit97fef28a0bd700d6ac6d8325e8a4335614d95bec (patch)
treec2cd572c8d0c9674dc21c4341aa9cb3adeebda1d /src/vnet/session/application_local.c
parent7428eaa4a1ae55052825cdc6c0a9ae6c4f8748ac (diff)
session: make app listener pool global
One less pointer chase when accepting sessions. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I20dbb21d15d4a703f76e3b12f04a6f5b5d2a3cd8
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r--src/vnet/session/application_local.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 8fd3d44efe0..8c6cf8a93fa 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -995,7 +995,7 @@ ct_session_connect (transport_endpoint_cfg_t * tep)
goto global_scope;
ll = listen_session_get_from_handle (lh);
- al = app_listener_get_w_session (ll);
+ al = app_listener_get (ll->al_index);
/*
* Break loop if rule in local table points to connecting app. This
@@ -1024,8 +1024,12 @@ global_scope:
ll = session_lookup_listener_wildcard (table_index, sep);
/* Avoid connecting app to own listener */
- if (ll && ll->app_index != app->app_index)
- return ct_connect (app_wrk, ll, sep_ext);
+ if (ll)
+ {
+ al = app_listener_get (ll->al_index);
+ if (al->app_index != app->app_index)
+ return ct_connect (app_wrk, ll, sep_ext);
+ }
/* Failed to connect but no error */
return SESSION_E_LOCAL_CONNECT;