Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Fast Weighted Least Connection load balancing algorithm. |
| 3 | * |
| 4 | * Copyright 2000-2009 Willy Tarreau <w@1wt.eu> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #include <common/compat.h> |
| 14 | #include <common/config.h> |
| 15 | #include <common/debug.h> |
Willy Tarreau | 45cb4fb | 2009-10-26 21:10:04 +0100 | [diff] [blame] | 16 | #include <eb32tree.h> |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 17 | |
| 18 | #include <types/global.h> |
| 19 | #include <types/server.h> |
| 20 | |
| 21 | #include <proto/backend.h> |
| 22 | #include <proto/queue.h> |
| 23 | |
| 24 | |
| 25 | /* Remove a server from a tree. It must have previously been dequeued. This |
| 26 | * function is meant to be called when a server is going down or has its |
| 27 | * weight disabled. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 28 | * |
| 29 | * The server's lock and the lbprm's lock must be held. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 30 | */ |
| 31 | static inline void fwlc_remove_from_tree(struct server *s) |
| 32 | { |
| 33 | s->lb_tree = NULL; |
| 34 | } |
| 35 | |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 36 | /* simply removes a server from a tree. |
| 37 | * |
| 38 | * The server's lock and the lbprm's lock must be held. |
| 39 | */ |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 40 | static inline void fwlc_dequeue_srv(struct server *s) |
| 41 | { |
| 42 | eb32_delete(&s->lb_node); |
| 43 | } |
| 44 | |
| 45 | /* Queue a server in its associated tree, assuming the weight is >0. |
Willy Tarreau | 1eb6c55 | 2018-12-14 08:33:28 +0100 | [diff] [blame] | 46 | * Servers are sorted by (#conns+1)/weight. To ensure maximum accuracy, |
| 47 | * we use (#conns+1)*SRV_EWGHT_MAX/eweight as the sorting key. The reason |
| 48 | * for using #conns+1 is to sort by weights in case the server is picked |
| 49 | * and not before it is picked. This provides a better load accuracy for |
| 50 | * low connection counts when weights differ and makes sure the round-robin |
| 51 | * applies between servers of highest weight first. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 52 | * |
| 53 | * The server's lock and the lbprm's lock must be held. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 54 | */ |
| 55 | static inline void fwlc_queue_srv(struct server *s) |
| 56 | { |
Willy Tarreau | 1eb6c55 | 2018-12-14 08:33:28 +0100 | [diff] [blame] | 57 | s->lb_node.key = (s->served + 1) * SRV_EWGHT_MAX / s->next_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 58 | eb32_insert(s->lb_tree, &s->lb_node); |
| 59 | } |
| 60 | |
| 61 | /* Re-position the server in the FWLC tree after it has been assigned one |
| 62 | * connection or after it has released one. Note that it is possible that |
| 63 | * the server has been moved out of the tree due to failed health-checks. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 64 | * |
| 65 | * The server's lock must be held. The lbprm's lock will be used. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 66 | */ |
| 67 | static void fwlc_srv_reposition(struct server *s) |
| 68 | { |
| 69 | if (!s->lb_tree) |
| 70 | return; |
Christopher Faulet | 5b51755 | 2017-06-09 14:17:53 +0200 | [diff] [blame] | 71 | |
Christopher Faulet | 2a944ee | 2017-11-07 10:42:54 +0100 | [diff] [blame] | 72 | HA_SPIN_LOCK(LBPRM_LOCK, &s->proxy->lbprm.lock); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 73 | fwlc_dequeue_srv(s); |
| 74 | fwlc_queue_srv(s); |
Christopher Faulet | 2a944ee | 2017-11-07 10:42:54 +0100 | [diff] [blame] | 75 | HA_SPIN_UNLOCK(LBPRM_LOCK, &s->proxy->lbprm.lock); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | /* This function updates the server trees according to server <srv>'s new |
| 79 | * state. It should be called when server <srv>'s status changes to down. |
| 80 | * It is not important whether the server was already down or not. It is not |
| 81 | * important either that the new state is completely down (the caller may not |
| 82 | * know all the variables of a server's state). |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 83 | * |
| 84 | * The server's lock must be held. The lbprm's lock will be used. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 85 | */ |
| 86 | static void fwlc_set_server_status_down(struct server *srv) |
| 87 | { |
| 88 | struct proxy *p = srv->proxy; |
| 89 | |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 90 | if (!srv_lb_status_changed(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 91 | return; |
| 92 | |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 93 | if (srv_willbe_usable(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 94 | goto out_update_state; |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 95 | HA_SPIN_LOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 96 | |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 97 | |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 98 | if (!srv_currently_usable(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 99 | /* server was already down */ |
| 100 | goto out_update_backend; |
| 101 | |
Willy Tarreau | c93cd16 | 2014-05-13 15:54:22 +0200 | [diff] [blame] | 102 | if (srv->flags & SRV_F_BACKUP) { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 103 | p->lbprm.tot_wbck -= srv->cur_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 104 | p->srv_bck--; |
| 105 | |
| 106 | if (srv == p->lbprm.fbck) { |
| 107 | /* we lost the first backup server in a single-backup |
| 108 | * configuration, we must search another one. |
| 109 | */ |
| 110 | struct server *srv2 = p->lbprm.fbck; |
| 111 | do { |
| 112 | srv2 = srv2->next; |
| 113 | } while (srv2 && |
Willy Tarreau | c93cd16 | 2014-05-13 15:54:22 +0200 | [diff] [blame] | 114 | !((srv2->flags & SRV_F_BACKUP) && |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 115 | srv_willbe_usable(srv2))); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 116 | p->lbprm.fbck = srv2; |
| 117 | } |
| 118 | } else { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 119 | p->lbprm.tot_wact -= srv->cur_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 120 | p->srv_act--; |
| 121 | } |
| 122 | |
| 123 | fwlc_dequeue_srv(srv); |
| 124 | fwlc_remove_from_tree(srv); |
| 125 | |
| 126 | out_update_backend: |
| 127 | /* check/update tot_used, tot_weight */ |
| 128 | update_backend_weight(p); |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 129 | HA_SPIN_UNLOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 130 | |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 131 | out_update_state: |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 132 | srv_lb_commit_status(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | /* This function updates the server trees according to server <srv>'s new |
| 136 | * state. It should be called when server <srv>'s status changes to up. |
| 137 | * It is not important whether the server was already down or not. It is not |
| 138 | * important either that the new state is completely UP (the caller may not |
| 139 | * know all the variables of a server's state). This function will not change |
| 140 | * the weight of a server which was already up. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 141 | * |
| 142 | * The server's lock must be held. The lbprm's lock will be used. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 143 | */ |
| 144 | static void fwlc_set_server_status_up(struct server *srv) |
| 145 | { |
| 146 | struct proxy *p = srv->proxy; |
| 147 | |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 148 | if (!srv_lb_status_changed(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 149 | return; |
| 150 | |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 151 | if (!srv_willbe_usable(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 152 | goto out_update_state; |
| 153 | |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 154 | HA_SPIN_LOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 155 | |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 156 | if (srv_currently_usable(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 157 | /* server was already up */ |
| 158 | goto out_update_backend; |
| 159 | |
Willy Tarreau | c93cd16 | 2014-05-13 15:54:22 +0200 | [diff] [blame] | 160 | if (srv->flags & SRV_F_BACKUP) { |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 161 | srv->lb_tree = &p->lbprm.fwlc.bck; |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 162 | p->lbprm.tot_wbck += srv->next_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 163 | p->srv_bck++; |
| 164 | |
| 165 | if (!(p->options & PR_O_USE_ALL_BK)) { |
| 166 | if (!p->lbprm.fbck) { |
| 167 | /* there was no backup server anymore */ |
| 168 | p->lbprm.fbck = srv; |
| 169 | } else { |
| 170 | /* we may have restored a backup server prior to fbck, |
| 171 | * in which case it should replace it. |
| 172 | */ |
| 173 | struct server *srv2 = srv; |
| 174 | do { |
| 175 | srv2 = srv2->next; |
| 176 | } while (srv2 && (srv2 != p->lbprm.fbck)); |
| 177 | if (srv2) |
| 178 | p->lbprm.fbck = srv; |
| 179 | } |
| 180 | } |
| 181 | } else { |
| 182 | srv->lb_tree = &p->lbprm.fwlc.act; |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 183 | p->lbprm.tot_wact += srv->next_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 184 | p->srv_act++; |
| 185 | } |
| 186 | |
| 187 | /* note that eweight cannot be 0 here */ |
| 188 | fwlc_queue_srv(srv); |
| 189 | |
| 190 | out_update_backend: |
| 191 | /* check/update tot_used, tot_weight */ |
| 192 | update_backend_weight(p); |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 193 | HA_SPIN_UNLOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 194 | |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 195 | out_update_state: |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 196 | srv_lb_commit_status(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | /* This function must be called after an update to server <srv>'s effective |
| 200 | * weight. It may be called after a state change too. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 201 | * |
| 202 | * The server's lock must be held. The lbprm's lock will be used. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 203 | */ |
| 204 | static void fwlc_update_server_weight(struct server *srv) |
| 205 | { |
| 206 | int old_state, new_state; |
| 207 | struct proxy *p = srv->proxy; |
| 208 | |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 209 | if (!srv_lb_status_changed(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 210 | return; |
| 211 | |
| 212 | /* If changing the server's weight changes its state, we simply apply |
| 213 | * the procedures we already have for status change. If the state |
| 214 | * remains down, the server is not in any tree, so it's as easy as |
| 215 | * updating its values. If the state remains up with different weights, |
| 216 | * there are some computations to perform to find a new place and |
| 217 | * possibly a new tree for this server. |
| 218 | */ |
| 219 | |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 220 | old_state = srv_currently_usable(srv); |
| 221 | new_state = srv_willbe_usable(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 222 | |
| 223 | if (!old_state && !new_state) { |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 224 | srv_lb_commit_status(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 225 | return; |
| 226 | } |
| 227 | else if (!old_state && new_state) { |
| 228 | fwlc_set_server_status_up(srv); |
| 229 | return; |
| 230 | } |
| 231 | else if (old_state && !new_state) { |
| 232 | fwlc_set_server_status_down(srv); |
| 233 | return; |
| 234 | } |
| 235 | |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 236 | HA_SPIN_LOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 237 | |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 238 | if (srv->lb_tree) |
| 239 | fwlc_dequeue_srv(srv); |
| 240 | |
Willy Tarreau | c93cd16 | 2014-05-13 15:54:22 +0200 | [diff] [blame] | 241 | if (srv->flags & SRV_F_BACKUP) { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 242 | p->lbprm.tot_wbck += srv->next_eweight - srv->cur_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 243 | srv->lb_tree = &p->lbprm.fwlc.bck; |
| 244 | } else { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 245 | p->lbprm.tot_wact += srv->next_eweight - srv->cur_eweight; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 246 | srv->lb_tree = &p->lbprm.fwlc.act; |
| 247 | } |
| 248 | |
| 249 | fwlc_queue_srv(srv); |
| 250 | |
| 251 | update_backend_weight(p); |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 252 | HA_SPIN_UNLOCK(LBPRM_LOCK, &p->lbprm.lock); |
| 253 | |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 254 | srv_lb_commit_status(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 255 | } |
| 256 | |
| 257 | /* This function is responsible for building the trees in case of fast |
| 258 | * weighted least-conns. It also sets p->lbprm.wdiv to the eweight to |
| 259 | * uweight ratio. Both active and backup groups are initialized. |
| 260 | */ |
| 261 | void fwlc_init_server_tree(struct proxy *p) |
| 262 | { |
| 263 | struct server *srv; |
| 264 | struct eb_root init_head = EB_ROOT; |
| 265 | |
| 266 | p->lbprm.set_server_status_up = fwlc_set_server_status_up; |
| 267 | p->lbprm.set_server_status_down = fwlc_set_server_status_down; |
| 268 | p->lbprm.update_server_eweight = fwlc_update_server_weight; |
| 269 | p->lbprm.server_take_conn = fwlc_srv_reposition; |
| 270 | p->lbprm.server_drop_conn = fwlc_srv_reposition; |
| 271 | |
| 272 | p->lbprm.wdiv = BE_WEIGHT_SCALE; |
| 273 | for (srv = p->srv; srv; srv = srv->next) { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 274 | srv->next_eweight = (srv->uweight * p->lbprm.wdiv + p->lbprm.wmult - 1) / p->lbprm.wmult; |
Willy Tarreau | c5150da | 2014-05-13 19:27:31 +0200 | [diff] [blame] | 275 | srv_lb_commit_status(srv); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | recount_servers(p); |
| 279 | update_backend_weight(p); |
| 280 | |
| 281 | p->lbprm.fwlc.act = init_head; |
| 282 | p->lbprm.fwlc.bck = init_head; |
| 283 | |
| 284 | /* queue active and backup servers in two distinct groups */ |
| 285 | for (srv = p->srv; srv; srv = srv->next) { |
Emeric Brun | 52a91d3 | 2017-08-31 14:41:55 +0200 | [diff] [blame] | 286 | if (!srv_currently_usable(srv)) |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 287 | continue; |
Willy Tarreau | c93cd16 | 2014-05-13 15:54:22 +0200 | [diff] [blame] | 288 | srv->lb_tree = (srv->flags & SRV_F_BACKUP) ? &p->lbprm.fwlc.bck : &p->lbprm.fwlc.act; |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 289 | fwlc_queue_srv(srv); |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | /* Return next server from the FWLC tree in backend <p>. If the tree is empty, |
| 294 | * return NULL. Saturated servers are skipped. |
Willy Tarreau | 1b87748 | 2018-08-21 19:44:53 +0200 | [diff] [blame] | 295 | * |
| 296 | * The server's lock must be held. The lbprm's lock will be used. |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 297 | */ |
| 298 | struct server *fwlc_get_next_server(struct proxy *p, struct server *srvtoavoid) |
| 299 | { |
| 300 | struct server *srv, *avoided; |
| 301 | struct eb32_node *node; |
| 302 | |
| 303 | srv = avoided = NULL; |
| 304 | |
Christopher Faulet | 2a944ee | 2017-11-07 10:42:54 +0100 | [diff] [blame] | 305 | HA_SPIN_LOCK(LBPRM_LOCK, &p->lbprm.lock); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 306 | if (p->srv_act) |
| 307 | node = eb32_first(&p->lbprm.fwlc.act); |
Christopher Faulet | 5b51755 | 2017-06-09 14:17:53 +0200 | [diff] [blame] | 308 | else if (p->lbprm.fbck) { |
| 309 | srv = p->lbprm.fbck; |
| 310 | goto out; |
| 311 | } |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 312 | else if (p->srv_bck) |
| 313 | node = eb32_first(&p->lbprm.fwlc.bck); |
Christopher Faulet | 5b51755 | 2017-06-09 14:17:53 +0200 | [diff] [blame] | 314 | else { |
| 315 | srv = NULL; |
| 316 | goto out; |
| 317 | } |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 318 | |
| 319 | while (node) { |
| 320 | /* OK, we have a server. However, it may be saturated, in which |
| 321 | * case we don't want to reconsider it for now, so we'll simply |
| 322 | * skip it. Same if it's the server we try to avoid, in which |
| 323 | * case we simply remember it for later use if needed. |
| 324 | */ |
| 325 | struct server *s; |
| 326 | |
| 327 | s = eb32_entry(node, struct server, lb_node); |
| 328 | if (!s->maxconn || (!s->nbpend && s->served < srv_dynamic_maxconn(s))) { |
| 329 | if (s != srvtoavoid) { |
| 330 | srv = s; |
| 331 | break; |
| 332 | } |
| 333 | avoided = s; |
| 334 | } |
| 335 | node = eb32_next(node); |
| 336 | } |
| 337 | |
| 338 | if (!srv) |
| 339 | srv = avoided; |
Christopher Faulet | 5b51755 | 2017-06-09 14:17:53 +0200 | [diff] [blame] | 340 | out: |
Christopher Faulet | 2a944ee | 2017-11-07 10:42:54 +0100 | [diff] [blame] | 341 | HA_SPIN_UNLOCK(LBPRM_LOCK, &p->lbprm.lock); |
Willy Tarreau | f89c187 | 2009-10-01 11:19:37 +0200 | [diff] [blame] | 342 | return srv; |
| 343 | } |
| 344 | |
| 345 | |
| 346 | /* |
| 347 | * Local variables: |
| 348 | * c-indent-level: 8 |
| 349 | * c-basic-offset: 8 |
| 350 | * End: |
| 351 | */ |