Hi Partha,

Thanks, it's really a good job!

Each of patch in the series is very clean, and easily understandable.

I have reviewed all of patches. Except for some minor comments, I have no other 
objections. 

Please add my reviewed-by tag if you want.

Regards,
Ying

-----Original Message-----
From: Parthasarathy Bhuvaragan [mailto:parthasarathy.bhuvara...@ericsson.com] 
Sent: Monday, July 25, 2016 8:25 PM
To: tipc-discussion@lists.sourceforge.net; jon.ma...@ericsson.com; 
ma...@donjonn.com; Xue, Ying; erik.hu...@gmail.com
Subject: [RFC PATCH v1 00/12] tipc: create socket FSM using sk_state only

The following issues with the current socket layer hinders socket diagnostics 
implementation, which led to this patch series.

1. tipc socket state is derived from multiple variables like
   sock->state, tsk->probing_state and tsk->connected. This style forces
   us to export multiple attributes to the user space, which has to be
   backward compatible.

2. Abuse of sock->state cannot be exported to user-space without
   requiring tipc specific hacks in the user-space.
   - For connection less (CL) sockets sock->state is overloaded to
     tipc state SS_READY.
   - For connection oriented (CO) listening socket sock->state is
     overloaded to tipc state SS_LISTEN.

This series is split into three:
1. A bug fix in patch-1
2. Express all tipc states using a single variable. This is done in patch#2-5.
3. Migrate the new tipc states to sk->sk_state. This is done in patch#6-12.

The figures below represents the FSM after this series:

Unconnected Sockets:
+------------------+        +--------------------+
| TIPC_UNCONNECTED |------->| TIPC_DISCONNECTING |
+------------------+        +--------------------+

Stream Server Listening Socket:
+------------------+        +-------------+
| TIPC_UNCONNECTED |------->| TIPC_LISTEN |
+------------------+        +-------------+
                                  |
+--------------------+            |
| TIPC_DISCONNECTING |<-----------+
+--------------------+

Stream Server Data Socket:
+-----------------+        +------------------+
|TIPC_UNCONNECTED |------> | TIPC_ESTABLISHED |<---+
+-----------------+        +------------------+    |
                               ^   |    |          |
                               |   |    +----------+
                               |   v
+------------------+      +-------------+
|TIPC_DISCONNECTING|<-----|TIPC_PROBING |
+------------------+      +-------------+

Stream Socket Client:
+-----------------+       +-----------------+
|TIPC_UNCONNECTED |------>| TIPC_CONNECTING |
+-----------------+       +-----------------+
                                  |
                                  |
                                  v
                          +------------------+
                          | TIPC_ESTABLISHED |<---+
                          +------------------+    |
                               ^   |    |         |
                               |   |    +---------+
                               |   v
+------------------+      +-------------+
|TIPC_DISCONNECTING|<-----|TIPC_PROBING |
+------------------+      +-------------+

NOTE:
This is just a base refractoring required for socket diagnostics.
The patches for socket diagnostics will be sent when they are ready.

Parthasarathy Bhuvaragan (12):
  tipc: set kern=0 in sk_alloc() during tipc_accept()
  tipc: rename tsk->remote to tsk->peer for consistent naming
  tipc: remove tsk->connected for connection less sockets
  tipc: remove tsk->connected from tipc_sock
  tipc: remove probing_intv from tipc_sock
  tipc: remove socket state SS_READY
  tipc: create TIPC_LISTEN as a new sk_state
  tipc: create TIPC_PROBING/TIPC_ESTABLISHED as new sk_states
  tipc: create TIPC_UNCONNECTED as a new sk_state
  tipc: create TIPC_DISCONNECTING as a new sk_state
  tipc: create TIPC_CONNECTING as a new sk_state
  tipc: remove SS_CONNECTED sock state

 include/uapi/linux/tipc.h |  12 ++
 net/tipc/socket.c         | 344 ++++++++++++++++++++++++++--------------------
 2 files changed, 207 insertions(+), 149 deletions(-)

--
2.1.4

------------------------------------------------------------------------------
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to