Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195027
b: refs/heads/master
c: 01fee25
h: refs/heads/master
i:
  195025: 751ac3e
  195023: fdd9c94
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed May 13, 2010
1 parent d31d48a commit 20f61a1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15e979da7c9ddddd55d2eb81e962dbb2aac51ad1
refs/heads/master: 01fee256a675f6492fc6945bbb9b59640d8705d4
2 changes: 1 addition & 1 deletion trunk/net/tipc/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
memcpy(addr, &media_addr, sizeof(*addr));
tipc_link_reset(link);
}
link_fully_up = (link->state == WORKING_WORKING);
link_fully_up = link_working_working(link);
spin_unlock_bh(&n_ptr->lock);
if ((type == DSC_RESP_MSG) || link_fully_up)
return;
Expand Down
30 changes: 0 additions & 30 deletions trunk/net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,36 +202,6 @@ static unsigned int align(unsigned int i)
return (i + 3) & ~3u;
}

static int link_working_working(struct link *l_ptr)
{
return (l_ptr->state == WORKING_WORKING);
}

static int link_working_unknown(struct link *l_ptr)
{
return (l_ptr->state == WORKING_UNKNOWN);
}

static int link_reset_unknown(struct link *l_ptr)
{
return (l_ptr->state == RESET_UNKNOWN);
}

static int link_reset_reset(struct link *l_ptr)
{
return (l_ptr->state == RESET_RESET);
}

static int link_blocked(struct link *l_ptr)
{
return (l_ptr->exp_msg_count || l_ptr->blocked);
}

static int link_congested(struct link *l_ptr)
{
return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]);
}

static void link_init_max_pkt(struct link *l_ptr)
{
u32 max_pkt;
Expand Down
35 changes: 35 additions & 0 deletions trunk/net/tipc/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,39 @@ static inline u32 lesser(u32 left, u32 right)
return less_eq(left, right) ? left : right;
}


/*
* Link status checking routines
*/

static inline int link_working_working(struct link *l_ptr)
{
return (l_ptr->state == WORKING_WORKING);
}

static inline int link_working_unknown(struct link *l_ptr)
{
return (l_ptr->state == WORKING_UNKNOWN);
}

static inline int link_reset_unknown(struct link *l_ptr)
{
return (l_ptr->state == RESET_UNKNOWN);
}

static inline int link_reset_reset(struct link *l_ptr)
{
return (l_ptr->state == RESET_RESET);
}

static inline int link_blocked(struct link *l_ptr)
{
return (l_ptr->exp_msg_count || l_ptr->blocked);
}

static inline int link_congested(struct link *l_ptr)
{
return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]);
}

#endif

0 comments on commit 20f61a1

Please sign in to comment.