rxrpc: Offload the completion of service conn security to the I/O thread
Offload the completion of the challenge/response cycle on a service connection to the I/O thread. After the RESPONSE packet has been successfully decrypted and verified by the work queue, offloading the changing of the call states to the I/O thread makes iteration over the conn's channel list simpler. Do this by marking the RESPONSE skbuff and putting it onto the receive queue for the I/O thread to collect. We put it on the front of the queue as we've already received the packet for it. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
This commit is contained in:
@@ -451,6 +451,7 @@ int rxrpc_io_thread(void *data)
|
||||
|
||||
/* Process received packets and errors. */
|
||||
if ((skb = __skb_dequeue(&rx_queue))) {
|
||||
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
|
||||
switch (skb->mark) {
|
||||
case RXRPC_SKB_MARK_PACKET:
|
||||
skb->priority = 0;
|
||||
@@ -463,6 +464,10 @@ int rxrpc_io_thread(void *data)
|
||||
rxrpc_input_error(local, skb);
|
||||
rxrpc_free_skb(skb, rxrpc_skb_put_error_report);
|
||||
break;
|
||||
case RXRPC_SKB_MARK_SERVICE_CONN_SECURED:
|
||||
rxrpc_input_conn_event(sp->conn, skb);
|
||||
rxrpc_put_connection(sp->conn, rxrpc_conn_put_poke);
|
||||
rxrpc_free_skb(skb, rxrpc_skb_put_conn_secured);
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
|
||||
Reference in New Issue
Block a user