summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/quic/quic.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 5a57947325a..4ca42b9fdfc 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -1298,16 +1298,17 @@ quic_connect_connection (session_endpoint_cfg_t * sep)
vnet_connect_args_t _cargs, *cargs = &_cargs;
transport_endpt_crypto_cfg_t *ccfg;
quic_main_t *qm = &quic_main;
+ u32 ctx_index, thread_index;
quic_ctx_t *ctx;
app_worker_t *app_wrk;
application_t *app;
- u32 ctx_index;
- u32 thread_index = vlib_get_thread_index ();
int error;
if (!sep->ext_cfg)
return SESSION_E_NOEXTCFG;
+ /* Use pool on thread 1 if we have workers because of UDP */
+ thread_index = vlib_num_workers () ? 1 : 0;
ccfg = &sep->ext_cfg->crypto;
clib_memset (cargs, 0, sizeof (*cargs));
@@ -1785,11 +1786,15 @@ quic_udp_session_connected_callback (u32 quic_app_index, u32 ctx_index,
app_worker_t *app_wrk;
quicly_conn_t *conn;
quic_ctx_t *ctx;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index;
int ret;
quicly_context_t *quicly_ctx;
-
+ /* Allocate session on whatever thread udp used, i.e., probably first
+ * worker, although this may be main thread. If it is main, it's done
+ * with a worker barrier */
+ thread_index = udp_session->thread_index;
+ ASSERT (thread_index == 0 || thread_index == 1);
ctx = quic_ctx_get (ctx_index, thread_index);
if (err)
{
@@ -1833,11 +1838,7 @@ quic_udp_session_connected_callback (u32 quic_app_index, u32 ctx_index,
QUIC_DBG (2, "Registering conn with id %lu %lu", kv.key[0], kv.key[1]);
clib_bihash_add_del_16_8 (&quic_main.connection_hash, &kv, 1 /* is_add */ );
- /* UDP stack quirk? preemptively transfer connection if that happens */
- if (udp_session->thread_index != thread_index)
- quic_transfer_connection (ctx_index, udp_session->thread_index);
- else
- quic_send_packets (ctx);
+ quic_send_packets (ctx);
return ret;
}
13'>13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206