Lines Matching refs:new_net_conf
2001 …s(struct drbd_connection *connection, struct net_conf *old_net_conf, struct net_conf *new_net_conf) in _check_net_options() argument
2007 if (new_net_conf->wire_protocol != old_net_conf->wire_protocol) in _check_net_options()
2010 if (new_net_conf->two_primaries != old_net_conf->two_primaries) in _check_net_options()
2013 if (strcmp(new_net_conf->integrity_alg, old_net_conf->integrity_alg)) in _check_net_options()
2017 if (!new_net_conf->two_primaries && in _check_net_options()
2022 if (new_net_conf->two_primaries && in _check_net_options()
2023 (new_net_conf->wire_protocol != DRBD_PROT_C)) in _check_net_options()
2031 if (new_net_conf->wire_protocol == DRBD_PROT_A && fp == FP_STONITH) in _check_net_options()
2034 if (device->state.role == R_PRIMARY && new_net_conf->discard_my_data) in _check_net_options()
2038 if (new_net_conf->on_congestion != OC_BLOCK && new_net_conf->wire_protocol != DRBD_PROT_A) in _check_net_options()
2045 check_net_options(struct drbd_connection *connection, struct net_conf *new_net_conf) in check_net_options() argument
2052 rv = _check_net_options(connection, rcu_dereference(connection->net_conf), new_net_conf); in check_net_options()
2090 alloc_crypto(struct crypto *crypto, struct net_conf *new_net_conf) in alloc_crypto() argument
2095 rv = alloc_hash(&crypto->csums_tfm, new_net_conf->csums_alg, in alloc_crypto()
2099 rv = alloc_hash(&crypto->verify_tfm, new_net_conf->verify_alg, in alloc_crypto()
2103 rv = alloc_hash(&crypto->integrity_tfm, new_net_conf->integrity_alg, in alloc_crypto()
2107 if (new_net_conf->cram_hmac_alg[0] != 0) { in alloc_crypto()
2109 new_net_conf->cram_hmac_alg); in alloc_crypto()
2131 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_net_opts() local
2146 new_net_conf = kzalloc(sizeof(struct net_conf), GFP_KERNEL); in drbd_adm_net_opts()
2147 if (!new_net_conf) { in drbd_adm_net_opts()
2164 *new_net_conf = *old_net_conf; in drbd_adm_net_opts()
2166 set_net_conf_defaults(new_net_conf); in drbd_adm_net_opts()
2168 err = net_conf_from_attrs_for_change(new_net_conf, info); in drbd_adm_net_opts()
2175 retcode = check_net_options(connection, new_net_conf); in drbd_adm_net_opts()
2181 if (rsr && strcmp(new_net_conf->csums_alg, old_net_conf->csums_alg)) { in drbd_adm_net_opts()
2188 if (ovr && strcmp(new_net_conf->verify_alg, old_net_conf->verify_alg)) { in drbd_adm_net_opts()
2193 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_net_opts()
2197 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_net_opts()
2238 kfree(new_net_conf); in drbd_adm_net_opts()
2252 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_connect() local
2303 new_net_conf = kzalloc(sizeof(*new_net_conf), GFP_KERNEL); in drbd_adm_connect()
2304 if (!new_net_conf) { in drbd_adm_connect()
2309 set_net_conf_defaults(new_net_conf); in drbd_adm_connect()
2311 err = net_conf_from_attrs(new_net_conf, info); in drbd_adm_connect()
2318 retcode = check_net_options(connection, new_net_conf); in drbd_adm_connect()
2322 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_connect()
2326 ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0; in drbd_adm_connect()
2337 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_connect()
2369 kfree(new_net_conf); in drbd_adm_connect()