Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rxrpc: Prune the contents of the rxrpc_conn_proto struct

Prune the contents of the rxrpc_conn_proto struct. Most of the fields aren't
used anymore.

Signed-off-by: David Howells <dhowells@redhat.com>

+8 -27
+7 -13
net/rxrpc/ar-internal.h
··· 229 229 * Keys for matching a connection. 230 230 */ 231 231 struct rxrpc_conn_proto { 232 - unsigned long hash_key; 233 - struct rxrpc_local *local; /* Representation of local endpoint */ 234 - u32 epoch; /* epoch of this connection */ 235 - u32 cid; /* connection ID */ 236 - u8 in_clientflag; /* RXRPC_CLIENT_INITIATED if we are server */ 237 - u8 addr_size; /* Size of the address */ 238 - sa_family_t family; /* Transport protocol */ 239 - __be16 port; /* Peer UDP/UDP6 port */ 240 - union { /* Peer address */ 241 - struct in_addr ipv4_addr; 242 - struct in6_addr ipv6_addr; 243 - u32 raw_addr[0]; 232 + union { 233 + struct { 234 + u32 epoch; /* epoch of this connection */ 235 + u32 cid; /* connection ID */ 236 + }; 237 + u64 index_key; 244 238 }; 245 239 }; 246 240 ··· 578 584 579 585 static inline bool rxrpc_conn_is_service(const struct rxrpc_connection *conn) 580 586 { 581 - return conn->proto.in_clientflag; 587 + return !rxrpc_conn_is_client(conn); 582 588 } 583 589 584 590 static inline void rxrpc_get_connection(struct rxrpc_connection *conn)
+1 -1
net/rxrpc/call_object.c
··· 566 566 } 567 567 call->epoch = conn->proto.epoch; 568 568 call->service_id = conn->params.service_id; 569 - call->in_clientflag = conn->proto.in_clientflag; 569 + call->in_clientflag = RXRPC_CLIENT_INITIATED; 570 570 /* Add the new call to the hashtable */ 571 571 rxrpc_call_hash_add(call); 572 572
-11
net/rxrpc/conn_client.c
··· 132 132 } 133 133 134 134 conn->params = *cp; 135 - conn->proto.local = cp->local; 136 135 conn->proto.epoch = rxrpc_epoch; 137 136 conn->proto.cid = 0; 138 - conn->proto.in_clientflag = 0; 139 - conn->proto.family = cp->peer->srx.transport.family; 140 137 conn->out_clientflag = RXRPC_CLIENT_INITIATED; 141 138 conn->state = RXRPC_CONN_CLIENT; 142 - 143 - switch (conn->proto.family) { 144 - case AF_INET: 145 - conn->proto.addr_size = sizeof(conn->proto.ipv4_addr); 146 - conn->proto.ipv4_addr = cp->peer->srx.transport.sin.sin_addr; 147 - conn->proto.port = cp->peer->srx.transport.sin.sin_port; 148 - break; 149 - } 150 139 151 140 ret = rxrpc_get_client_connection_id(conn, gfp); 152 141 if (ret < 0)
-2
net/rxrpc/conn_service.c
··· 70 70 return ERR_PTR(-ENOMEM); 71 71 } 72 72 73 - candidate->proto.local = local; 74 73 candidate->proto.epoch = sp->hdr.epoch; 75 74 candidate->proto.cid = sp->hdr.cid & RXRPC_CIDMASK; 76 - candidate->proto.in_clientflag = RXRPC_CLIENT_INITIATED; 77 75 candidate->params.local = local; 78 76 candidate->params.peer = peer; 79 77 candidate->params.service_id = sp->hdr.serviceId;