summaryrefslogtreecommitdiff
path: root/net/rxrpc/call_object.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-08-23 15:27:24 +0100
committerDavid Howells <dhowells@redhat.com>2016-08-23 15:27:24 +0100
commit01a90a459850ed1f1573f06f00f7b9d466339df0 (patch)
tree41a4aa08b699f82b2e401ffc83759ebbe3545693 /net/rxrpc/call_object.c
parentf36b5e444cf772f52782d47e99c68fef20ac5195 (diff)
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>
Diffstat (limited to 'net/rxrpc/call_object.c')
-rw-r--r--net/rxrpc/call_object.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 008188103fd6..4af01805bfc7 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -317,7 +317,6 @@ struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *rx,
candidate->conn = conn;
candidate->cid = sp->hdr.cid;
candidate->call_id = sp->hdr.callNumber;
- candidate->channel = chan;
candidate->rx_data_post = 0;
candidate->state = RXRPC_CALL_SERVER_ACCEPTING;
candidate->flags |= (1 << RXRPC_CALL_IS_SERVICE);
@@ -330,7 +329,7 @@ struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *rx,
call = rcu_dereference_protected(conn->channels[chan].call,
lockdep_is_held(&conn->channel_lock));
- _debug("channel[%u] is %p", candidate->channel, call);
+ _debug("channel[%u] is %p", candidate->cid & RXRPC_CHANNELMASK, call);
if (call && call->call_id == sp->hdr.callNumber) {
/* already set; must've been a duplicate packet */
_debug("extant call [%d]", call->state);
@@ -677,8 +676,8 @@ static void rxrpc_destroy_call(struct work_struct *work)
struct rxrpc_call *call =
container_of(work, struct rxrpc_call, destroyer);
- _enter("%p{%d,%d,%p}",
- call, atomic_read(&call->usage), call->channel, call->conn);
+ _enter("%p{%d,%x,%p}",
+ call, atomic_read(&call->usage), call->cid, call->conn);
ASSERTCMP(call->state, ==, RXRPC_CALL_DEAD);