Lines Matching refs:pending

98  * key: | (reserved)|passive idx| active idx|pending idx|
107 u8 pending:2,
115 pending:2;
1163 if (key.pending) {
1164 if (tipc_aead_users(c->aead[key.pending]) > 0)
1168 new_key = key.pending;
1176 key.pending = pos;
1181 key.pending = key_next(key.active ?: key.passive);
1182 new_key = key.pending;
1191 key.pending);
1209 /* Try to cancel pending work */
1238 * @new_pending: new pending slot if aligned (= TX key from peer)
1242 * That means, there must be no active key but a pending key at unaligned slot.
1243 * If so, we try to move the pending key to the new slot.
1258 if (key.pending == new_pending) {
1264 if (!key.pending)
1266 if (tipc_aead_users(rx->aead[key.pending]) > 0)
1269 /* Try to "isolate" this pending key first */
1270 tmp1 = tipc_aead_rcu_ptr(rx->aead[key.pending], &rx->lock);
1273 rcu_assign_pointer(rx->aead[key.pending], NULL);
1278 x = (key.passive - key.pending + new_pending) % KEY_MAX;
1289 pr_info_ratelimited("%s: key[%d] -> key[%d]\n", rx->name, key.pending,
1337 k = (i == 0) ? key.pending :
1415 /* Cancel a pending key distributing if any */
1449 tipc_crypto_key_set_state(tx, key.passive, 0, key.pending);
1549 /* TX pending: taking all users & stable -> active */
1554 if (!key.pending || tipc_aead_users(tx->aead[key.pending]) <= 0)
1559 tipc_crypto_key_set_state(tx, key.passive, key.pending, 0);
1563 pr_info("%s: key[%d] is activated\n", tx->name, key.pending);
1568 /* RX pending: having user -> active */
1571 if (!key.pending || tipc_aead_users(rx->aead[key.pending]) <= 0)
1576 key.active = key.pending;
1580 pr_info("%s: key[%d] is activated\n", rx->name, key.pending);
1584 /* RX pending: not working -> remove */
1585 if (!key.pending || tipc_aead_users(rx->aead[key.pending]) > -10)
1589 tipc_crypto_key_detach(rx->aead[key.pending], &rx->lock);
1590 pr_debug("%s: key[%d] is removed\n", rx->name, key.pending);
1594 /* RX active: timed out or no user -> pending */
1601 if (key.pending)
1604 key.pending = key.active;
1606 tipc_crypto_key_set_state(rx, key.passive, 0, key.pending);
1607 tipc_aead_users_set(rx->aead[key.pending], 0);
1619 tipc_crypto_key_set_state(rx, 0, key.active, key.pending);
1666 * encrypt the original TIPC message by using the pending, master or active
1700 if (unlikely(key.pending)) {
1701 tx_key = key.pending;
1708 key.pending);
1825 if (tx_key == key.active || tx_key == key.pending ||
1865 * pending received session key, nor a newer
2092 else if (k == key.pending)
2134 else if (k == key->pending)
2361 key = tx->key.pending ?: tx->key.active;
2374 /* Case 2: Attach a pending received session key from peer if any */
2444 if (unlikely(key.pending))