<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/tipc/link.h, branch linux-3.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-05-14T19:19:48Z</updated>
<entry>
<title>tipc: rename and move message reassembly function</title>
<updated>2014-05-14T19:19:48Z</updated>
<author>
<name>Jon Paul Maloy</name>
</author>
<published>2014-05-14T09:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37e22164a8a3c39bdad45aa463b1e69a1fdf4110'/>
<id>urn:sha1:37e22164a8a3c39bdad45aa463b1e69a1fdf4110</id>
<content type='text'>
The function tipc_link_frag_rcv() is in reality a re-entrant generic
message reassemby function that has nothing in particular to do with
the link, where it is defined now. This becomes obvious when we see
the need to call the function from other places in the code.

In this commit rename it to tipc_buf_append() and move it to the file
msg.c. We also simplify its signature by moving the tail pointer to
the control block of the head buffer, hence making the head buffer
self-contained.

Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: avoid to asynchronously reset all links</title>
<updated>2014-05-05T21:26:45Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-05-05T00:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f5a12bd9f9a61d8a12f9adf778b14e4bb8ca050'/>
<id>urn:sha1:3f5a12bd9f9a61d8a12f9adf778b14e4bb8ca050</id>
<content type='text'>
Postpone the actions of resetting all links until after bclink
lock is released, avoiding to asynchronously reset all links.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: decouple the relationship between bearer and link</title>
<updated>2014-04-23T01:17:53Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-04-21T02:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a2f7d18e79b09c5c5a65fb1fa0e31ad046b3116'/>
<id>urn:sha1:7a2f7d18e79b09c5c5a65fb1fa0e31ad046b3116</id>
<content type='text'>
Currently on both paths of message transmission and reception, the
read lock of tipc_net_lock must be held before bearer is accessed,
while the write lock of tipc_net_lock has to be taken before bearer
is configured. Although it can ensure that bearer is always valid on
the two data paths, link and bearer is closely bound together.

So as the part of effort of removing tipc_net_lock, the locking
policy of bearer protection will be adjusted as below: on the two
data paths, RCU is used, and on the configuration path of bearer,
RTNL lock is applied.

Now RCU just covers the path of message reception. To make it possible
to protect the path of message transmission with RCU, link should not
use its stored bearer pointer to access bearer, but it should use the
bearer identity of its attached bearer as index to get bearer instance
from bearer_list array, which can help us decouple the relationship
between bearer and link. As a result, bearer on the path of message
transmission can be safely protected by RCU when we access bearer_list
array within RCU lock protection.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Reviewed-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Tested-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: align tipc function names with common naming practice in the network</title>
<updated>2014-02-18T22:31:59Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-02-18T08:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=247f0f3c3176c55b46cb9a20011d3d6757634815'/>
<id>urn:sha1:247f0f3c3176c55b46cb9a20011d3d6757634815</id>
<content type='text'>
Rename the following functions, which are shorter and more in line
with common naming practice in the network subsystem.

tipc_bclink_send_msg-&gt;tipc_bclink_xmit
tipc_bclink_recv_pkt-&gt;tipc_bclink_rcv
tipc_disc_recv_msg-&gt;tipc_disc_rcv
tipc_link_send_proto_msg-&gt;tipc_link_proto_xmit
link_recv_proto_msg-&gt;tipc_link_proto_rcv
link_send_sections_long-&gt;tipc_link_iovec_long_xmit
tipc_link_send_sections_fast-&gt;tipc_link_iovec_xmit_fast
tipc_link_send_sync-&gt;tipc_link_sync_xmit
tipc_link_recv_sync-&gt;tipc_link_sync_rcv
tipc_link_send_buf-&gt;__tipc_link_xmit
tipc_link_send-&gt;tipc_link_xmit
tipc_link_send_names-&gt;tipc_link_names_xmit
tipc_named_recv-&gt;tipc_named_rcv
tipc_link_recv_bundle-&gt;tipc_link_bundle_rcv
tipc_link_dup_send_queue-&gt;tipc_link_dup_queue_xmit
link_send_long_buf-&gt;tipc_link_frag_xmit

tipc_multicast-&gt;tipc_port_mcast_xmit
tipc_port_recv_mcast-&gt;tipc_port_mcast_rcv
tipc_port_reject_sections-&gt;tipc_port_iovec_reject
tipc_port_recv_proto_msg-&gt;tipc_port_proto_rcv
tipc_connect-&gt;tipc_port_connect
__tipc_connect-&gt;__tipc_port_connect
__tipc_disconnect-&gt;__tipc_port_disconnect
tipc_disconnect-&gt;tipc_port_disconnect
tipc_shutdown-&gt;tipc_port_shutdown
tipc_port_recv_msg-&gt;tipc_port_rcv
tipc_port_recv_sections-&gt;tipc_port_iovec_rcv

release-&gt;tipc_release
accept-&gt;tipc_accept
bind-&gt;tipc_bind
get_name-&gt;tipc_getname
poll-&gt;tipc_poll
send_msg-&gt;tipc_sendmsg
send_packet-&gt;tipc_send_packet
send_stream-&gt;tipc_send_stream
recv_msg-&gt;tipc_recvmsg
recv_stream-&gt;tipc_recv_stream
connect-&gt;tipc_connect
listen-&gt;tipc_listen
shutdown-&gt;tipc_shutdown
setsockopt-&gt;tipc_setsockopt
getsockopt-&gt;tipc_getsockopt

Above changes have no impact on current users of the functions.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: delay delete of link when failover is needed</title>
<updated>2014-02-13T22:57:07Z</updated>
<author>
<name>Jon Paul Maloy</name>
</author>
<published>2014-02-13T22:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d33939f475d403e79124e3143d7951dcfe8629f'/>
<id>urn:sha1:7d33939f475d403e79124e3143d7951dcfe8629f</id>
<content type='text'>
When a bearer is disabled, all its attached links are deleted.
Ideally, we should do link failover to redundant links on other bearers,
if there are any, in such cases. This would be consistent with current
behavior when a link is reset, but not deleted. However, due to the
complexity involved, and the (wrongly) perceived low demand for this
feature, it was never implemented until now.

We mark the doomed link for deletion with a new flag, but wait until the
failover process is finished before we actually delete it. With the
improved link tunnelling/failover code introduced earlier in this commit
series, it is now easy to identify a spot in the code where the failover
is finished and it is safe to delete the marked link. Moreover, the test
for the flag and the deletion can be done synchronously, and outside the
most time critical data path.

Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: remove 'links' list from tipc_bearer struct</title>
<updated>2014-02-13T22:57:05Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-02-13T22:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c61dd61dec0b79fa22ded8b5caf2e817dc506c24'/>
<id>urn:sha1:c61dd61dec0b79fa22ded8b5caf2e817dc506c24</id>
<content type='text'>
In our ongoing effort to simplify the TIPC locking structure,
we see a need to remove the linked list for tipc_links
in the bearer. This can be explained as follows.

Currently, we have three different ways to access a link,
via three different lists/tables:

1: Via a node hash table:
   Used by the time-critical outgoing/incoming data paths.
   (e.g. link_send_sections_fast() and tipc_recv_msg() ):

grab net_lock(read)
   find node from node hash table
   grab node_lock
       select link
       grab bearer_lock
          send_msg()
       release bearer_lock
   release node lock
release net_lock

2: Via a global linked list for nodes:
   Used by configuration commands (link_cmd_set_value())

grab net_lock(read)
   find node and link from global node list (using link name)
   grab node_lock
       update link
   release node lock
release net_lock

(Same locking order as above. No problem.)

3: Via the bearer's linked link list:
   Used by notifications from interface (e.g. tipc_disable_bearer() )

grab net_lock(write)
   grab bearer_lock
      get link ptr from bearer's link list
      get node from link
      grab node_lock
         delete link
      release node lock
   release bearer_lock
release net_lock

(Different order from above, but works because we grab the
outer net_lock in write mode first, excluding all other access.)

The first major goal in our simplification effort is to get rid
of the "big" net_lock, replacing it with rcu-locks when accessing
the node list and node hash array. This will come in a later patch
series.

But to get there we first need to rewrite access methods ##2 and 3,
since removal of net_lock would introduce three major problems:

a) In access method #2, we access the link before taking the
   protecting node_lock. This will not work once net_lock is gone,
   so we will have to change the access order. We will deal with
   this in a later commit in this series, "tipc: add node lock
   protection to link found by link_find_link()".

b) When the outer protection from net_lock is gone, taking
   bearer_lock and node_lock in opposite order of method 1) and 2)
   will become an obvious deadlock hazard. This is fixed in the
   commit ("tipc: remove bearer_lock from tipc_bearer struct")
   later in this series.

c) Similar to what is described in problem a), access method #3
   starts with using a link pointer that is unprotected by node_lock,
   in order to via that pointer find the correct node struct and
   lock it. Before we remove net_lock, this access order must be
   altered. This is what we do with this commit.

We can avoid introducing problem problem c) by even here using the
global node list to find the node, before accessing its links. When
we loop though the node list we use the own bearer identity as search
criteria, thus easily finding the links that are associated to the
resetting/disabling bearer. It should be noted that although this
method is somewhat slower than the current list traversal, it is in
no way time critical. This is only about resetting or deleting links,
something that must be considered relatively infrequent events.

As a bonus, we can get rid of the mutual pointers between links and
bearers. After this commit, pointer dependency go in one direction
only: from the link to the bearer.

This commit pre-empts introduction of problem c) as described above.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: redefine 'started' flag in struct link to bitmap</title>
<updated>2014-02-13T22:57:05Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-02-13T22:29:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=135daee6d3959a6d7c4f59b448ed6f854d88ce27'/>
<id>urn:sha1:135daee6d3959a6d7c4f59b448ed6f854d88ce27</id>
<content type='text'>
Currently, the 'started' field in struct tipc_link represents only a
binary state, 'started' or 'not started'. We need it to represent
more link execution states in the coming commits in this series.
Hence, we rename the field to 'flags', and define the current
started/non-started state to be represented by the LSB bit of
that field.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: move code for deleting links from bearer.c to link.c</title>
<updated>2014-02-13T22:57:05Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-02-13T22:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d8439b686f15c23faef4d7d67c4a9f30ce0f2b5'/>
<id>urn:sha1:8d8439b686f15c23faef4d7d67c4a9f30ce0f2b5</id>
<content type='text'>
We break out the code for deleting attached links in the
function bearer_disable(), and define a new function named
tipc_link_delete_list() to do this job.

This commit incurs no functional changes, but makes the code of
function bearer_disable() cleaner. It is also a preparation
for a more important change to the bearer code, in a subsequent
commit in this series.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: move code for resetting links from bearer.c to link.c</title>
<updated>2014-02-13T22:57:05Z</updated>
<author>
<name>Ying Xue</name>
</author>
<published>2014-02-13T22:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0ca2c30b1e9c1ed8b58bccb95c33d25763a4311'/>
<id>urn:sha1:e0ca2c30b1e9c1ed8b58bccb95c33d25763a4311</id>
<content type='text'>
We break out the code for resetting attached links in the
function tipc_reset_bearer(), and define a new function named
tipc_link_reset_list() to do this job.

This commit incurs no functional changes, but makes the code
of function tipc_reset_bearer() cleaner. It is also a preparation
for a more important change to the bearer code, in a subsequent
commit in this series.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: stricter behavior of message reassembly function</title>
<updated>2014-02-13T22:57:05Z</updated>
<author>
<name>Jon Paul Maloy</name>
</author>
<published>2014-02-13T22:29:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03b92017933bd22a3dca6830048877dd3162f872'/>
<id>urn:sha1:03b92017933bd22a3dca6830048877dd3162f872</id>
<content type='text'>
The function tipc_link_recv_fragment(struct sk_buff **buf) currently
leaves the value of the input buffer pointer undefined when it returns,
except when the return code indicates that the reassembly is complete.
This despite the fact that it always consumes the input buffer.

Here, we enforce a stricter behavior by this function, ensuring that
the returned buffer pointer is non-NULL if and only if the reassembly
is complete. This makes it possible to test for the buffer pointer as
criteria for successful reassembly.

We also rename the function to tipc_link_frag_rcv(), which is both
shorter and more in line with common naming practice in the network
subsystem.

Apart from the new name, these changes have no impact on current
users of the function, but makes it more practical for use in some
planned future commits.

Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
