diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-03-12 19:31:08 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-12 23:53:49 +0400 |
commit | f9fef18c6d688697e72d1020a7c43a50c1331a58 (patch) | |
tree | c256dcf97aae43ab23c2a28cbf763e421f0dec64 /net/tipc/port.h | |
parent | 978813ee89674fdb6bb6585153166b7603173cd2 (diff) | |
download | linux-f9fef18c6d688697e72d1020a7c43a50c1331a58.tar.xz |
tipc: remove redundant 'peer_name' field in struct tipc_sock
The field 'peer_name' in struct tipc_sock is redundant, since
this information already is available from tipc_port, to which
tipc_sock has a reference.
We remove the field, and ensure that peer node and peer port
info instead is fetched via the functions that already exist
for this purpose.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.h')
-rw-r--r-- | net/tipc/port.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/tipc/port.h b/net/tipc/port.h index 3ec3e94e4334..4a2a1ac8686c 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h @@ -198,4 +198,15 @@ static inline int tipc_port_congested(struct tipc_port *p_ptr) return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2); } + +static inline u32 tipc_port_peernode(struct tipc_port *p_ptr) +{ + return msg_destnode(&p_ptr->phdr); +} + +static inline u32 tipc_port_peerport(struct tipc_port *p_ptr) +{ + return msg_destport(&p_ptr->phdr); +} + #endif |