Jon Maloy | 27 Mar 00:21 2015
Picon

[PATCH net-next v2 1/1] tipc: fix bug in secondary destination lookup

A message sent to a node after a successful name table lookup may still
find that the destination socket has disappeared, because distribution
of name table updates is non-atomic. If so, the message will be rejected
back to the sender with error code TIPC_ERR_NO_PORT. If the source
socket of the message has disappeared in the meantime, the message
should be dropped.

However, in the currrent code, the message will instead be subject
to a tertiary lookup, because the function tipc_msg_lookup_dest()
doesn't check if there is an error code present in the message
when performing the lookup. This will normally anyway lead
to the message being dropped, because no destination can be found.

However, under extreme circumstances, the name table on the original
node may still not have been updated when the rejected message arrives
back. If so, the rejected message may once more be redireted to the now
invalid destination socket, where it will finally be dropped.

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

diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 0c6dad8..32896a3 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
 <at>  <at>  -516,6 +516,8  <at>  <at>  bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb,
 		return false;
 	if (!msg_named(msg))
(Continue reading)

Jon Maloy | 26 Mar 21:42 2015
Picon

[PATCH net-next 1/1] tipc: fix bug in secondary destination lookup

A message sent to a node after a successful name table lookup may still
find that the destination socket has disappeared, because distribution
of name table updates is non-atomic. If so, the message will be rejected
back to the sender with error code TIPC_ERR_NO_PORT. If the source
socket of the message has disappeared in the meantime, the message
should be dropped.

However, in the currrent code, the message will instead be subject
to a tertiary lookup, because the function tipc_msg_lookup_dest()
doesn't check if there is an error code present in the message
when performing the lookup. This will normally anyway lead
to the message being dropped, because no destination can be found.

However, under extreme circumstances, the name table on the original
node may still not have been updated when the rejected message arrives
back. If so, the rejected message may once more be redireted to the now
invalid destination socket, where it will finally be dropped.

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

diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 0c6dad8..90c9280 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
 <at>  <at>  -516,6 +516,8  <at>  <at>  bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb,
 		return false;
 	if (!msg_named(msg))
(Continue reading)

Jon Maloy | 26 Mar 17:04 2015
Picon

[PATCH net-next 0/3] tipc: remove some unnecessary complexity

The TIPC code is unnecessarily complex in some places, often because
the conditions or assumptions that were the cause for the complexity
are not valid anymore.

In these three commits, we eliminate some cases of such redundant
complexity.

Jon Maloy (3):
  tipc: drop tunneled packet duplicates at reception
  tipc: eliminate delayed link deletion at link failover
  tipc: simplify link mtu negotiation

 net/tipc/bcast.c |   4 +-
 net/tipc/link.c  | 333 ++++++++++++++++++-------------------------------------
 net/tipc/link.h  |  29 +++--
 net/tipc/msg.c   |   4 +-
 net/tipc/msg.h   |  10 +-
 net/tipc/node.c  |  22 ++--
 6 files changed, 139 insertions(+), 263 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
(Continue reading)

Jon Maloy | 25 Mar 17:07 2015
Picon

[PATCH net-next 0/3] tipc: some improvements and fixes

We introduce a better algorithm for selecting when and which
users should be subject to link congestion control, plus clean
up some code for that mechanism.
Commit #3 fixes another rare race condition during packet reception.

Jon Maloy (3):
  tipc: introduce starvation free send algorithm
  tipc: clean up handling of link congestion
  tipc: eliminate race condition at dual link establishment

 net/tipc/bcast.c |   2 +-
 net/tipc/link.c  | 207 ++++++++++++++++++++++++++++++++++---------------------
 net/tipc/link.h  |   9 ++-
 net/tipc/msg.h   |  36 +++++-----
 4 files changed, 157 insertions(+), 97 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Jon Maloy | 25 Mar 12:21 2015
Picon

[PATCH net-next v4 0/3] tipc: some improvements and fixes

We introduce a better algorithm for selecting when and which
users should be subject to link congestion control, plus clean
up some code for that mechanism.
Commit #3 fixes another rare race condition during packet reception.

v3: Updated according to comments from Erik Hugne
v4: Updated according to more comments from Erik Hugne

Jon Maloy (3):
  tipc: introduce starvation free send algorithm
  tipc: clean up handling of link congestion
  tipc: eliminate race condition at dual link establishment

 net/tipc/bcast.c |   2 +-
 net/tipc/link.c  | 208 +++++++++++++++++++++++++++++++++++--------------------
 net/tipc/link.h  |   9 ++-
 net/tipc/msg.h   |  36 +++++-----
 4 files changed, 158 insertions(+), 97 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Jon Maloy | 25 Mar 11:31 2015
Picon

[PATCH net-next v3 0/3] tipc: some improvements and fixes

We introduce a better algorithm for selecting when and which
users should be subject to link congestion control, plus clean
up some code for that mechanism.
Commit #3 fixes another rare race condition during packet reception.

v3: Updated according to comments from Erik Hugne

Jon Maloy (3):
  tipc: introduce starvation free send algorithm
  tipc: clean up handling of link congestion
  tipc: eliminate race condition at dual link establishment

 net/tipc/bcast.c |   2 +-
 net/tipc/link.c  | 207 ++++++++++++++++++++++++++++++++++---------------------
 net/tipc/link.h  |   9 ++-
 net/tipc/msg.h   |  36 +++++-----
 4 files changed, 157 insertions(+), 97 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Ying Xue | 25 Mar 11:09 2015

[PATCH net-next] tipc: fix a link reset issue due to retransmission failures

When a node joins a cluster while we are transmitting a fragment
stream over the broadcast link, it's missing the preceding fragments
needed to build a meaningful message. As a result, the node has to
drop it. However, as the fragment message is not acknowledged to
its sender before it's dropped, it accidentally causes link reset
of retransmission failure on the node.

Reported-by: Erik Hugne <erik.hugne <at> ericsson.com>
Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
Reviewed-by: Erik Hugne <erik.hugne <at> ericsson.com>
Tested-by: Erik Hugne <erik.hugne <at> ericsson.com>
---
 net/tipc/bcast.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 403aee7..7935553 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
 <at>  <at>  -523,11 +523,13  <at>  <at>  receive:
 			tipc_bclink_unlock(net);
 			tipc_node_unlock(node);
 		} else if (msg_user(msg) == MSG_FRAGMENTER) {
-			tipc_buf_append(&node->bclink.reasm_buf, &buf);
-			if (unlikely(!buf && !node->bclink.reasm_buf))
-				goto unlock;
 			tipc_bclink_lock(net);
 			bclink_accept_pkt(node, seqno);
+			tipc_buf_append(&node->bclink.reasm_buf, &buf);
+			if (unlikely(!buf && !node->bclink.reasm_buf)) {
(Continue reading)

Jon Maloy | 25 Mar 06:35 2015
Picon

[PATCH net-next v2 0/3] tipc: some improvements and fixes

We introduce a better algorithm for selecting when and which
users should be subject to link congestion control, plus clean
up some code for that mechanism.
Commit #3 fixes another rare race condition during packet reception.

Jon Maloy (3):
  tipc: introduce starvation free send algorithm
  tipc: clean up handling of link congestion
  tipc: eliminate race condition at dual link establishment

 net/tipc/bcast.c |   2 +-
 net/tipc/link.c  | 208 +++++++++++++++++++++++++++++++++++--------------------
 net/tipc/link.h  |   9 ++-
 net/tipc/msg.h   |  36 +++++-----
 4 files changed, 158 insertions(+), 97 deletions(-)

--

-- 
1.9.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Ying Xue | 24 Mar 09:59 2015

[PATCH net-next] tipc: fix compile error when IPV6=m and TIPC=y

When IPV6=m and TIPC=y, below error will appear during building kernel
image:

net/tipc/udp_media.c:196:
undefined reference to `ip6_dst_lookup'
make: *** [vmlinux] Error 1

As ip6_dst_lookup() is implemented in IPV6 and IPV6 is compiled as
module, ip6_dst_lookup() is not built-in core kernel image. As a
result, compiler cannot find 'ip6_dst_lookup' reference while
compiling TIPC code into core kernel image.

But with the method introduced by commit 5f81bd2e5d80 ("ipv6: export a
stub for IPv6 symbols used by vxlan"), we can avoid the compile error
through "ipv6_stub" pointer to access ip6_dst_lookup().

Fixes: d0f91938bede ("tipc: add ip/udp media type")
Suggested-by: Marcelo Ricardo Leitner <marcelo.leitner <at> gmail.com>
Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
---
 net/tipc/udp_media.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index ac89101..ef3d7aa 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
 <at>  <at>  -193,7 +193,7  <at>  <at>  static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
 			.saddr = src->ipv6,
 			.flowi6_proto = IPPROTO_UDP
(Continue reading)

Erik Hugne | 23 Mar 13:36 2015
Picon

bclink WARN_ON hit at modprobe -r

modprobe -r while tipc have packets left to retransmit on the bclink
produces the following backtrace.

[  217.279883] Resetting bearer <eth:eth0>
[  217.281790] ------------[ cut here ]------------
[  217.282547] WARNING: CPU: 1 PID: 137 at net/tipc/bcast.c:632 tipc_bcbearer_send+0x25c/0x2a0 [tipc]()
[  217.283695] Modules linked in: tipc(-) ip6_udp_tunnel udp_tunnel
[  217.284527] CPU: 1 PID: 137 Comm: modprobe Not tainted 4.0.0-rc3+ #18
[  217.285344] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  217.286059]  ffffffffa00469ab ffff88000001bbe8 ffffffff8162ace4 ffff880038d0e988
[  217.287047]  0000000000000000 ffff88000001bc28 ffffffff8104da85 0000000000000000
[  217.288039]  ffff8800371a7090 ffff88003f055400 ffff88003fb319c0 ffff88003fb31858
[  217.289030] Call Trace:
[  217.289367]  [<ffffffff8162ace4>] dump_stack+0x45/0x57
[  217.289999]  [<ffffffff8104da85>] warn_slowpath_common+0x85/0xc0
[  217.290766]  [<ffffffff8104db65>] warn_slowpath_null+0x15/0x20
[  217.291512]  [<ffffffffa002f60c>] tipc_bcbearer_send+0x25c/0x2a0 [tipc]
[  217.292354]  [<ffffffff814e5b1c>] ? skb_free_head+0x6c/0x80
[  217.293045]  [<ffffffffa00321a5>] tipc_bearer_send+0x45/0x70 [tipc]
[  217.293836]  [<ffffffffa00347e2>] tipc_link_push_packets+0xf2/0x130 [tipc]
[  217.294710]  [<ffffffffa002fcb3>] tipc_bclink_acknowledge+0x283/0x2b0 [tipc]
[  217.295602]  [<ffffffffa003ee28>] tipc_node_link_down+0x428/0x440 [tipc]
[  217.296454]  [<ffffffffa003b2e6>] ? tipc_nametbl_withdraw+0xe6/0x160 [tipc]
[  217.297335]  [<ffffffffa0033a6f>] tipc_link_reset+0xaf/0x2f0 [tipc]
[  217.298114]  [<ffffffffa0033e9b>] tipc_link_reset_list+0x7b/0xc0 [tipc]
[  217.298950]  [<ffffffffa003112d>] tipc_reset_bearer+0x2d/0x40 [tipc]
[  217.299758]  [<ffffffffa0031280>] tipc_l2_device_event+0x60/0xc0 [tipc]
[  217.300597]  [<ffffffff814f3d92>] unregister_netdevice_notifier+0xc2/0x100
[  217.301470]  [<ffffffffa0032220>] tipc_bearer_cleanup+0x10/0x20 [tipc]
[  217.302304]  [<ffffffffa0046057>] tipc_exit+0x9/0x39 [tipc]
(Continue reading)

Ying Xue | 20 Mar 06:14 2015

[PATCH] demo-benchmark: convert narosecond to microsecond while computing elapsed time

Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
---
 demos/benchmark/client_tipc.c |   30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/demos/benchmark/client_tipc.c b/demos/benchmark/client_tipc.c
index 89264e4..a3d967d 100755
--- a/demos/benchmark/client_tipc.c
+++ b/demos/benchmark/client_tipc.c
 <at>  <at>  -187,24 +187,16  <at>  <at>  static void usage(char *app)
 	fprintf(stderr, "\tinterface to use for tcp (default: last found)\n");
 }

-static unsigned long long elapsednanos(struct timeval *from)
+static unsigned long long elapsedusec(struct timeval *from)
 {
 	struct timeval now;
-	long long from_ns, now_ns;
+	long long from_us, now_us;

 	gettimeofday(&now, 0);

-	from_ns = from->tv_sec * 1000000000 + from->tv_usec * 1000;
-	now_ns = now.tv_sec * 1000000000 + now.tv_usec * 1000;
-	return now_ns - from_ns;
-/*
-	if (now.tv_usec >= from->tv_usec)
-		return((now.tv_sec - from->tv_sec) * 1000000000 +
-		       (now.tv_usec - from->tv_usec) * 1000);
-	else
(Continue reading)


Gmane