erik.hugne | 27 Feb 15:32 2015
Picon

[RFC] tipc: add support for connect() on dgram/rdm sockets

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

Following the example of ip4_datagram_connect, we store the
address in the socket structure for dgram/rdm sockets and use
that as the default destination for subsequent send() calls.
It is allowed to connect to any address types, and the behaviour
of send() will be the same as a normal sendto() with this address
provided.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
---
Cleaned up version of the initial patch from this thread:
http://thread.gmane.org/gmane.network.tipc.general/8292/focus=8312

This is based on Ying's pending patch that removes iocb argument
from sendmsg:
http://patchwork.ozlabs.org/patch/444243/

Allowing connect() to associate a connectionless socket with a remote
address will enable frameworks such as GnuTLS/OpenSSL to work on
TIPC. Something that may become relevant if you start running TIPC traffic
over unsecure media types (UDP over an untrusted network).
I also hope that it will make it easier to add support for RDM
to ZeroMQ and the likes.

 net/tipc/socket.c | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c245ec3..d765fc2 100644
(Continue reading)

Ying Xue | 27 Feb 07:46 2015

[PATCH net-next] tipc: Don't use iocb argument in socket layer

Currently the iocb argument is used to idenfiy whether or not socket
lock is hold before tipc_sendmsg()/tipc_send_stream() is called. But
this usage prevents iocb argument from being dropped through sendmsg()
at socket common layer. Therefore, in the commit we introduce two new
functions called __tipc_sendmsg() and __tipc_send_stream(). When they
are invoked, it assumes that their callers have taken socket lock,
thereby avoiding the weird usage of iocb argument in tipc stack.

Cc: Christoph Hellwig <hch <at> lst.de>
Signed-off-by: Ying Xue <ying.xue <at> windriver.com>
---
 net/tipc/socket.c |   79 +++++++++++++++++++++++++++++------------------------
 1 file changed, 43 insertions(+), 36 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index f73e975..2c43073 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
 <at>  <at>  -114,6 +114,9  <at>  <at>  static int tipc_sk_withdraw(struct tipc_sock *tsk, uint scope,
 static struct tipc_sock *tipc_sk_lookup(struct net *net, u32 portid);
 static int tipc_sk_insert(struct tipc_sock *tsk);
 static void tipc_sk_remove(struct tipc_sock *tsk);
+static int __tipc_send_stream(struct socket *sock, struct msghdr *m,
+			      size_t dsz);
+static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz);

 static const struct proto_ops packet_ops;
 static const struct proto_ops stream_ops;
 <at>  <at>  -907,6 +910,18  <at>  <at>  static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
 static int tipc_sendmsg(struct kiocb *iocb, struct socket *sock,
(Continue reading)

Jon Maloy | 26 Feb 22:15 2015
Picon

[PATCH net-next v5 0/9] tipc: performance optimizations

The commits in this series contain some relatively simple changes
that lead to better throughput across TIPC connections. They are
enough to almost double overall throughput on a KVM/virtio based
system, while the improvement in other environments seems
to be less significant.

v2: Fixed one serious problem in link_prepare_wakeup(), which
    MAY explain the -EPIPE response that Erik see, but not the 
    "illegal message" one.
    I am completely unable to reproduce this behavior, so I
    added debug printouts in a couple of places regarding
    the "illegal message" problem. Since I strongly suspect
    "extract bundled buffers by cloning"patch (#4) I added an
    extra printoput there. Please try and verify.

v3: - Removed previous commit #2, so there is no exchange of window
      sizes anyore. It made no sense, since we cannot fetch any hint
      value (rx ring size) from the network driver as I was hoping.
    - Added new patch #2 where the message validation  is moved to
      msg.c.
    - Fixed some spellig errors, as indicated by Ying.
    - Added validation, inclusive pskb_may_pull() to tipc_msg_append()
      in patch #3. This probably fixes the problems Erik has
      encountered when trying to run the patches.
    - I have NOT reversed the change to the window limits. They remain
      16 (min) and 256 (max). I will explain in a separate mail.

v4: - Made smaller corrections to typos etc. according to Erik's
      comments. Now awaiting Ying's final input.
      I will send in this to 3.20 after Erik's UDP patches
(Continue reading)

erik.hugne | 26 Feb 07:43 2015
Picon

[PATCH net-next 0/5] tipc: bug fix and some improvements

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

Most important is a fix for a nullptr exception that would occur when
name table subscriptions fail. The remaining patches are performance
improvements and cosmetic changes.

Erik Hugne (5):
  tipc: only create header copy for name distr messages
  tipc: fix nullpointer bug when subscribing to events
  tipc: purge links when bearer is disabled
  tipc: rename media/msg related definitions
  tipc: make media address offset a common define

 net/tipc/bearer.c     |  2 +-
 net/tipc/bearer.h     |  5 +++--
 net/tipc/eth_media.c  |  8 +++-----
 net/tipc/ib_media.c   |  2 +-
 net/tipc/msg.h        |  4 ++--
 net/tipc/name_distr.c |  2 +-
 net/tipc/subscr.c     | 24 +++++-------------------
 7 files changed, 16 insertions(+), 31 deletions(-)

--

-- 
2.1.4

------------------------------------------------------------------------------
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 
(Continue reading)

erik.hugne | 25 Feb 14:58 2015
Picon

[PATCH] tipc: only create header copy for name distr messages

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

The TIPC name distributor pushes topology updates to the cluster
neighbors. Currently this is done in a unicast manner, and the
skb holding the update is cloned for each cluster member. This
is unnecessary, as we only modify the destnode field in the header
so we change it to do pskb_copy instead.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
---
Sorry for the fragmented patches i send, but this is stuff i just found
when working on other things..

http://imgur.com/gallery/t0XHtgJ

 net/tipc/name_distr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index fcb0791..506aaa5 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
 <at>  <at>  -98,7 +98,7  <at>  <at>  void named_cluster_distribute(struct net *net, struct sk_buff *skb)
 			continue;
 		if (!tipc_node_active_links(node))
 			continue;
-		oskb = skb_copy(skb, GFP_ATOMIC);
+		oskb = pskb_copy(skb, GFP_ATOMIC);
 		if (!oskb)
 			break;
(Continue reading)

erik.hugne | 25 Feb 14:09 2015
Picon

[PATCH] tipc: fix nullpointer bug when subscribing to events

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

If a subscription request is sent to a topology server
connection, and any error occurs (malformed request, oom
or limit reached) while processing this request, TIPC will
try to terminate the subscriber connection and in this process
access fields in an already freed (or never allocated)
subscription element.

We remove the logic that tries to close the subscriber
connection for failed subscription attempts. This will also
make the topology server a little more fault tolerant.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
---
 net/tipc/subscr.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 72c339e..c68267d 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
 <at>  <at>  -162,19 +162,6  <at>  <at>  static void subscr_del(struct tipc_subscription *sub)
 	atomic_dec(&tn->subscription_count);
 }

-/**
- * subscr_terminate - terminate communication with a subscriber
- *
- * Note: Must call it in process context since it might sleep.
(Continue reading)

Ratheesh Variar | 24 Feb 21:34 2015
Picon

TIPC Reporting MAC mismatch error.

Hello All,

I am working on a TIPC based system. Occasionally for unknown triggers we
start to see the below errors in the kernel logs.

kernel: TIPC: Link's media addr <eth(00:80:f9:8b:6a:c4)> is not matching
with the media address. <4>TIPC: Mac address of the skb: 00:80:f9:8b:01:00
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Link's media addr <eth(00:01:af:31:7c:86)> is not matching
with the media address. <4>TIPC: Mac address of the skb: 00:01:af:31:01:00
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Link's media addr <eth(00:80:f9:8b:6a:c4)> is not matching
with the media address. <4>TIPC: Mac address of the skb: 00:80:f9:8b:01:00
kernel: TIPC: Link's media addr <eth(00:80:f9:8b:6a:ba)> is not matching
with the media address. <4>TIPC: Mac address of the skb: 00:80:f9:8b:00:00
kernel: TIPC: Link's media addr <eth(00:01:af:30:cb:0e)> is not matching
with the media address. <4>TIPC: Mac address of the skb: 00:01:af:30:01:00
kernel: TIPC: Failed to publish illegal {1651469924,805306368,0}
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Link's media addr <eth(ec:9e:cd:04:aa:0e)> is not matching
with the media address. <4>TIPC: Mac address of the skb: ec:9e:cd:04:01:00
kernel: TIPC: Failed to publish illegal {1651469924,805306368,0}
kernel: TIPC: Unable to remove publication by node 0x1001002
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Unable to remove publication by node 0x1001009
kernel: TIPC: Failed to publish illegal {1,437252381,16}
kernel: TIPC: Unable to remove publication by node 0x1001068
(Continue reading)

Jon Maloy | 23 Feb 15:54 2015
Picon

TIIPC slides from netdev01

Here you find my slide set from the netdev0.1 conference, in case you want to have a look.

https://www.netdev01.org/downloads

///jon

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
erik.hugne | 23 Feb 14:03 2015
Picon

[PATCH 0/3] tipc: small fixes in the socket layer

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

Some minor improvements, and a change in the way errors are handled
for node local delivery.

Erik Hugne (3):
  tipc: remove redundant call to tipc_node_remove_conn
  tipc: shutdown() should fail with -ENOBUFS if link is congested
  tipc: Failed node local delivery should return -ENOBUFS

 net/tipc/link.c   |  7 +++++--
 net/tipc/socket.c | 15 +++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

--

-- 
2.1.4

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
Erik Hugne | 23 Feb 08:25 2015
Picon

[challa <at> noironetworks.com: [PATCH net-next v3 1/2] igmp v6: add __ipv6_sock_mc_join and __ipv6_sock_mc_drop]

This is awesome, with this we can do all UDP init in process context.
I will rebase (and test) the UDP set on top of this, as soon as Madhu's set is
applied to net-next i'll send it in.

//E

----- Forwarded message from Madhu Challa <challa <at> noironetworks.com> -----

Date: Sun, 22 Feb 2015 22:26:53 -0800
From: Madhu Challa <challa <at> noironetworks.com>
To: eric.dumazet <at> gmail.com, davem <at> davemloft.net, netdev <at> vger.kernel.org
CC: Madhu Challa <challa <at> noironetworks.com>
Subject: [PATCH net-next v3 1/2] igmp v6: add __ipv6_sock_mc_join and __ipv6_sock_mc_drop
X-Mailer: git-send-email 1.9.1

Based on the igmp v4 changes from Eric Dumazet.
959d10f6bbf6ab5b8813c4e37540a2e43ca2ae96

These changes are needed to perform igmp v6 join/leave while
RTNL is held.

Make ipv6_sock_mc_join and ipv6_sock_mc_drop wrappers around
__ipv6_sock_mc_join and  __ipv6_sock_mc_drop to avoid
proliferation of work queues.

Signed-off-by: Madhu Challa <challa <at> noironetworks.com>
---
 include/net/ipv6.h |  8 ++++++++
 net/ipv6/mcast.c   | 41 ++++++++++++++++++++++++++++++++---------
 2 files changed, 40 insertions(+), 9 deletions(-)
(Continue reading)

erik.hugne | 20 Feb 15:20 2015
Picon

[RFC] tipc: fix potential skb leaks during link congestion

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

Should the link be congested at the time of transmission,
only keep the buffer chain when explicitly told to do so.

Signed-off-by: Erik Hugne <erik.hugne <at> ericsson.com>
---
 net/tipc/bcast.c      |  3 ++-
 net/tipc/link.c       | 21 +++++++++++++--------
 net/tipc/link.h       |  9 +++++++--
 net/tipc/name_distr.c |  2 +-
 net/tipc/socket.c     |  6 ++++--
 5 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 3e41704..972ef58 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
 <at>  <at>  -392,7 +392,8  <at>  <at>  int tipc_bclink_xmit(struct net *net, struct sk_buff_head *list)
 	if (likely(bclink)) {
 		tipc_bclink_lock(net);
 		if (likely(bclink->bcast_nodes.count)) {
-			rc = __tipc_link_xmit(net, bcl, list);
+			rc = __tipc_link_xmit(net, bcl, list,
+					      LINK_XMIT_KEEP_CHAIN);
 			if (likely(!rc)) {
 				u32 len = skb_queue_len(&bcl->outqueue);

diff --git a/net/tipc/link.c b/net/tipc/link.c
index a4cf364..9202fa8 100644
(Continue reading)


Gmane