Jon Maloy | 26 Jun 03:05 2015
Picon

[PATCH net-next v3 00/13] tipc: separate link and link aggregation layers

This is the first batch of a longer series that has two main objectives:

o Finer lock granularity during message sending and reception,
  especially regarding usage of the node spinlock.

o Better separation between the link layer implementation and the link
  aggregation layer, represented by node.c::struct tipc_node.

Hopefully these changes also make this part of the code somewhat easier
to comprehend and maintain.

v2: Commit #3: - Corrected wrong initialization of node.bclink->namedq
                 causing lockdep warning and occasional crashes.
               - Minor update of log text accrording to comment from
                 Erik Hugne.
           #4: - Corrected erroneous redisribution of active link slots,
                 causing unpredicatable behavior on all links. (In reality
                 I had already fixed this, but in a later patch outside
                 this series)

v3: Updated according to feedback from Ying.
    Commit #2: -Renamed function node_actv_link() to node_active_link()
           #4: -Introduced definition of INVALID_BEARER_ID. Renamed
                array tipc_node:actv_links to tipc_node:active_bearers.
                Improved description of this array and the changes made.
           #5: -Introduced a new commit #5, to make buffer handling
                in tipc_link_xmit() more consistent, and enable correct
                handling of return value -ENOBUFS in the next commit.
           #6: -Testing on if(!rc) instead of if (l) in tipc_node_xmit().
                Made new function tipc_bearer_xmit() outline.
(Continue reading)

Jon Maloy | 25 Jun 22:52 2015
Picon

[PATCH net-next v2 0/3] tipc: clean up socket message reception

Despite recent improvements the message receive code in socket.c
is perceived as inconsistent and hard to follow, especially regarding
the logics for message rejection. With the commits in this series
we try to remedy this situation.

Jon Maloy (3):
  tipc: let function tipc_msg_reverse() expand header when needed
  tipc: introduce new tipc_sk_return_msg() function
  tipc: clean up socket layer message reception

 net/tipc/msg.c    |  86 +++++++-------
 net/tipc/msg.h    |   6 +-
 net/tipc/socket.c | 326 +++++++++++++++++++++++++++---------------------------
 net/tipc/socket.h |   2 +-
 4 files changed, 218 insertions(+), 202 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
Jon Maloy | 22 Jun 23:08 2015
Picon

[PATCH net-next 1/1] tipc: flush broadcast backlog queue when last node is lost

Commit 05dcc5aa4dcced4f59f925625cea669e82b75519
("tipc: split link outqueue") introduced a bug to the broadcast link,
preventing the backlog queue of the said to not be cleaned up when
the last target node has been removed.

This manifests itself as a warning:

WARNING: CPU: 1 PID: 216 at net/tipc/bcast.c:633 tipc_bcbearer_send+0x249/0x270 [tipc]()
[  243.998330] Modules linked in: tipc ip6_udp_tunnel udp_tunnel
[  243.999015] CPU: 1 PID: 216 Comm: tipc Not tainted 4.1.0-rc7+ #33
[  243.999751] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  244.000360]  ffffffffa0020673 ffff88003fbeb8c8 ffffffff8163c640 0000000000000007
[  244.001235]  0000000000000000 ffff88003fbeb908 ffffffff810528c5 ffff88003fbeb918
[  244.002179]  ffff88003fbaa890 000000000000ffff ffff88003fb71948 ffff88003f7c8600
[  244.003084] Call Trace:
[  244.003482]  [<ffffffff8163c640>] dump_stack+0x45/0x57
[  244.004014]  [<ffffffff810528c5>] warn_slowpath_common+0x85/0xc0
[  244.004765]  [<ffffffff810529a5>] warn_slowpath_null+0x15/0x20
[  244.005464]  [<ffffffffa0008519>] tipc_bcbearer_send+0x249/0x270 [tipc]
[  244.006204]  [<ffffffffa000b179>] tipc_bearer_send+0x39/0x50 [tipc]
[  244.006940]  [<ffffffffa000e95e>] tipc_link_push_packets+0x12e/0x1b0 [tipc]
[  244.007745]  [<ffffffffa0008a68>] tipc_bclink_acknowledge+0x2c8/0x310 [tipc]
[  244.008494]  [<ffffffffa0017ebb>] tipc_node_link_down+0x35b/0x370 [tipc]
[  244.009241]  [<ffffffff81642887>] ? _raw_spin_unlock_bh+0x17/0x20
[  244.009952]  [<ffffffffa000cf6c>] tipc_link_reset+0xec/0x350 [tipc]
[  244.010658]  [<ffffffffa000d1e1>] tipc_link_delete+0x11/0x40 [tipc]
[  244.011355]  [<ffffffffa000d287>] tipc_link_delete_list+0x77/0xb0 [tipc]
[  244.012069]  [<ffffffffa000a254>] bearer_disable+0x54/0xd0 [tipc]
[  244.012762]  [<ffffffffa000b4c2>] tipc_nl_bearer_disable+0x72/0xa0 [tipc]
[  244.013526]  [<ffffffff8153d8b9>] genl_family_rcv_msg+0x1c9/0x3a0
(Continue reading)

Ying Xue | 18 Jun 04:56 2015

Re: [PATCH] tipc:Make the function tipc_buf_append have a return type of bool

On 06/18/2015 10:44 AM, Nicholas Krause wrote:
> This converts the function tipc_buf_append now due to this
> particular function only returning either one or zero as
> its return value.
> 
> Signed-off-by: Nicholas Krause <xerofoify <at> gmail.com>

Acked-by: Ying Xue <ying.xue <at> windriver.com>

> ---
>  net/tipc/msg.c | 12 ++++++------
>  net/tipc/msg.h |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/net/tipc/msg.c b/net/tipc/msg.c
> index c3e96e8..52f2978 100644
> --- a/net/tipc/msg.c
> +++ b/net/tipc/msg.c
>  <at>  <at>  -115,9 +115,9  <at>  <at>  struct sk_buff *tipc_msg_create(uint user, uint type,
>   *            out: set when successful non-complete reassembly, otherwise NULL
>   *  <at> *buf:     in:  the buffer to append. Always defined
>   *            out: head buf after successful complete reassembly, otherwise NULL
> - * Returns 1 when reassembly complete, otherwise 0
> + * Returns true when reassembly complete, otherwise false
>   */
> -int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
> +bool tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
>  {
>  	struct sk_buff *head = *headbuf;
>  	struct sk_buff *frag = *buf;
(Continue reading)

Jon Maloy | 16 Jun 06:41 2015
Picon

[PATCH net-next 0/2] tipc: clean up socket message reception

Despite recent improvements the message receive code in socket.c
is perceived as inconsistent and hard to follow, especally regarding
the logics for message rejection. The two commmits in this series
try to remedy this situation.

Jon Maloy (2):
  tipc: let function tipc_msg_reverse() expand header when needed
  tipc: clean up socket layer message reception

 net/tipc/msg.c    |  82 ++++++++-------
 net/tipc/msg.h    |   6 +-
 net/tipc/socket.c | 303 ++++++++++++++++++++++++++++--------------------------
 net/tipc/socket.h |   2 +-
 4 files changed, 209 insertions(+), 184 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
erik.hugne | 15 Jun 15:03 2015
Picon

[PATCH] tipc: fix another problem with random link resets

From: Erik Hugne <erik.hugne <at> ericsson.com>

If a CONN_MANAGER probe is processed in scope of the socket backlog
receive routine, the resulting probe reply will be passed to
tipc_link_xmit_skb with dnode uninitialized. This will cause the
probe reply to be either dropped or sent to a random node. Since
the node/link selected for transmission is different to the one
specified in the probe header, the probe will be dropped on the
receiving side. This process will then repeat until the links are
finally reset.
We fix this by moving the CONN_MANAGER probe reply handling to
where it should be (tipc_sk_proto_rcv) and only reject errored
messages from tipc_backlog_rcv.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
---

We are still experiencing problems with random link resets on
compute/payload nodes.
I realized today that the issue brought up in:
http://thread.gmane.org/gmane.network.tipc.general/8781/focus=8783
was never fixed..
This patch is a modified version from the one linked above.
Please review.

 net/tipc/socket.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 46b6ed5..2b234bd 100644
(Continue reading)

Jon Maloy | 9 Jun 21:01 2015
Picon

[PATCH net-next v2 00/12] tipc: separate link and link aggregation layer


This is the first batch of a longer series that has two main objectives:

o Finer lock granularity during message sending and reception,
  especially regarding usage of the node spinlock.

o Better separation between the link layer implementation and the link
  aggregation layer, represented by node.c::struct tipc_node.

Hopefully these changes also make this part of code somewhat easier
to comprehend and maintain.

v2: Commit #3: - Corrected wrong initialization of node.bclink->namedq
                 causing lockdep warning and occasional crashes.
               - Minor update of log text accrording to comment from
                 Erik Hugne.
           #4: - Corrected erroneous redisribution of active link slots,
                 causing unpredicatable behavior on all links. (In reality
                 I had already fixed this, but in a later patch outside
                 this series)

Jon Maloy (12):
  tipc: introduce link entry structure to struct tipc_node
  tipc: move link creation from neighbor discoverer to node
  tipc: move link input queue to tipc_node
  tipc: use bearer index when looking up active links
  tipc: make media xmit call outside node spinlock context
  tipc: clean up definitions and usage of link flags
  tipc: introduce new link protocol msg create function
  tipc: improve link FSM implementation
(Continue reading)

erik.hugne | 9 Jun 17:27 2015
Picon

[PATCH] tipc: disconnect socket directly after probe failure

From: Erik Hugne <erik.hugne <at> ericsson.com>

If the TIPC connection timer expires in a probing state, a
self abort message is supposed to be generated and delivered
to the local socket. This is currently broken, and the abort
message is actually sent out to the peer node with invalid
addressing information. This will cause the link to enter
a constant retransmission state and eventually reset.
We fix this by removing the self-abort message creation and
tear down connection immediately instead.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
Reviewed-by: Ying Xue <ying.xue <at> windriver.com>
Reviewed-by: Jon Maloy <jon.maloy <at> ericsson.com>
---
 net/tipc/socket.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 30ea82a..46b6ed5 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
 <at>  <at>  -2140,11 +2140,17  <at>  <at>  static void tipc_sk_timeout(unsigned long data)
 	peer_node = tsk_peer_node(tsk);

 	if (tsk->probing_state == TIPC_CONN_PROBING) {
-		/* Previous probe not answered -> self abort */
-		skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE,
-				      TIPC_CONN_MSG, SHORT_H_SIZE, 0,
-				      own_node, peer_node, tsk->portid,
(Continue reading)

Jon Maloy | 30 May 17:52 2015
Picon

[PATCH net-next 00/12] tipc: separate link and link aggregation layer

This is the first batch of a longer series that has two main objectives:

o Finer lock granularity during message sending and reception,
  especially regarding usage of the node spinlock.

o Better separation between the link layer implementation and the link
  aggregation layer, represented by node.c::struct tipc_node.

Hopefully these changes also make this part of code somewhat easier
to comprehend and maintain.

Jon Maloy (12):
  tipc: introduce link entry structure to struct tipc_node
  tipc: move link creation from neighbor discoverer to node
  tipc: move link input queue to tipc_node
  tipc: use bearer index instead of pointers when looking up active
    links
  tipc: make media xmit call outside node spinlock context
  tipc: clean up definitions and usage of link flags
  tipc: introduce new link protocol msg create function
  tipc: improve link FSM implementation
  tipc: simplify link timer implementation
  tipc: move link supervision timer to node level
  tipc: introduce node contact FSM
  tipc: reduce locking scope during packet reception

 net/tipc/bcast.c      |   26 +-
 net/tipc/bcast.h      |    1 +
 net/tipc/bearer.h     |   23 +
 net/tipc/discover.c   |   20 +-
(Continue reading)

Ying Xue | 28 May 07:10 2015

[PATCH net-next] tipc: hold node reference count before start link timer

In link's timer expiration handler - link_timout(), not only link
object is accessed, but also node object needs to be touched as well.
However, when link timer is stopped, it is deleted asynchronously,
which means node and link objects might be accessed by link_timout()
after the timer termination. Especially when TIPC module is deleted,
there may exist a chance that a node object may be touched by
link_timout() even if the object is already freed. So, increasing node
reference count before link's timer is started helps to prevent the
issue from happening.

Reported-by: Erik Hugne <erik.hugne <at> ericsson.com>
Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
---
 net/tipc/link.c |   24 +++++++++++++++++-------
 net/tipc/node.c |    2 +-
 net/tipc/node.h |    1 +
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index ca8b8e0..a38bca4 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
 <at>  <at>  -106,7 +106,7  <at>  <at>  static void tipc_link_sync_rcv(struct tipc_node *n, struct sk_buff *buf);
 static void tipc_link_input(struct tipc_link *l, struct sk_buff *skb);
 static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb);
 static bool tipc_link_failover_rcv(struct tipc_link *l, struct sk_buff **skb);
-static void link_set_timer(struct tipc_link *link, unsigned long time);
+static void link_reset_timer(struct tipc_link *link, unsigned long time);
 /*
  *  Simple link routines
(Continue reading)

Jon Maloy | 26 May 11:40 2015
Picon

[PATCH net-next 1/1] tipc: fix bug in link protocol message create function

In commit dd3f9e70f59f43a5712eba9cf3ee4f1e6999540c
("tipc: add packet sequence number at instant of transmission") we
made a change with the consequence that packets in the link backlog
queue don't contain valid sequence numbers.

However, when we create a link protocol message, we still use the
sequence number of the first packet in the backlog, if there is any,
as "next_sent" indicator in the message. This may entail unnecessary
retransissions or stale packet transmission when there is very low
traffic on the link.

This commit fixes this issue by only using the current value of
tipc_link::snd_nxt as indicator.

Signed-off-by: Jon Maloy <jon.maloy <at> ericsson.com>
---
 net/tipc/link.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index fb2a003..ca8b8e0 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
 <at>  <at>  -1320,8 +1320,6  <at>  <at>  void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,

 		if (!tipc_link_is_up(l_ptr))
 			return;
-		if (skb_queue_len(&l_ptr->backlogq))
-			next_sent = buf_seqno(skb_peek(&l_ptr->backlogq));
 		msg_set_next_sent(msg, next_sent);
(Continue reading)


Gmane