Lines Matching refs:new_net_conf
2216 …s(struct drbd_connection *connection, struct net_conf *old_net_conf, struct net_conf *new_net_conf) in _check_net_options() argument
2222 if (new_net_conf->wire_protocol != old_net_conf->wire_protocol) in _check_net_options()
2225 if (new_net_conf->two_primaries != old_net_conf->two_primaries) in _check_net_options()
2228 if (strcmp(new_net_conf->integrity_alg, old_net_conf->integrity_alg)) in _check_net_options()
2232 if (!new_net_conf->two_primaries && in _check_net_options()
2237 if (new_net_conf->two_primaries && in _check_net_options()
2238 (new_net_conf->wire_protocol != DRBD_PROT_C)) in _check_net_options()
2246 if (new_net_conf->wire_protocol == DRBD_PROT_A && fp == FP_STONITH) in _check_net_options()
2249 if (device->state.role == R_PRIMARY && new_net_conf->discard_my_data) in _check_net_options()
2253 if (new_net_conf->on_congestion != OC_BLOCK && new_net_conf->wire_protocol != DRBD_PROT_A) in _check_net_options()
2260 check_net_options(struct drbd_connection *connection, struct net_conf *new_net_conf) in check_net_options() argument
2267 rv = _check_net_options(connection, rcu_dereference(connection->net_conf), new_net_conf); in check_net_options()
2305 alloc_crypto(struct crypto *crypto, struct net_conf *new_net_conf) in alloc_crypto() argument
2310 rv = alloc_shash(&crypto->csums_tfm, new_net_conf->csums_alg, in alloc_crypto()
2314 rv = alloc_shash(&crypto->verify_tfm, new_net_conf->verify_alg, in alloc_crypto()
2318 rv = alloc_shash(&crypto->integrity_tfm, new_net_conf->integrity_alg, in alloc_crypto()
2322 if (new_net_conf->cram_hmac_alg[0] != 0) { in alloc_crypto()
2324 new_net_conf->cram_hmac_alg); in alloc_crypto()
2346 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_net_opts() local
2361 new_net_conf = kzalloc(sizeof(struct net_conf), GFP_KERNEL); in drbd_adm_net_opts()
2362 if (!new_net_conf) { in drbd_adm_net_opts()
2379 *new_net_conf = *old_net_conf; in drbd_adm_net_opts()
2381 set_net_conf_defaults(new_net_conf); in drbd_adm_net_opts()
2383 err = net_conf_from_attrs_for_change(new_net_conf, info); in drbd_adm_net_opts()
2390 retcode = check_net_options(connection, new_net_conf); in drbd_adm_net_opts()
2396 if (rsr && strcmp(new_net_conf->csums_alg, old_net_conf->csums_alg)) { in drbd_adm_net_opts()
2403 if (ovr && strcmp(new_net_conf->verify_alg, old_net_conf->verify_alg)) { in drbd_adm_net_opts()
2408 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_net_opts()
2412 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_net_opts()
2452 kfree(new_net_conf); in drbd_adm_net_opts()
2489 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_connect() local
2541 new_net_conf = kzalloc(sizeof(*new_net_conf), GFP_KERNEL); in drbd_adm_connect()
2542 if (!new_net_conf) { in drbd_adm_connect()
2547 set_net_conf_defaults(new_net_conf); in drbd_adm_connect()
2549 err = net_conf_from_attrs(new_net_conf, info); in drbd_adm_connect()
2556 retcode = check_net_options(connection, new_net_conf); in drbd_adm_connect()
2560 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_connect()
2564 ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0; in drbd_adm_connect()
2575 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_connect()
2623 kfree(new_net_conf); in drbd_adm_connect()