diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-10-22 08:51:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-24 06:56:45 -0700 |
commit | c72fa872a23f03b2b9c17e88f3b0a8070924e5f1 (patch) | |
tree | 852fd70aa5212a91390478247131ba9adb93b8fb /net/tipc/link.h | |
parent | 7214bcf8753109256d635ba079938fbd6fcf713b (diff) | |
download | linux-stable-c72fa872a23f03b2b9c17e88f3b0a8070924e5f1.tar.gz linux-stable-c72fa872a23f03b2b9c17e88f3b0a8070924e5f1.tar.bz2 linux-stable-c72fa872a23f03b2b9c17e88f3b0a8070924e5f1.zip |
tipc: eliminate link's reference to owner node
With the recent commit series, we have established a one-way dependency
between the link aggregation (struct tipc_node) instances and their
pertaining tipc_link instances. This has enabled quite significant code
and structure simplifications.
In this commit, we eliminate the field 'owner', which points to an
instance of struct tipc_node, from struct tipc_link, and replace it with
a pointer to struct net, which is the only external reference now needed
by a link instance.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r-- | net/tipc/link.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h index 9b5198e90fdf..eb1d7f9d5522 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h @@ -111,7 +111,7 @@ struct tipc_stats { * @name: link name character string * @media_addr: media address to use when sending messages over link * @timer: link timer - * @owner: pointer to peer node + * @net: pointer to namespace struct * @refcnt: reference counter for permanent references (owner node & timer) * @peer_session: link session # being used by peer end of link * @peer_bearer_id: bearer id used by link's peer endpoint @@ -154,7 +154,7 @@ struct tipc_link { u32 addr; char name[TIPC_MAX_LINK_NAME]; struct tipc_media_addr *media_addr; - struct tipc_node *owner; + struct net *net; /* Management and link supervision data */ u32 peer_session; @@ -165,6 +165,7 @@ struct tipc_link { u32 abort_limit; u32 state; u16 peer_caps; + bool active; u32 silent_intv_cnt; struct { unchar hdr[INT_H_SIZE]; @@ -219,7 +220,7 @@ struct tipc_link { struct tipc_stats stats; }; -bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id, +bool tipc_link_create(struct net *net, char *if_name, int bearer_id, int tolerance, char net_plane, u32 mtu, int priority, int window, u32 session, u32 ownnode, u32 peer, u16 peer_caps, @@ -229,7 +230,7 @@ bool tipc_link_create(struct tipc_node *n, char *if_name, int bearer_id, struct sk_buff_head *inputq, struct sk_buff_head *namedq, struct tipc_link **link); -bool tipc_link_bc_create(struct tipc_node *n, u32 ownnode, u32 peer, +bool tipc_link_bc_create(struct net *net, u32 ownnode, u32 peer, int mtu, int window, u16 peer_caps, struct sk_buff_head *inputq, struct sk_buff_head *namedq, @@ -247,7 +248,7 @@ bool tipc_link_is_establishing(struct tipc_link *l); bool tipc_link_is_synching(struct tipc_link *l); bool tipc_link_is_failingover(struct tipc_link *l); bool tipc_link_is_blocked(struct tipc_link *l); -int tipc_link_is_active(struct tipc_link *l_ptr); +void tipc_link_set_active(struct tipc_link *l, bool active); void tipc_link_purge_queues(struct tipc_link *l_ptr); void tipc_link_purge_backlog(struct tipc_link *l); void tipc_link_reset(struct tipc_link *l_ptr); |