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