rxrpc: Drop channel number field from rxrpc_call struct
Drop the channel number (channel) field from the rxrpc_call struct to reduce the size of the call struct. The field is redundant: if the call is attached to a connection, the channel can be obtained from there by AND'ing with RXRPC_CHANNELMASK. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -275,7 +275,7 @@ static int rxkad_secure_packet(struct rxrpc_call *call,
|
||||
memcpy(&iv, call->conn->csum_iv.x, sizeof(iv));
|
||||
|
||||
/* calculate the security checksum */
|
||||
x = call->channel << (32 - RXRPC_CIDSHIFT);
|
||||
x = (call->cid & RXRPC_CHANNELMASK) << (32 - RXRPC_CIDSHIFT);
|
||||
x |= sp->hdr.seq & 0x3fffffff;
|
||||
call->crypto_buf[0] = htonl(sp->hdr.callNumber);
|
||||
call->crypto_buf[1] = htonl(x);
|
||||
@@ -507,7 +507,7 @@ static int rxkad_verify_packet(struct rxrpc_call *call,
|
||||
memcpy(&iv, call->conn->csum_iv.x, sizeof(iv));
|
||||
|
||||
/* validate the security checksum */
|
||||
x = call->channel << (32 - RXRPC_CIDSHIFT);
|
||||
x = (call->cid & RXRPC_CHANNELMASK) << (32 - RXRPC_CIDSHIFT);
|
||||
x |= sp->hdr.seq & 0x3fffffff;
|
||||
call->crypto_buf[0] = htonl(call->call_id);
|
||||
call->crypto_buf[1] = htonl(x);
|
||||
|
||||
Reference in New Issue
Block a user