From: Ying Xue <ying.xue@windriver.com>
To: <davem@davemloft.net>
Cc: <jon.maloy@ericsson.com>, <Paul.Gortmaker@windriver.com>,
<erik.hugne@ericsson.com>, <netdev@vger.kernel.org>,
<tipc-discussion@lists.sourceforge.net>
Subject: [PATCH net-next 05/10] tipc: remove TIPC_NAMES_GONE node flag
Date: Mon, 5 May 2014 08:56:13 +0800 [thread overview]
Message-ID: <1399251378-23842-6-git-send-email-ying.xue@windriver.com> (raw)
In-Reply-To: <1399251378-23842-1-git-send-email-ying.xue@windriver.com>
Since previously what all publications pertaining to the lost node
were removed from name table was finished in tasklet context
asynchronously, we need to TIPC_NAMES_GONE flag indicating whether
the node cleanup work is finished or not. But now as the cleanup work
has been finished when node lock is released, the flag becomes
meaningless for us.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/node.c | 22 ++++------------------
net/tipc/node.h | 8 +++-----
2 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index befbcc9..c3a36bb 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -273,18 +273,6 @@ static void node_established_contact(struct tipc_node *n_ptr)
tipc_bclink_add_node(n_ptr->addr);
}
-static void node_name_purge_complete(unsigned long node_addr)
-{
- struct tipc_node *n_ptr;
-
- n_ptr = tipc_node_find(node_addr);
- if (n_ptr) {
- tipc_node_lock(n_ptr);
- n_ptr->flags &= ~TIPC_NAMES_GONE;
- tipc_node_unlock(n_ptr);
- }
-}
-
static void node_lost_contact(struct tipc_node *n_ptr)
{
char addr_string[16];
@@ -320,12 +308,10 @@ static void node_lost_contact(struct tipc_node *n_ptr)
tipc_link_reset_fragments(l_ptr);
}
- /* Notify subscribers */
- n_ptr->flags = TIPC_NODE_LOST;
-
- /* Prevent re-contact with node until cleanup is done */
- n_ptr->flags |= TIPC_NODE_DOWN | TIPC_NAMES_GONE;
- tipc_k_signal((Handler)node_name_purge_complete, n_ptr->addr);
+ /* Notify subscribers and prevent re-contact with node until
+ * cleanup is done.
+ */
+ n_ptr->flags = TIPC_NODE_DOWN | TIPC_NODE_LOST;
}
struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)
diff --git a/net/tipc/node.h b/net/tipc/node.h
index fd86726..4bd5eff 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -49,16 +49,14 @@
/* Flags used to block (re)establishment of contact with a neighboring node
* TIPC_NODE_DOWN: indicate node is down
- * TIPC_NAMES_GONE: indicate the node's publications are purged
* TIPC_NODE_RESET: indicate node is reset
* TIPC_NODE_LOST: indicate node is lost and it's used to notify subscriptions
* when node lock is released
*/
enum {
TIPC_NODE_DOWN = (1 << 1),
- TIPC_NAMES_GONE = (1 << 2),
- TIPC_NODE_RESET = (1 << 3),
- TIPC_NODE_LOST = (1 << 4)
+ TIPC_NODE_RESET = (1 << 2),
+ TIPC_NODE_LOST = (1 << 3)
};
/**
@@ -142,7 +140,7 @@ static inline void tipc_node_lock(struct tipc_node *node)
static inline bool tipc_node_blocked(struct tipc_node *node)
{
- return (node->flags & (TIPC_NODE_DOWN | TIPC_NAMES_GONE |
+ return (node->flags & (TIPC_NODE_DOWN | TIPC_NODE_LOST |
TIPC_NODE_RESET));
}
--
1.7.9.5
next prev parent reply other threads:[~2014-05-05 0:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 0:56 [PATCH net-next 00/10] purge signal handler infrastructure Ying Xue
2014-05-05 0:56 ` [PATCH net-next 01/10] tipc: always use tipc_node_lock() to hold node lock Ying Xue
2014-05-05 0:56 ` [PATCH net-next 02/10] tipc: adjust order of variables in tipc_node structure Ying Xue
2014-05-05 0:56 ` [PATCH net-next 03/10] tipc: rename setup_blocked variable of node struct to flags Ying Xue
2014-05-05 0:56 ` [PATCH net-next 04/10] tipc: avoid to asynchronously notify subscriptions Ying Xue
2014-05-05 0:56 ` Ying Xue [this message]
2014-05-05 0:56 ` [PATCH net-next 06/10] tipc: avoid to asynchronously deliver name tables to peer node Ying Xue
2014-05-05 0:56 ` [PATCH net-next 07/10] tipc: define new functions to operate bc_lock Ying Xue
2014-05-05 0:56 ` [PATCH net-next 08/10] tipc: convert allocations of global variables associated with bclink Ying Xue
2014-05-05 0:56 ` [PATCH net-next 09/10] tipc: avoid to asynchronously reset all links Ying Xue
2014-05-05 0:56 ` [PATCH net-next 10/10] tipc: purge signal handler infrastructure Ying Xue
2014-05-05 21:27 ` [PATCH net-next 00/10] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399251378-23842-6-git-send-email-ying.xue@windriver.com \
--to=ying.xue@windriver.com \
--cc=Paul.Gortmaker@windriver.com \
--cc=davem@davemloft.net \
--cc=erik.hugne@ericsson.com \
--cc=jon.maloy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).